warframe-worldstate-parser
Version:
An Open parser for Warframe's Worldstate in Javascript
44 lines (29 loc) • 3.76 kB
Markdown
# Warframe Worldstate Parser
Parse the Warframe worldstate into useable javascript objects.
[](https://github.com/WFCD/banner/blob/master/PROJECTS.md)
[](https://crowdin.com/project/genesis-parser)
[](https://coveralls.io/github/WFCD/warframe-worldstate-parser?branch=master)
[](https://discord.gg/jGZxH9f)
[](https://github.com/semantic-release/semantic-release)
## Documentation
You can find the documentation [here](https://wfcd.github.io/warframe-worldstate-parser/)
## Installation
```shell
$ npm i -S warframe-worldstate-parser
```
For the most part, you'll have a better experience consuming the product of this from the information in [Live version](#live-version)
## Example usage
```javascript
// import WorldState from 'warframe-worldstate-data';
// using this syntax to make it precisely testable in a test
const WorldStateParser = await import('warframe-worldstate-parser');
const worldstateData = await fetch('https://content.warframe.com/dynamic/worldState.php').then((data) => data.text());
const ws = await WorldStateParser(worldstateData);
console.log(ws.alerts[0].toString());
```
## Live version
See the parser in action here:
[](https://api.warframestat.us/pc)
[](https://api.warframestat.us/ps4)
[](https://api.warframestat.us/xb1)
[](https://api.warframestat.us/swi)