# CampaignApIs.GeneralApi

All URIs are relative to *https://campaigncore-gameresourcev5.chinacloudsites.cn*

Method | HTTP request | Description
------------- | ------------- | -------------
[**generalCheckIn**](GeneralApi.md#generalCheckIn) | **POST** /General/CheckIn | 地点打卡
[**generalCheckInRanking**](GeneralApi.md#generalCheckInRanking) | **GET** /General/CheckInRanking | 打卡排名
[**generalIndividualRanking**](GeneralApi.md#generalIndividualRanking) | **GET** /General/IndividualRanking | 用户个人排名
[**generalPostRanking**](GeneralApi.md#generalPostRanking) | **POST** /General/PostRanking | 新增/更新得分
[**generalRanking**](GeneralApi.md#generalRanking) | **GET** /General/GetRanking | 排行榜
[**generalSendSms**](GeneralApi.md#generalSendSms) | **POST** /General/SendSms | 发送短信  （服务商：https://sendcloud.sohu.com）
[**generalUploadImage**](GeneralApi.md#generalUploadImage) | **POST** /General/UploadImage | 上传照片
[**generalVerifyPhone**](GeneralApi.md#generalVerifyPhone) | **POST** /General/VerifyPhone | 验证手机号


<a name="generalCheckIn"></a>
# **generalCheckIn**
> ApiResultBoolean generalCheckIn(opts)

地点打卡

### Example
```javascript
var CampaignApIs = require('campaign_ap_is');
var defaultClient = CampaignApIs.ApiClient.instance;

// Configure API key authorization: AccessToken
var AccessToken = defaultClient.authentications['AccessToken'];
AccessToken.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//AccessToken.apiKeyPrefix = 'Token';

// Configure OAuth2 access token for authorization: OAuth2
var OAuth2 = defaultClient.authentications['OAuth2'];
OAuth2.accessToken = 'YOUR ACCESS TOKEN';

// Configure API key authorization: SubscriptionKey
var SubscriptionKey = defaultClient.authentications['SubscriptionKey'];
SubscriptionKey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//SubscriptionKey.apiKeyPrefix = 'Token';

var apiInstance = new CampaignApIs.GeneralApi();

var opts = { 
  'value': new CampaignApIs.CheckinModel(), // CheckinModel | 
  'apiVersion': "apiVersion_example" // String | 
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.generalCheckIn(opts, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **value** | [**CheckinModel**](CheckinModel.md)|  | [optional] 
 **apiVersion** | **String**|  | [optional] 

### Return type

[**ApiResultBoolean**](ApiResultBoolean.md)

### Authorization

[AccessToken](../README.md#AccessToken), [OAuth2](../README.md#OAuth2), [SubscriptionKey](../README.md#SubscriptionKey)

### HTTP request headers

 - **Content-Type**: application/json-patch+json, application/json, text/json, application/_*+json
 - **Accept**: application/json

<a name="generalCheckInRanking"></a>
# **generalCheckInRanking**
> ApiResultCheckinModel generalCheckInRanking(opts)

打卡排名

### Example
```javascript
var CampaignApIs = require('campaign_ap_is');
var defaultClient = CampaignApIs.ApiClient.instance;

// Configure API key authorization: AccessToken
var AccessToken = defaultClient.authentications['AccessToken'];
AccessToken.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//AccessToken.apiKeyPrefix = 'Token';

// Configure OAuth2 access token for authorization: OAuth2
var OAuth2 = defaultClient.authentications['OAuth2'];
OAuth2.accessToken = 'YOUR ACCESS TOKEN';

// Configure API key authorization: SubscriptionKey
var SubscriptionKey = defaultClient.authentications['SubscriptionKey'];
SubscriptionKey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//SubscriptionKey.apiKeyPrefix = 'Token';

var apiInstance = new CampaignApIs.GeneralApi();

var opts = { 
  'gameId': "gameId_example", // String | 
  'instanceId': 789, // Number | 
  'userId': "userId_example", // String | 
  'platform': 56, // Number | 
  'apiVersion': "apiVersion_example" // String | 
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.generalCheckInRanking(opts, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **gameId** | [**String**](.md)|  | [optional] 
 **instanceId** | **Number**|  | [optional] 
 **userId** | **String**|  | [optional] 
 **platform** | **Number**|  | [optional] 
 **apiVersion** | **String**|  | [optional] 

### Return type

[**ApiResultCheckinModel**](ApiResultCheckinModel.md)

### Authorization

[AccessToken](../README.md#AccessToken), [OAuth2](../README.md#OAuth2), [SubscriptionKey](../README.md#SubscriptionKey)

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: application/json

<a name="generalIndividualRanking"></a>
# **generalIndividualRanking**
> RankingModel generalIndividualRanking(opts)

用户个人排名

### Example
```javascript
var CampaignApIs = require('campaign_ap_is');
var defaultClient = CampaignApIs.ApiClient.instance;

// Configure API key authorization: AccessToken
var AccessToken = defaultClient.authentications['AccessToken'];
AccessToken.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//AccessToken.apiKeyPrefix = 'Token';

// Configure OAuth2 access token for authorization: OAuth2
var OAuth2 = defaultClient.authentications['OAuth2'];
OAuth2.accessToken = 'YOUR ACCESS TOKEN';

// Configure API key authorization: SubscriptionKey
var SubscriptionKey = defaultClient.authentications['SubscriptionKey'];
SubscriptionKey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//SubscriptionKey.apiKeyPrefix = 'Token';

var apiInstance = new CampaignApIs.GeneralApi();

var opts = { 
  'gameId': "gameId_example", // String | 
  'instanceId': 789, // Number | 
  'userId': "userId_example", // String | 
  'platform': 56, // Number | 
  'nickName': "nickName_example", // String | 
  'headImgUrl': "headImgUrl_example", // String | 
  'apiVersion': "apiVersion_example" // String | 
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.generalIndividualRanking(opts, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **gameId** | [**String**](.md)|  | [optional] 
 **instanceId** | **Number**|  | [optional] 
 **userId** | **String**|  | [optional] 
 **platform** | **Number**|  | [optional] 
 **nickName** | **String**|  | [optional] 
 **headImgUrl** | **String**|  | [optional] 
 **apiVersion** | **String**|  | [optional] 

### Return type

[**RankingModel**](RankingModel.md)

### Authorization

[AccessToken](../README.md#AccessToken), [OAuth2](../README.md#OAuth2), [SubscriptionKey](../README.md#SubscriptionKey)

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: application/json

<a name="generalPostRanking"></a>
# **generalPostRanking**
> ApiResultBoolean generalPostRanking(opts)

新增/更新得分

### Example
```javascript
var CampaignApIs = require('campaign_ap_is');
var defaultClient = CampaignApIs.ApiClient.instance;

// Configure API key authorization: AccessToken
var AccessToken = defaultClient.authentications['AccessToken'];
AccessToken.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//AccessToken.apiKeyPrefix = 'Token';

// Configure OAuth2 access token for authorization: OAuth2
var OAuth2 = defaultClient.authentications['OAuth2'];
OAuth2.accessToken = 'YOUR ACCESS TOKEN';

// Configure API key authorization: SubscriptionKey
var SubscriptionKey = defaultClient.authentications['SubscriptionKey'];
SubscriptionKey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//SubscriptionKey.apiKeyPrefix = 'Token';

var apiInstance = new CampaignApIs.GeneralApi();

var opts = { 
  'value': new CampaignApIs.RankingModel(), // RankingModel | 
  'apiVersion': "apiVersion_example" // String | 
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.generalPostRanking(opts, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **value** | [**RankingModel**](RankingModel.md)|  | [optional] 
 **apiVersion** | **String**|  | [optional] 

### Return type

[**ApiResultBoolean**](ApiResultBoolean.md)

### Authorization

[AccessToken](../README.md#AccessToken), [OAuth2](../README.md#OAuth2), [SubscriptionKey](../README.md#SubscriptionKey)

### HTTP request headers

 - **Content-Type**: application/json-patch+json, application/json, text/json, application/_*+json
 - **Accept**: application/json

<a name="generalRanking"></a>
# **generalRanking**
> PagingResultRankingModel generalRanking(opts)

排行榜

### Example
```javascript
var CampaignApIs = require('campaign_ap_is');
var defaultClient = CampaignApIs.ApiClient.instance;

// Configure API key authorization: AccessToken
var AccessToken = defaultClient.authentications['AccessToken'];
AccessToken.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//AccessToken.apiKeyPrefix = 'Token';

// Configure OAuth2 access token for authorization: OAuth2
var OAuth2 = defaultClient.authentications['OAuth2'];
OAuth2.accessToken = 'YOUR ACCESS TOKEN';

// Configure API key authorization: SubscriptionKey
var SubscriptionKey = defaultClient.authentications['SubscriptionKey'];
SubscriptionKey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//SubscriptionKey.apiKeyPrefix = 'Token';

var apiInstance = new CampaignApIs.GeneralApi();

var opts = { 
  'gameId': "gameId_example", // String | 
  'instanceId': 789, // Number | 
  'skip': 56, // Number | 
  'take': 56, // Number | 
  'apiVersion': "apiVersion_example" // String | 
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.generalRanking(opts, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **gameId** | [**String**](.md)|  | [optional] 
 **instanceId** | **Number**|  | [optional] 
 **skip** | **Number**|  | [optional] 
 **take** | **Number**|  | [optional] 
 **apiVersion** | **String**|  | [optional] 

### Return type

[**PagingResultRankingModel**](PagingResultRankingModel.md)

### Authorization

[AccessToken](../README.md#AccessToken), [OAuth2](../README.md#OAuth2), [SubscriptionKey](../README.md#SubscriptionKey)

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: application/json

<a name="generalSendSms"></a>
# **generalSendSms**
> ApiResultBoolean generalSendSms(opts)

发送短信  （服务商：https://sendcloud.sohu.com）

&lt;label&gt;Client Scopes：&lt;/label&gt;  &lt;code&gt;campaign.apis.general.sendsms&lt;/code&gt;

### Example
```javascript
var CampaignApIs = require('campaign_ap_is');
var defaultClient = CampaignApIs.ApiClient.instance;

// Configure API key authorization: AccessToken
var AccessToken = defaultClient.authentications['AccessToken'];
AccessToken.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//AccessToken.apiKeyPrefix = 'Token';

// Configure OAuth2 access token for authorization: OAuth2
var OAuth2 = defaultClient.authentications['OAuth2'];
OAuth2.accessToken = 'YOUR ACCESS TOKEN';

// Configure API key authorization: SubscriptionKey
var SubscriptionKey = defaultClient.authentications['SubscriptionKey'];
SubscriptionKey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//SubscriptionKey.apiKeyPrefix = 'Token';

var apiInstance = new CampaignApIs.GeneralApi();

var opts = { 
  'value': new CampaignApIs.SendSmsRequest(), // SendSmsRequest | 
  'apiVersion': "apiVersion_example" // String | 
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.generalSendSms(opts, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **value** | [**SendSmsRequest**](SendSmsRequest.md)|  | [optional] 
 **apiVersion** | **String**|  | [optional] 

### Return type

[**ApiResultBoolean**](ApiResultBoolean.md)

### Authorization

[AccessToken](../README.md#AccessToken), [OAuth2](../README.md#OAuth2), [SubscriptionKey](../README.md#SubscriptionKey)

### HTTP request headers

 - **Content-Type**: application/json-patch+json, application/json, text/json, application/_*+json
 - **Accept**: application/json

<a name="generalUploadImage"></a>
# **generalUploadImage**
> ApiResultString generalUploadImage(opts)

上传照片

### Example
```javascript
var CampaignApIs = require('campaign_ap_is');
var defaultClient = CampaignApIs.ApiClient.instance;

// Configure API key authorization: AccessToken
var AccessToken = defaultClient.authentications['AccessToken'];
AccessToken.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//AccessToken.apiKeyPrefix = 'Token';

// Configure OAuth2 access token for authorization: OAuth2
var OAuth2 = defaultClient.authentications['OAuth2'];
OAuth2.accessToken = 'YOUR ACCESS TOKEN';

// Configure API key authorization: SubscriptionKey
var SubscriptionKey = defaultClient.authentications['SubscriptionKey'];
SubscriptionKey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//SubscriptionKey.apiKeyPrefix = 'Token';

var apiInstance = new CampaignApIs.GeneralApi();

var opts = { 
  'apiVersion': "apiVersion_example", // String | 
  'value': "/path/to/file.txt" // File | 
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.generalUploadImage(opts, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **apiVersion** | **String**|  | [optional] 
 **value** | **File**|  | [optional] 

### Return type

[**ApiResultString**](ApiResultString.md)

### Authorization

[AccessToken](../README.md#AccessToken), [OAuth2](../README.md#OAuth2), [SubscriptionKey](../README.md#SubscriptionKey)

### HTTP request headers

 - **Content-Type**: application/form-data
 - **Accept**: application/json

<a name="generalVerifyPhone"></a>
# **generalVerifyPhone**
> ApiResultBoolean generalVerifyPhone(opts)

验证手机号

### Example
```javascript
var CampaignApIs = require('campaign_ap_is');
var defaultClient = CampaignApIs.ApiClient.instance;

// Configure API key authorization: AccessToken
var AccessToken = defaultClient.authentications['AccessToken'];
AccessToken.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//AccessToken.apiKeyPrefix = 'Token';

// Configure OAuth2 access token for authorization: OAuth2
var OAuth2 = defaultClient.authentications['OAuth2'];
OAuth2.accessToken = 'YOUR ACCESS TOKEN';

// Configure API key authorization: SubscriptionKey
var SubscriptionKey = defaultClient.authentications['SubscriptionKey'];
SubscriptionKey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//SubscriptionKey.apiKeyPrefix = 'Token';

var apiInstance = new CampaignApIs.GeneralApi();

var opts = { 
  'value': new CampaignApIs.VerifyPhoneRequest(), // VerifyPhoneRequest | 
  'apiVersion': "apiVersion_example" // String | 
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.generalVerifyPhone(opts, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **value** | [**VerifyPhoneRequest**](VerifyPhoneRequest.md)|  | [optional] 
 **apiVersion** | **String**|  | [optional] 

### Return type

[**ApiResultBoolean**](ApiResultBoolean.md)

### Authorization

[AccessToken](../README.md#AccessToken), [OAuth2](../README.md#OAuth2), [SubscriptionKey](../README.md#SubscriptionKey)

### HTTP request headers

 - **Content-Type**: application/json-patch+json, application/json, text/json, application/_*+json
 - **Accept**: application/json

