Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

battlefield-stats-express

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

battlefield-stats-express - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

2

package.json
{
"name": "battlefield-stats-express",
"version": "1.0.0",
"version": "1.0.1",
"description": "A simple battlefield stats express middleware",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -12,15 +12,9 @@ # battlefield-stats-express

```javascript
var bfs = require('battlefield-stats-express');
// You can get a token at https://battlefieldtracker.com/site-api
app.use('/api', bfs(YOUR_API_TOKEN))
```
Use the same url routes and parameters found at http://docs.trnbattlefield.apiary.io/
Now you can navigate to `yourhost/api/` and the rest of the url is proxied to battle-tracker's api using your api key.
## Full example
```javascript
const express = require('express');
const battlefieldStats = require('battlefield-stats-express');
const app = express();
const bfs = battlefieldStats(YOUR_API_TOKEN); // obtained from https://battlefieldtracker.com/site-api
// Get or use your key from https://battlefieldtracker.com/site-api`
const bfs = battlefieldStats(YOUR_API_TOKEN);
app.use('/api', bfs)

@@ -30,4 +24,5 @@ app.listen(3000);

Now you can see results when you navigate to: http://localhost:3000/api/Stats/DetailedStats?platform=3&displayName=Ravic
Now you can see results when you navigate to http://localhost:3000/api/Stats/DetailedStats?platform=3&displayName=Ravic
## API Docs
For documentation use http://docs.trnbattlefield.apiary.io/ then replace `https://battlefieldtracker.com/bf1/api/` with `http://localhost:3000/api`

@@ -34,0 +29,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc