Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

License

NotificationsYou must be signed in to change notification settings

kylestev/ge-tracker-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

npm version

ge-tracker-api

Unofficial API client to accessge-tracker.com's API.

Installation

Using NPM:

$ npm i ge-tracker-api

Using Yarn:

$ yarn add ge-tracker-api

Usage

GE-Tracker requires a valid API key in order to consume their API endpoints.Thus, if you wish to use this package, you must have an API key.

There are two functions exposed by this module:

createClient(apiKey, opts = null) andcreateClientFromEnv(opts = null).

CallingcreateClient requires an API key to be passed in order to initializethe underlying Axios instance with your API key for all subsequent requests.

CallingcreateClientFromEnv will attempt to find the environment variablenamedGE_TRACKER_API_KEY and use that as the API key.

Env Client Example

// example.jsconst{ createClientFromEnv}=require('ge-tracker-api')constclient=createClientFromEnv()client.Items.getItem(1050).then(item=>{console.log(`${item.name} has${item.buyingQuantity} buy offers and is    buying for ~${item.buying}`)})

How you set the environment variable will depend on your developmentenvironment.

For bash, you can prepend the environment variable before calling a script onyour path like so:

$ GE_TRACKER_API_KEY=ajosf...928h4tr node example.js

Please note that prepending your API key before a command may record yoursensitive API token to your bash or shell history.

A better approach is to use something likedotenv. Take care to ensure that yourenvironment file used by that library is added to your.gitignore file 😉

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp