Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions .codeclimate.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
version: "2"
ratings:
paths:
- "src/**.js"
plugins:
eslint:
enabled: true
config:
config: ./.eslintrc.json
duplication:
enabled: false
checks:
Similar code:
enabled: false
config:
languages:
- javascript
fixme:
enabled: true
checks:
method-lines:
config:
threshold: 50
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,4 @@ tmp/
#nodemon dev config
.nodemon
nodemon.json
.env
4 changes: 4 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[submodule "api-spec"]
path = api-spec
url = https://github.com/wfcd/api-spec
branch = gh-pages
2 changes: 1 addition & 1 deletion Procfile
Original file line number Diff line number Diff line change
@@ -1 +1 @@
web: node server.js
web: npm start
52 changes: 52 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,55 @@ Simple express app that parses worldState.php
[![PS4 API Status](https://img.shields.io/website/https/api.warframestat.us/ps4.svg?down_message=down&label=ps4%20api&logo=playstation&up_message=up)](https://api.warframestat.us/ps4)
[![XB1 API Status](https://img.shields.io/website/https/api.warframestat.us/xb1.svg?down_message=down&label=xb1%20api&logo=xbox&up_message=up)](https://api.warframestat.us/xb1)
[![Switch API Status](https://img.shields.io/website/https/api.warframestat.us/swi.svg?down_message=down&label=switch%20api&logo=nintendo-switch&up_message=up)](https://api.warframestat.us/swi)

## Access

### REST-ish:

- `http://$host:$port/$platform`
- `http://$host:$port/$platform/$child-item`
- `http://$host:$port/$a-bunch-of-static-data`


### Sockets:

`ws://$host:$port/sockets`

Requests taken as json strings in the socket packet.

Consumers will need to parse responses and stringify requests yourself, as ws doesn't provide a way to automatically parse them.

- ```json
{"event": "ws:req", "packet": { "platform": "$platform", "language": "$language" }}
```
- ```json
{ "event": "twitter" }
```
- ```json
{ "event": "rss" }
```


connecting automatically subscribes the connection to events structured as:
```json
{
"event": "twitter",
"packet": // tweets
}
```

```json
{
"event": "ws:update",
"packet": // entire updated worldstate
}
```

```json
{
"event": // worldstate key,
"packet": // worldstate key data
}
```

probably several others that can take some experimenting
15 changes: 0 additions & 15 deletions controllers/rss.js

This file was deleted.

19 changes: 0 additions & 19 deletions controllers/twitter.js

This file was deleted.

67 changes: 0 additions & 67 deletions lib/caches/RSSSocketEmitter.js

This file was deleted.

154 changes: 0 additions & 154 deletions lib/caches/TwitterCache.js

This file was deleted.

Loading