# ps.module.PackageApi

All URIs are relative to */*

Method | HTTP request | Description
------------- | ------------- | -------------
[**apiVersionPackageGet**](PackageApi.md#apiVersionPackageGet) | **GET** /api/{version}/package | Returns a list of your package(s).
[**apiVersionPackageIdDelete**](PackageApi.md#apiVersionPackageIdDelete) | **DELETE** /api/{version}/package/{id} | Delete existing package.
[**apiVersionPackageIdGet**](PackageApi.md#apiVersionPackageIdGet) | **GET** /api/{version}/package/{id} | Retrieves the details of an existing package.
[**apiVersionPackageIdPut**](PackageApi.md#apiVersionPackageIdPut) | **PUT** /api/{version}/package/{id} | Updates the specific package.
[**apiVersionPackagePost**](PackageApi.md#apiVersionPackagePost) | **POST** /api/{version}/package | Create Package

<a name="apiVersionPackageGet"></a>
# **apiVersionPackageGet**
> apiVersionPackageGet(version, opts)

Returns a list of your package(s).

### Example
```javascript
import ps.module from 'phonespeakv2_api';
let defaultClient = ps.module.ApiClient.instance;

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

let apiInstance = new ps.module.PackageApi();
let version = "version_example"; // String | 
let opts = { 
  'country': new ps.module.PhoneSpeakEntitiesEnumsCountry(), // PhoneSpeakEntitiesEnumsCountry | 
  'sortBy': "sortBy_example", // String | 
  'direction': new ps.module.PhoneSpeakEntitiesEnumsListDirection(), // PhoneSpeakEntitiesEnumsListDirection | 
  'search': "search_example", // String | 
  'limit': 56, // Number | 
  'pageNum': 56 // Number | 
};
apiInstance.apiVersionPackageGet(version, opts, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
});
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **version** | **String**|  | 
 **country** | [**PhoneSpeakEntitiesEnumsCountry**](.md)|  | [optional] 
 **sortBy** | **String**|  | [optional] 
 **direction** | [**PhoneSpeakEntitiesEnumsListDirection**](.md)|  | [optional] 
 **search** | **String**|  | [optional] 
 **limit** | **Number**|  | [optional] 
 **pageNum** | **Number**|  | [optional] 

### Return type

null (empty response body)

### Authorization

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

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: Not defined

<a name="apiVersionPackageIdDelete"></a>
# **apiVersionPackageIdDelete**
> apiVersionPackageIdDelete(id, version)

Delete existing package.

### Example
```javascript
import ps.module from 'phonespeakv2_api';
let defaultClient = ps.module.ApiClient.instance;

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

let apiInstance = new ps.module.PackageApi();
let id = "id_example"; // String | 
let version = "version_example"; // String | 

apiInstance.apiVersionPackageIdDelete(id, version, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
});
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **id** | **String**|  | 
 **version** | **String**|  | 

### Return type

null (empty response body)

### Authorization

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

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: Not defined

<a name="apiVersionPackageIdGet"></a>
# **apiVersionPackageIdGet**
> apiVersionPackageIdGet(id, version)

Retrieves the details of an existing package.

### Example
```javascript
import ps.module from 'phonespeakv2_api';
let defaultClient = ps.module.ApiClient.instance;

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

let apiInstance = new ps.module.PackageApi();
let id = "id_example"; // String | 
let version = "version_example"; // String | 

apiInstance.apiVersionPackageIdGet(id, version, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
});
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **id** | **String**|  | 
 **version** | **String**|  | 

### Return type

null (empty response body)

### Authorization

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

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: Not defined

<a name="apiVersionPackageIdPut"></a>
# **apiVersionPackageIdPut**
> apiVersionPackageIdPut(idversion)

Updates the specific package.

### Example
```javascript
import ps.module from 'phonespeakv2_api';
let defaultClient = ps.module.ApiClient.instance;

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

let apiInstance = new ps.module.PackageApi();
let id = "id_example"; // String | 
let version = "version_example"; // String | 

apiInstance.apiVersionPackageIdPut(idversion, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
});
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **id** | **String**|  | 
 **version** | **String**|  | 
 **body** | [**PhoneSpeakServiceCorePackagesUpdatePackageQuery**](PhoneSpeakServiceCorePackagesUpdatePackageQuery.md)|  | [optional] 

### Return type

null (empty response body)

### Authorization

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

### HTTP request headers

 - **Content-Type**: audio/x-wav, text/plain, application/octet-stream, application/json-patch+json, application/json, text/json, application/_*+json, application/xml, text/xml, application/_*+xml
 - **Accept**: Not defined

<a name="apiVersionPackagePost"></a>
# **apiVersionPackagePost**
> apiVersionPackagePost(version)

Create Package

### Example
```javascript
import ps.module from 'phonespeakv2_api';
let defaultClient = ps.module.ApiClient.instance;

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

let apiInstance = new ps.module.PackageApi();
let version = "version_example"; // String | 

apiInstance.apiVersionPackagePost(version, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
});
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **version** | **String**|  | 
 **body** | [**PhoneSpeakServiceCorePackagesCreatePackageQuery**](PhoneSpeakServiceCorePackagesCreatePackageQuery.md)|  | [optional] 

### Return type

null (empty response body)

### Authorization

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

### HTTP request headers

 - **Content-Type**: audio/x-wav, text/plain, application/octet-stream, application/json-patch+json, application/json, text/json, application/_*+json, application/xml, text/xml, application/_*+xml
 - **Accept**: Not defined

