Skip to content
Simon Sørensen edited this page May 12, 2023 · 8 revisions

bptf-classifieds

A Node.js wrapper for the Backpack.tf Classifieds Web API.

Documentation

When you require() the module, the Classifieds class is returned. This page lists all methods (properties are private) available from that class.

However, you must first instantiate a new instance of the module and supply it with your Backpack.tf developer API key and User token.

Below is a CommonJS example:

// Require the module 
const { Classifieds } = require('bptf-classifieds');
// and supplying your options
const classifieds = new Classifieds({ 
    token: 'XXXXXXXXXXXXXXXXXXXXXXXX',
    apiKey: 'XXXXXXXXXXXXXXXXXXXXXXXX'  
});

A list of constructor options is available here.

Methods

All methods support both callbacks and async/await.

Also, please note: Function parameters are all supplied in a single object. If one or more are omitted, the function resorts to its default values.

Examples

For now, there are some examples available in the test directory.

Support

Feel free to create an issue if you need to report any bugs or have a suggestion for a new feature.

Clone this wiki locally