# VmosoApi.PushApi

All URIs are relative to *https://www.vmoso.com/svc*

Method | HTTP request | Description
------------- | ------------- | -------------
[**getLegacyConfig**](PushApi.md#getLegacyConfig) | **GET** /resources/push/config | 
[**getPushConfig**](PushApi.md#getPushConfig) | **GET** /push/getconfig | 
[**getToken**](PushApi.md#getToken) | **GET** /push/token | 
[**getTokens**](PushApi.md#getTokens) | **GET** /push/tokens | 


<a name="getLegacyConfig"></a>
# **getLegacyConfig**
> GetLegacyConfigResult getLegacyConfig



Use this API to get the push configuration for receiving the push which was sent from the server.

### Example
```javascript
var VmosoApi = require('vmoso-api');
var defaultClient = VmosoApi.ApiClient.default;

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

var apiInstance = new VmosoApi.PushApi()

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

### Parameters
This endpoint does not need any parameter.

### Return type

[**GetLegacyConfigResult**](GetLegacyConfigResult.md)

### Authorization

[vmoso_auth](../README.md#vmoso_auth)

### HTTP reuqest headers

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

<a name="getPushConfig"></a>
# **getPushConfig**
> GetPushConfigResult getPushConfig(protocol)



Use this API to get the push configuration information.

### Example
```javascript
var VmosoApi = require('vmoso-api');
var defaultClient = VmosoApi.ApiClient.default;

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

var apiInstance = new VmosoApi.PushApi()

var protocol = "protocol_example"; // {String} Websocket protocol. Options are: wss or ws


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

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **protocol** | **String**| Websocket protocol. Options are: wss or ws | 

### Return type

[**GetPushConfigResult**](GetPushConfigResult.md)

### Authorization

[vmoso_auth](../README.md#vmoso_auth)

### HTTP reuqest headers

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

<a name="getToken"></a>
# **getToken**
> GetTokenResult getToken(key)



Use this API to get a token.

### Example
```javascript
var VmosoApi = require('vmoso-api');
var defaultClient = VmosoApi.ApiClient.default;

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

var apiInstance = new VmosoApi.PushApi()

var key = "key_example"; // {String} key that token is for.


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

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **key** | **String**| key that token is for. | 

### Return type

[**GetTokenResult**](GetTokenResult.md)

### Authorization

[vmoso_auth](../README.md#vmoso_auth)

### HTTP reuqest headers

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

<a name="getTokens"></a>
# **getTokens**
> GetTokensResult getTokens(keys)



Use this API to get multiple tokens.

### Example
```javascript
var VmosoApi = require('vmoso-api');
var defaultClient = VmosoApi.ApiClient.default;

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

var apiInstance = new VmosoApi.PushApi()

var keys = ["keys_example"]; // {[String]} Keys that tokens are for.


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

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **keys** | [**[String]**](String.md)| Keys that tokens are for. | 

### Return type

[**GetTokensResult**](GetTokensResult.md)

### Authorization

[vmoso_auth](../README.md#vmoso_auth)

### HTTP reuqest headers

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

