@metahkg/api
TypeScript icon, indicating that this package has built-in type declarations

6.15.1 • Public • Published

Metahkg Api

Client for the metahkg server. Generated with the openapi spec using nswag.

Regenerate

yarn generate

Install

yarn add @metahkg/api

Usage

Function names are based on operationIds.
For example, if the operationId is commentCreate, you can use api.commentCreate.

For operationIds of requests see api docs.

import { Client } from "@metahkg/api";

const axios = Axios.create();

axios.interceptors.request.use((config) => {
    const token = localStorage.getItem("token");
    if (token && config.headers) config.headers.Authorization = `Bearer ${token}`;
    return config;
});

axios.interceptors.response.use((response) => {
    if (response.headers.token) localStorage.setItem("token", response.headers.token);
    return response;
});

const api = new Client("https://dev.metahkg.org/api", axios);

api
  .thread(1)
  .then(console.log)
  .catch(console.error);

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
6.15.1-dev5dev
6.15.15latest

Version History

VersionDownloads (Last 7 Days)Published
6.15.15
6.15.1-dev5
6.15.0-dev0
6.14.1-dev0
6.14.0-dev0
6.13.3-dev0
6.13.2-dev0
6.13.1-dev0
6.13.0-dev0
6.12.4-dev0
6.12.2-dev1
6.12.1-dev0
6.12.0-dev0
6.11.9-2-dev0
6.11.9-1-dev0
6.11.9-dev0
6.11.8-dev0
6.11.7-1-dev0
6.11.7-dev0
6.11.5-dev0
6.11.3-dev0
6.11.2-dev0
6.11.1-dev0
6.11.0-dev0
6.9.10
6.10.0-dev0
6.9.1-dev0
6.9.0-1-dev0
6.8.0-dev0
6.9.0-dev0
6.7.0-dev0
6.6.1-dev0
6.6.0-dev0
6.5.0-dev0
6.4.1-dev0
6.4.10
6.4.0-dev0
6.3.20
6.3.2-dev0
6.2.0-dev0
6.1.0-dev0
6.0.0-dev0
5.10.0-dev0
5.9.0-10
5.7.40
5.9.00
5.9.0-dev0
5.8.0-dev0
5.7.3-20
5.7.3-2-dev0
5.6.1-20
5.7.3-dev0
5.7.3-1-dev0
5.7.2-dev0
5.7.1-dev0
5.7.0-dev0
5.6.10
5.6.1-dev0
5.5.1-dev0
5.5.0-1-dev0
5.5.0-dev0
5.4.0-dev0
5.3.0-dev0
5.2.1-1-dev0
5.2.1-dev0
5.1.32
5.1.3-dev0
5.1.2-dev0
5.1.10
5.1.1-dev0
5.1.0-dev0
5.0.0-dev0
4.8.00
4.8.0-dev0
4.7.0-2-dev0
4.7.0-1-dev0
4.7.0-dev0
4.6.2-dev0
4.6.0-dev0
4.5.0-dev0
4.4.0-1-dev0
4.4.0-dev0
4.3.0-dev0
4.2.00
4.2.0-1-dev0
4.2.0-dev0
4.1.0-dev0
4.0.0-7-dev0
4.0.0-6-dev0
4.0.0-10
4.0.00
4.0.0-5-dev0
4.0.0-4-dev0
4.0.0-3-dev0
4.0.0-2-dev0
4.0.0-1-dev0
4.0.0-dev0
3.5.0-dev0
3.4.80
3.4.8-dev0
3.4.70
3.4.7-dev0
3.4.6-dev0
3.4.5-dev0
3.4.4-dev0
3.4.3-dev0
3.4.2-dev0
3.4.0-dev0
3.3.1-1-dev0
3.3.1-10

Package Sidebar

Install

npm i @metahkg/api

Weekly Downloads

13

Version

6.15.1

License

MIT

Unpacked Size

1.15 MB

Total Files

13

Last publish

Collaborators

  • wc-yat