API Request

Last Updated on : 2024-06-05 03:14:36download

This topic describes the method that is used to get information about a specified API.

Name

TYSdk.apiRequest()

Description

Get information about a specified API. API versions 2.x and 4.x are supported.

Request parameter

Parameter Data type Description Required
a string The name of the API to be queried. Yes
postData object The parameters that are required in the API request. Yes
version string The API version. No

Sample request

// Version 4.x TYSdk.apiRequest(a, postData, version) .then(data => console.log('data',data); ) .catch(error => console.log('error',error); ); // Version 2.x TYSdk.apiRequest({ a, postData, v, }) .then(data => { console.log('data :>> ', data); }) .catch(error => { console.log('error :>> ', error); });