Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/scholtzm/node-reptf
rep.tf API Wrapper for node.js
https://github.com/scholtzm/node-reptf
Last synced: 29 days ago
JSON representation
rep.tf API Wrapper for node.js
- Host: GitHub
- URL: https://github.com/scholtzm/node-reptf
- Owner: scholtzm
- License: mit
- Created: 2015-07-25T11:24:21.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2016-08-21T16:44:14.000Z (over 8 years ago)
- Last Synced: 2024-11-07T17:08:49.642Z (about 1 month ago)
- Language: JavaScript
- Size: 5.86 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-steam - reptf - Check user's rep.tf reputation. (Packages / Node.js)
README
# rep.tf API Wrapper for node.js
[![NPM version](http://img.shields.io/npm/v/reptf.svg?style=flat)](https://www.npmjs.org/package/reptf)
[![Dependency Status](https://david-dm.org/scholtzm/node-reptf.svg)](https://david-dm.org/scholtzm/node-reptf)
[![Build Status](https://travis-ci.org/scholtzm/node-reptf.svg?branch=master)](https://travis-ci.org/scholtzm/node-reptf)Very thin wrapper for the API provided by [rep.tf](http://rep.tf).
### Installation
`npm install reptf`
### Usage
```js
var reptf = require('reptf');// You can change the timeout value if you wish
reptf.timeout = 5000;// All methods are "static"
reptf.getBans('76561197960435530', function(err, res) {
if(!err) {
console.log(res);
}
});reptf.getProfile('76561197960435530', function(err, res) {
if(!err)
console.log(res);
}
});
```### Properties
##### timeout
Timeout value used for HTTP requests. Defaults to 10000ms (10 seconds).
### Methods
##### getBans(steamID, callback)
- `steamID` - user's SteamID64 as string
- `callback` - should be `function(error, result)`
- `error` comes from the HTTP request
- `result` is object returned by the APIProvides information about user's bans across various trading communities.
##### getProfile(steamID, callback)
- `steamID` - user's SteamID64 as string
- `callback` - should be `function(error, result)`
- `error` comes from the HTTP request
- `result` is object returned by the APIProvides information about user's overall Steam profile.
### License
MIT. See `LICENSE`.