lib/client/research/docs/TopicApi.md

169 lines
4.0 KiB
Markdown
Raw Normal View History

2022-09-03 21:10:56 +00:00
# Research.TopicApi
All URIs are relative to *http://research.vernonkeenan.com:8080/v1*
Method | HTTP request | Description
------------- | ------------- | -------------
[**getTopics**](TopicApi.md#getTopics) | **GET** /topics | Get Topic records
[**getTopicsObservable**](TopicApi.md#getTopicsObservable) | **GET** /topics/observable | Get Taxnexus Companies in an observable array
[**postTopics**](TopicApi.md#postTopics) | **POST** /topics | Add new companies
## getTopics
> TopicResponse getTopics(opts)
Get Topic records
Retrieve Topic records from the datastore
### Example
```javascript
import Research from 'research';
let defaultClient = Research.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 Research.TopicApi();
let opts = {
'topicId': "topicId_example" // String | Taxnexus Topic record ID
};
apiInstance.getTopics(opts, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**topicId** | **String**| Taxnexus Topic record ID | [optional]
### Return type
[**TopicResponse**](TopicResponse.md)
### Authorization
[ApiKeyAuth](../README.md#ApiKeyAuth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
## getTopicsObservable
> [Topic] getTopicsObservable(opts)
Get Taxnexus Companies in an observable array
A list of companies in a simple JSON array
### Example
```javascript
import Research from 'research';
let defaultClient = Research.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 Research.TopicApi();
let opts = {
'topicId': "topicId_example" // String | Taxnexus Topic record ID
};
apiInstance.getTopicsObservable(opts, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**topicId** | **String**| Taxnexus Topic record ID | [optional]
### Return type
[**[Topic]**](Topic.md)
### Authorization
[ApiKeyAuth](../README.md#ApiKeyAuth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
## postTopics
> TopicResponse postTopics(topicRequest)
Add new companies
Add new companies
### Example
```javascript
import Research from 'research';
let defaultClient = Research.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 Research.TopicApi();
let topicRequest = new Research.TopicRequest(); // TopicRequest | An array of new Topic records
apiInstance.postTopics(topicRequest, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**topicRequest** | [**TopicRequest**](TopicRequest.md)| An array of new Topic records |
### Return type
[**TopicResponse**](TopicResponse.md)
### Authorization
[ApiKeyAuth](../README.md#ApiKeyAuth)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json