# CampaignApIs.WechatApi

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

Method | HTTP request | Description
------------- | ------------- | -------------
[**wechatAccessToken**](WechatApi.md#wechatAccessToken) | **GET** /Wechat/AccessToken | 获取微信 Access Token
[**wechatGetUserInfo**](WechatApi.md#wechatGetUserInfo) | **GET** /Wechat/GetUserInfo | 用户信息
[**wechatHeaderImage**](WechatApi.md#wechatHeaderImage) | **POST** /Wechat/HeaderImage | 下载微信头像
[**wechatMiniProgramLogin**](WechatApi.md#wechatMiniProgramLogin) | **GET** /Wechat/MiniProgramLogin | 登录微信小程序
[**wechatMiniProgramSession**](WechatApi.md#wechatMiniProgramSession) | **GET** /Wechat/MiniProgramSession | 解码微信小程序信息
[**wechatShareSignature**](WechatApi.md#wechatShareSignature) | **GET** /Wechat/ShareSignature | 朋友圈分享签名


<a name="wechatAccessToken"></a>
# **wechatAccessToken**
> ApiResultWechatAccessToken wechatAccessToken(opts)

获取微信 Access Token

### 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.WechatApi();

var opts = { 
  'appTag': 56, // Number | 
  'code': "code_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.wechatAccessToken(opts, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **appTag** | **Number**|  | [optional] 
 **code** | **String**|  | [optional] 
 **apiVersion** | **String**|  | [optional] 

### Return type

[**ApiResultWechatAccessToken**](ApiResultWechatAccessToken.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="wechatGetUserInfo"></a>
# **wechatGetUserInfo**
> ApiResultUserInfo wechatGetUserInfo(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.WechatApi();

var opts = { 
  'appTag': 56, // Number | 
  'code': "code_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.wechatGetUserInfo(opts, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **appTag** | **Number**|  | [optional] 
 **code** | **String**|  | [optional] 
 **apiVersion** | **String**|  | [optional] 

### Return type

[**ApiResultUserInfo**](ApiResultUserInfo.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="wechatHeaderImage"></a>
# **wechatHeaderImage**
> ApiResultString wechatHeaderImage(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.WechatApi();

var opts = { 
  'userId': "userId_example", // String | 
  'imageUrl': "imageUrl_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.wechatHeaderImage(opts, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **userId** | **String**|  | [optional] 
 **imageUrl** | **String**|  | [optional] 
 **apiVersion** | **String**|  | [optional] 

### Return type

[**ApiResultString**](ApiResultString.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="wechatMiniProgramLogin"></a>
# **wechatMiniProgramLogin**
> ApiResultMiniProgramSession wechatMiniProgramLogin(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.WechatApi();

var opts = { 
  'code': "code_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.wechatMiniProgramLogin(opts, callback);
```

### Parameters

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

### Return type

[**ApiResultMiniProgramSession**](ApiResultMiniProgramSession.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="wechatMiniProgramSession"></a>
# **wechatMiniProgramSession**
> ApiResultMiniProgramSession wechatMiniProgramSession(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.WechatApi();

var opts = { 
  'token': "token_example", // String | 
  'encryptedData': "encryptedData_example", // String | 
  'iv': "iv_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.wechatMiniProgramSession(opts, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **token** | **String**|  | [optional] 
 **encryptedData** | **String**|  | [optional] 
 **iv** | **String**|  | [optional] 
 **apiVersion** | **String**|  | [optional] 

### Return type

[**ApiResultMiniProgramSession**](ApiResultMiniProgramSession.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="wechatShareSignature"></a>
# **wechatShareSignature**
> ApiResultWechatCustomShare wechatShareSignature(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.WechatApi();

var opts = { 
  'appTag': 56, // Number | 
  'url': "url_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.wechatShareSignature(opts, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **appTag** | **Number**|  | [optional] 
 **url** | **String**|  | [optional] 
 **apiVersion** | **String**|  | [optional] 

### Return type

[**ApiResultWechatCustomShare**](ApiResultWechatCustomShare.md)

### Authorization

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

### HTTP request headers

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

