Thundernerd / gtr-client

Typed API endpoints for Zeepkist GTR

Home Page:https://npmjs.com/package/@zeepkist/gtr-api

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

GTR API

Fully typed TypeScript API client for the GTR API.

Up-to-date with v0.16.2 of the GTR API.

Usage

CDN

<script type="module">
  import { getRecords } from 'https://esm.run/@zeepkist/gtr-api'
  
  async function displayRecords() {
    const records = await getRecords({
      BestOnly: true
    })
  
    console.log(records) // { totalAmount: 700, records: [{ ... }] }
  }
  
  displayRecords()
</script>

Deno

import { getRecords } from 'https://esm.run/@zeepkist/gtr-api'

const records = await getRecords({
  BestOnly: true
})

console.log(records) // { totalAmount: 700, records: [{ ... }] }

Node / Bundlers

Install dependencies

yarn add @zeepkist/gtr-api

# or with npm:
npm install @zeepkist/gtr-api

Import and use

import { getRecords } from '@zeepkist/gtr-api'

const records = await getRecords({
  BestOnly: true
})

console.log(records) // { totalAmount: 700, records: [{ ... }] }

To see all available exports and options, see the package documentation.

Contributing

First-time Project Setup

yarn
yarn dlx @yarnpkg/sdks vscode

Compile and Hot-Reload for Development

yarn dev

Type-Check, Compile and Minify for Production

yarn build

Run tests

yarn test

Run tests with code coverage

yarn coverage

Lint with ESLint

yarn lint

About

Typed API endpoints for Zeepkist GTR

https://npmjs.com/package/@zeepkist/gtr-api

License:MIT License


Languages

Language:TypeScript 90.5%Language:JavaScript 9.5%