lib/client/research/docs/TopicApi.md

4.0 KiB

Research.TopicApi

All URIs are relative to http://research.vernonkeenan.com:8080/v1

Method HTTP request Description
getTopics GET /topics Get Topic records
getTopicsObservable GET /topics/observable Get Taxnexus Companies in an observable array
postTopics POST /topics Add new companies

getTopics

TopicResponse getTopics(opts)

Get Topic records

Retrieve Topic records from the datastore

Example

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

Authorization

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

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]**

Authorization

ApiKeyAuth

HTTP request headers

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

postTopics

TopicResponse postTopics(topicRequest)

Add new companies

Add new companies

Example

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 An array of new Topic records

Return type

TopicResponse

Authorization

ApiKeyAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json