Skip to content

Latest commit

 

History

9 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DrakorID Wrapper

A simple Node.JS API Wrapper for DrakorID

Note

This package is only use ECMAScript 6 or higher

Installation

using npm

npm i drakor-id-wrapper

using yarn

yarn add drakor-id-wrapper

github version

yarn add github:xct007/drakor-id-wrapper

Usage

// drakor-id-wrapper
import { latest, search, getCategory, getChannel, detail } from "drakor-id-wrapper";

// Get latest drakor
const latestDrakor = await latest();

// Search drakor
const searchDrakor = await search("drakor");

// Get category by category_id / cid
const opts = {
  page: 1,
  count: 10,
};
const category = await getCategory(1123, opts);

// Get channel by channel_id / chid
const opts = {
  page: 1,
  count: 10,
};
const channel = await getChannel(1234, opts);

// alternative way for getChannel/getCategory
const c_ch_id = 1234;
const data = await detail(c_ch_id);

Test

yarn test

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

License

MIT

About

DrakorID api wrapper

Topics

Resources

Stars

4 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages