Skip to content

Latest commit

 

History

History
207 lines (134 loc) · 4.84 KB

HistoryApi.md

File metadata and controls

207 lines (134 loc) · 4.84 KB

SiigoAlliancesApi.HistoryApi

Method HTTP request Description
apiHistoryAllianceIdGet GET /api/history/{allianceId} Get last History by AllianceId
apiHistoryPost POST /api/history Register a History record for the AllianceID
apiRevokePost POST /api/revoke Register a Revoke record for the AllianceID

apiHistoryAllianceIdGet

HistoryDetailViewModel apiHistoryAllianceIdGet(allianceId)

Get last History by AllianceId

Example

- calls with promises

import * as SiigoAlliancesApi from 'siigo_alliances_api';

let apiInstance = new SiigoAlliancesApi.HistoryApi();

let allianceId = "allianceId_example"; // String | 

apiInstance.apiHistoryAllianceIdGet(allianceId).then((data) => {
  console.log('API called successfully. Returned data: ' + data);
}, (error) => {
  console.error(error);
});

- calls with async await

import * as SiigoAlliancesApi from 'siigo_alliances_api';

async function main(){
  try {
    let apiInstance = new SiigoAlliancesApi.HistoryApi();
    let allianceId = "allianceId_example"; // String | 

    const data = await apiInstance.apiHistoryAllianceIdGet(allianceId);
    console.log('API called successfully. Returned data: ' + data);
  } catch (error) {
    console.error(error);
  }
}

Parameters

Name Type Description Notes
allianceId String

Return type

HistoryDetailViewModel

Authorization

Bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: text/plain, application/json, text/json

apiHistoryPost

HistoryViewModel apiHistoryPost(opts)

Register a History record for the AllianceID

Example

- calls with promises

import * as SiigoAlliancesApi from 'siigo_alliances_api';

let apiInstance = new SiigoAlliancesApi.HistoryApi();

let opts = {
  'createHistoryCommand': new SiigoAlliancesApi.CreateHistoryCommand() // CreateHistoryCommand | 
};

apiInstance.apiHistoryPost(opts).then((data) => {
  console.log('API called successfully. Returned data: ' + data);
}, (error) => {
  console.error(error);
});

- calls with async await

import * as SiigoAlliancesApi from 'siigo_alliances_api';

async function main(){
  try {
    let apiInstance = new SiigoAlliancesApi.HistoryApi();
    let opts = {
    'createHistoryCommand': new SiigoAlliancesApi.CreateHistoryCommand() // CreateHistoryCommand | 
    };

    const data = await apiInstance.apiHistoryPost(opts);
    console.log('API called successfully. Returned data: ' + data);
  } catch (error) {
    console.error(error);
  }
}

Parameters

Name Type Description Notes
createHistoryCommand CreateHistoryCommand [optional]

Return type

HistoryViewModel

Authorization

Bearer

HTTP request headers

  • Content-Type: application/json-patch+json, application/json, text/json, application/_*+json
  • Accept: text/plain, application/json, text/json

apiRevokePost

RevokeViewModel apiRevokePost(opts)

Register a Revoke record for the AllianceID

Example

- calls with promises

import * as SiigoAlliancesApi from 'siigo_alliances_api';

let apiInstance = new SiigoAlliancesApi.HistoryApi();

let opts = {
  'createRevokeCommand': new SiigoAlliancesApi.CreateRevokeCommand() // CreateRevokeCommand | 
};

apiInstance.apiRevokePost(opts).then((data) => {
  console.log('API called successfully. Returned data: ' + data);
}, (error) => {
  console.error(error);
});

- calls with async await

import * as SiigoAlliancesApi from 'siigo_alliances_api';

async function main(){
  try {
    let apiInstance = new SiigoAlliancesApi.HistoryApi();
    let opts = {
    'createRevokeCommand': new SiigoAlliancesApi.CreateRevokeCommand() // CreateRevokeCommand | 
    };

    const data = await apiInstance.apiRevokePost(opts);
    console.log('API called successfully. Returned data: ' + data);
  } catch (error) {
    console.error(error);
  }
}

Parameters

Name Type Description Notes
createRevokeCommand CreateRevokeCommand [optional]

Return type

RevokeViewModel

Authorization

Bearer

HTTP request headers

  • Content-Type: application/json-patch+json, application/json, text/json, application/_*+json
  • Accept: text/plain, application/json, text/json