bindDevice
设备绑定,由H5触发APP调用.
/api/app/device/_bind
Usage and SDK Samples
curl -X POST "http://127.0.0.1:42135/api/app/device/_bind"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.APPApi;
import java.io.File;
import java.util.*;
public class APPApiExample {
public static void main(String[] args) {
APPApi apiInstance = new APPApi();
Integer userId = 56; // Integer | 用户ID
String appVersion = appVersion_example; // String | app版本号
String sdkVersion = sdkVersion_example; // String | sdk版本号
String idfa = idfa_example; // String | idfa
String osVersion = osVersion_example; // String | 苹果系统版本
String sign = sign_example; // String | 签名, md5(userId+appVersion... +$token), app需要验证签名
try {
DefaultResponse result = apiInstance.bindDevice(userId, appVersion, sdkVersion, idfa, osVersion, sign);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling APPApi#bindDevice");
e.printStackTrace();
}
}
}
import io.swagger.client.api.APPApi;
public class APPApiExample {
public static void main(String[] args) {
APPApi apiInstance = new APPApi();
Integer userId = 56; // Integer | 用户ID
String appVersion = appVersion_example; // String | app版本号
String sdkVersion = sdkVersion_example; // String | sdk版本号
String idfa = idfa_example; // String | idfa
String osVersion = osVersion_example; // String | 苹果系统版本
String sign = sign_example; // String | 签名, md5(userId+appVersion... +$token), app需要验证签名
try {
DefaultResponse result = apiInstance.bindDevice(userId, appVersion, sdkVersion, idfa, osVersion, sign);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling APPApi#bindDevice");
e.printStackTrace();
}
}
}
Integer *userId = 56; // 用户ID
String *appVersion = appVersion_example; // app版本号
String *sdkVersion = sdkVersion_example; // sdk版本号
String *idfa = idfa_example; // idfa
String *osVersion = osVersion_example; // 苹果系统版本
String *sign = sign_example; // 签名, md5(userId+appVersion... +$token), app需要验证签名
APPApi *apiInstance = [[APPApi alloc] init];
// 设备绑定,由H5触发APP调用.
[apiInstance bindDeviceWith:userId
appVersion:appVersion
sdkVersion:sdkVersion
idfa:idfa
osVersion:osVersion
sign:sign
completionHandler: ^(DefaultResponse output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
var ServerApi = require('server_api');
var api = new ServerApi.APPApi()
var userId = 56; // {Integer} 用户ID
var appVersion = appVersion_example; // {String} app版本号
var sdkVersion = sdkVersion_example; // {String} sdk版本号
var idfa = idfa_example; // {String} idfa
var osVersion = osVersion_example; // {String} 苹果系统版本
var sign = sign_example; // {String} 签名, md5(userId+appVersion... +$token), app需要验证签名
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
api.bindDevice(userId, appVersion, sdkVersion, idfa, osVersion, sign, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;
namespace Example
{
public class bindDeviceExample
{
public void main()
{
var apiInstance = new APPApi();
var userId = 56; // Integer | 用户ID
var appVersion = appVersion_example; // String | app版本号
var sdkVersion = sdkVersion_example; // String | sdk版本号
var idfa = idfa_example; // String | idfa
var osVersion = osVersion_example; // String | 苹果系统版本
var sign = sign_example; // String | 签名, md5(userId+appVersion... +$token), app需要验证签名
try
{
// 设备绑定,由H5触发APP调用.
DefaultResponse result = apiInstance.bindDevice(userId, appVersion, sdkVersion, idfa, osVersion, sign);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling APPApi.bindDevice: " + e.Message );
}
}
}
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$api_instance = new Swagger\Client\Api\APPApi();
$userId = 56; // Integer | 用户ID
$appVersion = appVersion_example; // String | app版本号
$sdkVersion = sdkVersion_example; // String | sdk版本号
$idfa = idfa_example; // String | idfa
$osVersion = osVersion_example; // String | 苹果系统版本
$sign = sign_example; // String | 签名, md5(userId+appVersion... +$token), app需要验证签名
try {
$result = $api_instance->bindDevice($userId, $appVersion, $sdkVersion, $idfa, $osVersion, $sign);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling APPApi->bindDevice: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::APPApi;
my $api_instance = WWW::SwaggerClient::APPApi->new();
my $userId = 56; # Integer | 用户ID
my $appVersion = appVersion_example; # String | app版本号
my $sdkVersion = sdkVersion_example; # String | sdk版本号
my $idfa = idfa_example; # String | idfa
my $osVersion = osVersion_example; # String | 苹果系统版本
my $sign = sign_example; # String | 签名, md5(userId+appVersion... +$token), app需要验证签名
eval {
my $result = $api_instance->bindDevice(userId => $userId, appVersion => $appVersion, sdkVersion => $sdkVersion, idfa => $idfa, osVersion => $osVersion, sign => $sign);
print Dumper($result);
};
if ($@) {
warn "Exception when calling APPApi->bindDevice: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = swagger_client.APPApi()
userId = 56 # Integer | 用户ID
appVersion = appVersion_example # String | app版本号
sdkVersion = sdkVersion_example # String | sdk版本号
idfa = idfa_example # String | idfa
osVersion = osVersion_example # String | 苹果系统版本
sign = sign_example # String | 签名, md5(userId+appVersion... +$token), app需要验证签名
try:
# 设备绑定,由H5触发APP调用.
api_response = api_instance.bind_device(userId, appVersion, sdkVersion, idfa, osVersion, sign)
pprint(api_response)
except ApiException as e:
print("Exception when calling APPApi->bindDevice: %s\n" % e)
Parameters
Form parameters
Name | Description |
---|---|
userId* |
Integer
用户ID
Required
|
appVersion* |
String
app版本号
Required
|
sdkVersion* |
String
sdk版本号
Required
|
idfa* |
String
idfa
Required
|
osVersion* |
String
苹果系统版本
Required
|
sign* |
String
签名, md5(userId+appVersion... +$token), app需要验证签名
Required
|