mirror of https://github.com/vernonkeenan/lib
121 lines
3.1 KiB
Markdown
121 lines
3.1 KiB
Markdown
# SfGate.AssetsApi
|
|
|
|
All URIs are relative to *http://sf-gate.vernonkeenan.com:8080/v1*
|
|
|
|
Method | HTTP request | Description
|
|
------------- | ------------- | -------------
|
|
[**getAssets**](AssetsApi.md#getAssets) | **GET** /assets | Get a list of assets
|
|
[**postAssets**](AssetsApi.md#postAssets) | **POST** /assets | Add a new asset to Taxnexus
|
|
|
|
|
|
|
|
## getAssets
|
|
|
|
> AssetResponse getAssets(opts)
|
|
|
|
Get a list of assets
|
|
|
|
Return a list of all available Assets
|
|
|
|
### Example
|
|
|
|
```javascript
|
|
import SfGate from 'sf_gate';
|
|
let defaultClient = SfGate.ApiClient.instance;
|
|
// Configure API key authorization: ApiKeyAuth
|
|
let ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
|
|
ApiKeyAuth.apiKey = 'YOUR API KEY';
|
|
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
|
//ApiKeyAuth.apiKeyPrefix = 'Token';
|
|
|
|
let apiInstance = new SfGate.AssetsApi();
|
|
let opts = {
|
|
'limit': 789, // Number | How many objects to return at one time
|
|
'offset': 789, // Number | How many objects to skip?
|
|
'active': true, // Boolean | Only retrieve active records?
|
|
'assetId': "assetId_example" // String | Taxnexus Record Id of an Asset
|
|
};
|
|
apiInstance.getAssets(opts, (error, data, response) => {
|
|
if (error) {
|
|
console.error(error);
|
|
} else {
|
|
console.log('API called successfully. Returned data: ' + data);
|
|
}
|
|
});
|
|
```
|
|
|
|
### Parameters
|
|
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**limit** | **Number**| How many objects to return at one time | [optional]
|
|
**offset** | **Number**| How many objects to skip? | [optional]
|
|
**active** | **Boolean**| Only retrieve active records? | [optional]
|
|
**assetId** | **String**| Taxnexus Record Id of an Asset | [optional]
|
|
|
|
### Return type
|
|
|
|
[**AssetResponse**](AssetResponse.md)
|
|
|
|
### Authorization
|
|
|
|
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
|
|
|
### HTTP request headers
|
|
|
|
- **Content-Type**: Not defined
|
|
- **Accept**: application/json
|
|
|
|
|
|
## postAssets
|
|
|
|
> AssetResponse postAssets(assetRequest)
|
|
|
|
Add a new asset to Taxnexus
|
|
|
|
Industry record to be added
|
|
|
|
### Example
|
|
|
|
```javascript
|
|
import SfGate from 'sf_gate';
|
|
let defaultClient = SfGate.ApiClient.instance;
|
|
// Configure API key authorization: ApiKeyAuth
|
|
let ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
|
|
ApiKeyAuth.apiKey = 'YOUR API KEY';
|
|
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
|
//ApiKeyAuth.apiKeyPrefix = 'Token';
|
|
|
|
let apiInstance = new SfGate.AssetsApi();
|
|
let assetRequest = new SfGate.AssetRequest(); // AssetRequest | An array of new Asset records
|
|
apiInstance.postAssets(assetRequest, (error, data, response) => {
|
|
if (error) {
|
|
console.error(error);
|
|
} else {
|
|
console.log('API called successfully. Returned data: ' + data);
|
|
}
|
|
});
|
|
```
|
|
|
|
### Parameters
|
|
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**assetRequest** | [**AssetRequest**](AssetRequest.md)| An array of new Asset records |
|
|
|
|
### Return type
|
|
|
|
[**AssetResponse**](AssetResponse.md)
|
|
|
|
### Authorization
|
|
|
|
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
|
|
|
### HTTP request headers
|
|
|
|
- **Content-Type**: application/json
|
|
- **Accept**: application/json
|
|
|