Skip to content

Latest commit

 

History

History
39 lines (26 loc) · 756 Bytes

README.md

File metadata and controls

39 lines (26 loc) · 756 Bytes

tme-api-client

Simple TME API Client written in Typescript.

Installation:

npm add tme-api-client

Example usage:

import { AxiosError } from "axios";
import { TmeApiClient } from 'tme-api-client';

const token = 'put your token here';
const secret = 'put your secret here';

const client: TmeApiClient = new TmeApiClient(token, secret);

client.request('Products/GetProducts', {SymbolList: ['LEG-12']})
    .then(console.log)
    .catch((err: AxiosError) => console.log(err.response.data));

Not a TypeScript fan? Just use:

const TmeApiClient = require('tme-api-client').TmeApiClient;
const client = new TmeApiClient('...', '...');

License

MIT