Skip to content

Commit

Permalink
restful -> api, rest/restful -> man/api
Browse files Browse the repository at this point in the history
  • Loading branch information
诗然 committed Mar 1, 2016
1 parent 1ebf30d commit 9d8875a
Show file tree
Hide file tree
Showing 22 changed files with 29 additions and 28 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@

注:demo中的账号信息配置只为方便demo例程的运行,真实产品中我们建议您使用安全黑匣子或其他方式保障密钥的安全性。

## man_restful_demo
## man_api_demo

man_restful_demo给出了移动数据分析服务(Mobile Analytics)RESTful接口的使用示例
man_api_demo给出了移动数据分析服务(Mobile Analytics)api接口的使用示例

请在AndroidManifest.xml文件中添加您的账户信息以便DEMO能正常运行。

Expand Down
1 change: 1 addition & 0 deletions man_restful_demo/.gitignore → man_api_demo/.gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
/build
*.iml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ android {
buildToolsVersion "21.1.1"

defaultConfig {
applicationId "alibaba.man_restful_demo"
applicationId "alibaba.man_api_demo"
minSdkVersion 9
targetSdkVersion 21
versionCode 1
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package alibaba.man_restful_demo;
package alibaba.man_api_demo;

import android.app.Application;
import android.test.ApplicationTestCase;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="alibaba.man_restful_demo" >
package="alibaba.man_api_demo" >

<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.INTERNET"/>
Expand All @@ -12,7 +12,7 @@
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name="alibaba.man_restful_demo.MainActivity"
android:name="alibaba.man_api_demo.MainActivity"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package alibaba.man_restful_demo;
package alibaba.man_api_demo;

/**
* Created by ryan on 24/8/15.
*/
public class MANRestfulEnterpriseEditionLog {
public class MANApiEnterpriseEditionLog {

String lineSeparator = "\n";
String columnSeparator = "\u0001";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
package alibaba.man_restful_demo;
package alibaba.man_api_demo;

import java.security.MessageDigest;
import java.util.List;

/**
* Created by ryan on 25/8/15.
*/
public class MANRestfulEnterpriseEditionUpload {
public class MANApiEnterpriseEditionUpload {

MANRestfulEnterpriseEditionUpload() {
System.out.println("MANRESTful Enterprise init.");
MANApiEnterpriseEditionUpload() {
System.out.println("MANAPI Enterprise init.");
}

public static void main(int appKeyTemp, String appSecret) {
String appKey = String.valueOf(appKeyTemp);
String charset = "UTF-8";
// RESTful service.
String requestURL = "http://adash.man.aliyuncs.com:80/rest/restful";
// api service.
String requestURL = "http://adash.man.aliyuncs.com:80/man/api";

try {
MANRestfulEnterpriseEditionLog log1 = new MANRestfulEnterpriseEditionLog();
MANApiEnterpriseEditionLog log1 = new MANApiEnterpriseEditionLog();
log1.client_ip = "102.35.23.5";
log1.protocol_version = "2.3.3";
log1.imei = "c1976429369bfe063ed8b3409db7c7e7d87196d9";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
package alibaba.man_restful_demo;
package alibaba.man_api_demo;

import java.util.List;

/**
* Created by ryan on 25/8/15.
*/
public class MANRestfulRawEditionUpload {
public class MANApiRawEditionUpload {

MANRestfulRawEditionUpload() {
System.out.println("MANRESTful raw init.");
MANApiRawEditionUpload() {
System.out.println("MANAPI raw init.");
}

public static void main(int appKeyTemp, String appSecret) {
String appKey = String.valueOf(appKeyTemp);
String charset = "UTF-8";
// RESTful service.
String requestURL = "http://adash.man.aliyuncs.com:80/rest/restful";
// api service.
String requestURL = "http://adash.man.aliyuncs.com:80/man/api";

try {
String type = "Raw";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package alibaba.man_restful_demo;
package alibaba.man_api_demo;

import android.content.pm.PackageManager;
import android.support.v7.app.ActionBarActivity;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;

import alibaba.man_restful_demo.R;
import alibaba.man_api_demo.R;


public class MainActivity extends ActionBarActivity {
Expand All @@ -19,9 +19,9 @@ protected void onCreate(Bundle savedInstanceState) {
@Override
public void run() {
try {
MANRestfulEnterpriseEditionUpload.main(getPackageManager().getApplicationInfo(getPackageName(), PackageManager.GET_META_DATA).metaData.getInt("com.alibaba.app.appkey"),
MANApiEnterpriseEditionUpload.main(getPackageManager().getApplicationInfo(getPackageName(), PackageManager.GET_META_DATA).metaData.getInt("com.alibaba.app.appkey"),
getPackageManager().getApplicationInfo(getPackageName(), PackageManager.GET_META_DATA).metaData.getString("com.alibaba.app.appsecret"));
MANRestfulRawEditionUpload.main(getPackageManager().getApplicationInfo(getPackageName(), PackageManager.GET_META_DATA).metaData.getInt("com.alibaba.app.appkey"),
MANApiRawEditionUpload.main(getPackageManager().getApplicationInfo(getPackageName(), PackageManager.GET_META_DATA).metaData.getInt("com.alibaba.app.appkey"),
getPackageManager().getApplicationInfo(getPackageName(), PackageManager.GET_META_DATA).metaData.getString("com.alibaba.app.appsecret"));
} catch (Exception e) {
e.printStackTrace();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package alibaba.man_restful_demo;
package alibaba.man_api_demo;

import java.io.BufferedReader;
import java.io.File;
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<resources>
<string name="app_name">mas_restful_demo</string>
<string name="app_name">man_api_demo</string>

<string name="hello_world">Hello world!</string>
<string name="action_settings">Settings</string>
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion settings.gradle
Original file line number Diff line number Diff line change
@@ -1 +1 @@
include ':oss_android_demo', ':man_android_demo', ':man_restful_demo', ':mac_android_demo', ':ots_android_demo', ':httpdns_api_demo', ':httpdns_android_demo'
include ':oss_android_demo', ':man_android_demo', ':man_api_demo', ':mac_android_demo', ':ots_android_demo', ':httpdns_api_demo', ':httpdns_android_demo'

0 comments on commit 9d8875a

Please sign in to comment.