Coder Social home page Coder Social logo

tebex.js's Introduction

Tebex.js

A Node.js client for the Tebex REST API written in Typescript. Easily interact with the Tebex REST API using this library.

npm GitHub Repo stars npm bundle size GitHub code size in bytes GitHub commit activity (branch) GitHub issues GitHub top language

🚀 Installation

npm install --save tebex.js

🗒️ Getting started

Get your tebex secret at https://tebex.io

You can use TebexClient to generate an instance of the Tebex REST API, or you can use the TebexRest to interact with the Tebex REST API without creating a new instance.

⚒️ Usage

All the methods are documented with their respective types.

Using a TebexClient instance

import { TebexClient } from 'tebex.js';
const TEBEX_SECRET = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx";

const client = new TebexClient(TEBEX_SECRET);

// Use client to fetch information
(async () => {
  const information = await client.information();
  console.log(information)
})();

Using TebexRest

import { TebexRest } from 'tebex.js';
const TEBEX_SECRET = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx";

// Use rest to fetch an specific endpoint
(async () => {
  const information = await TebexRest(TEBEX_SECRET).information();
  console.log(information)
})();

🤖 API

The TebexClient and TebexRest returns an object based on the interface ITebexRest, it contains properties based on the Tebex API endpoints
The endpoints could give an error based on an Invalid Tebex Secret, Not found object or a Server error (Which shouldn't happen as the UknownError.) They extend the BaseApiError which has the message and name property.

You can check out the documentation for more detailed documentation

🌍 Contribute

Feel free to help! If you're interested in helping with the project, please take a look at our issues tracker

✨ More

You can check the official documentation API to see the HTTP API. This package uses the official endpoints.

tebex.js's People

Contributors

pineapplegrits avatar

Stargazers

chebupelka avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.