Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/scholtzm/node-steamrep
Very thin wrapper for the API provided by SteamRep.com
https://github.com/scholtzm/node-steamrep
Last synced: 2 months ago
JSON representation
Very thin wrapper for the API provided by SteamRep.com
- Host: GitHub
- URL: https://github.com/scholtzm/node-steamrep
- Owner: scholtzm
- License: mit
- Created: 2015-06-06T18:20:19.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2016-08-21T16:37:53.000Z (over 8 years ago)
- Last Synced: 2024-08-10T21:21:52.869Z (6 months ago)
- Language: JavaScript
- Homepage:
- Size: 14.6 KB
- Stars: 10
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-steam - steamrep - Check user's SteamRep reputation. (Packages / Node.js)
README
# SteamRep API Wrapper for node.js
[![NPM version](http://img.shields.io/npm/v/steamrep.svg?style=flat)](https://www.npmjs.org/package/steamrep)
[![Dependency Status](https://david-dm.org/scholtzm/node-steamrep.svg)](https://david-dm.org/scholtzm/node-steamrep)
[![Build Status](https://travis-ci.org/scholtzm/node-steamrep.svg?branch=master)](https://travis-ci.org/scholtzm/node-steamrep)Very thin wrapper for the API provided by [SteamRep.com](http://steamrep.com).
### Installation
`npm install steamrep`
### Usage
```js
var SteamRepAPI = require('steamrep');// You can change the timeout value if you wish
SteamRepAPI.timeout = 5000;// All methods are "static"
SteamRepAPI.isScammer("76561197960435530", function(error, result) {
if(error) {
console.log(error);
} else {
if(result) {
console.log("This user is tagged as 'SCAMMER' at SteamRep.");
} else {
console.log("This user is NOT tagged as 'SCAMMER' at SteamRep.");
}
}
});SteamRepAPI.getProfile("76561197960435530", function(error, result) {
if(error === null) {
console.log(result);
}
});
```### Properties
##### timeout
Timeout value used for HTTP requests. Defaults to 10000ms (10 seconds).
### Methods
##### isScammer(steamID, callback)
- `steamID` - user's SteamID64 as string
- `callback` - should be `function(error, result)`
- `error` comes from the HTTP request
- `result` is either `true` or `false`Provides simple yes/no answer about user's scammer status.
##### 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 SteamRep information about given SteamID64, such as VAC status,
reputation status, pending reports and more.### Tests
`npm test`
### License
MIT. See `LICENSE`.