Skip to content
This repository has been archived by the owner on Apr 12, 2020. It is now read-only.

Commit

Permalink
Merge pull request #40 from South-Paw/api-generated
Browse files Browse the repository at this point in the history
Add API Update Scripts
  • Loading branch information
South-Paw authored Sep 21, 2018
2 parents aafd6e5 + 78babbe commit 99551b2
Show file tree
Hide file tree
Showing 579 changed files with 90,478 additions and 3,645 deletions.
5 changes: 4 additions & 1 deletion .babelrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
{
"presets": ["env"],
"plugins": ["transform-object-rest-spread"],
"plugins": [
"inline-json",
"transform-object-rest-spread"
],
"ignore": ["__tests__"]
}
16 changes: 15 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,20 @@
language: node_js

dist: xenial

node_js:
- "8"
- "10"

addons:
apt:
packages:
- libluajit-5.1-dev

script:
- npm run lint
- npm run test/coverage && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js

notifications:
email:
on_success: change
on_failure: always
73 changes: 41 additions & 32 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
👾 A list of all Warframe items that contribute to player mastery rank.

[![npm](https://img.shields.io/npm/v/warframe-item-list.svg)](https://www.npmjs.com/package/warframe-item-list)
[![warframe update](https://img.shields.io/badge/warframe_update-23.2.1-blue.svg)](http://warframe.wikia.com/wiki/Update_23#Hotfix_23.2.1)
[![warframe update](https://img.shields.io/badge/warframe_update-23.8.2-blue.svg)](http://warframe.wikia.com/wiki/Update_23#Hotfix_23.8.2)
[![CI Status](https://img.shields.io/travis/South-Paw/warframe-item-list.svg)](https://travis-ci.org/South-Paw/warframe-item-list)
[![Coveralls Status](https://img.shields.io/coveralls/github/South-Paw/warframe-item-list.svg)](https://coveralls.io/github/South-Paw/warframe-item-list)
[![Dependencies](https://david-dm.org/South-Paw/warframe-item-list/status.svg)](https://david-dm.org/South-Paw/warframe-item-list)
Expand All @@ -13,11 +13,13 @@

## Why?

Because I couldn't find a near complete list of all Warframe items that contributed to mastery rank... so I spent 2 evenings cataloguing the [Warframe Wiki](http://warframe.wikia.com/wiki/Weapons) item mastery lists and making some objects up that would be easy to reuse in a Javascript app.
Because I couldn't find a near complete list of all Warframe items that contributed specifically to player mastery rank... so I originally spent 2 evenings cataloguing the [Warframe Wiki](http://warframe.wikia.com/wiki/Weapons) item mastery lists and making some objects up that would be easy to reuse in a Javascript app.

Since there isn't an official public API or anything to get this information, this project is managed manually with the help of the Warframe wiki. This of course means that it may also contain mistakes and/or inaccuracies on items.
A fair few commits later, this project uses an updater script which fetches the latest content from the `http://content.warframe.com/MobileExport` endpoints and transforms it into this mastery rank list. This is the same endpoints/urls that the [Warframe Mobile app](https://play.google.com/store/apps/details?id=com.digitalextremes.warframenexus) uses to get the current game data - so assuming the endpoints/urls are left as-is, this repo will remain reasonably up to date.

If you come across any missing items, problems or mistakes - please let me know by [creating an issue](https://github.com/South-Paw/warframe-item-list/issues/new) or even [fixing it yourself](https://github.com/South-Paw/warframe-item-list/pulls) with a pull-request. See contributing section for more info.
Please note that the endpoints are NOT publicly documented by Digital Extremes (so they could disappear or change at any time) and they do not provide information such a weapon categories. Because of this, we maintain the categories manually in this repo and there may be mistakes and/or inaccuracies with our data or the endpoint/urls.

If you come across any missing items, problems or mistakes - please let us know by [creating an issue](https://github.com/South-Paw/warframe-item-list/issues/new) or even [fixing it yourself](https://github.com/South-Paw/warframe-item-list/pulls) with a pull-request. See contributing section for more info.

## Install

Expand All @@ -33,9 +35,9 @@ or
const { version, array, objects, constants } = require('warframe-item-list');

console.log(version); // returns the warframe game version of the item list.
console.log(array); // returns a big list of every item.
console.log(objects); // returns an object containing named lists and objects for more specific uses.
console.log(constants); // returns the constant keys used to define keys in the `array` and `objects`.
console.log(array); // returns a big list of every item object.
console.log(objects); // returns an object keyed by type, these contain lists of item objects.
console.log(constants); // returns the constants used to define item attributes.
```

## Objects
Expand All @@ -47,24 +49,23 @@ If you `console.log` the root object, you'll get the following:
version: 'string',
array: [...],
objects: {
AMPS: [...],
ARCHWINGS: [...],
ARCHWING_GUNS: [...],
ARCHWING_MELEES: [...],
COMPANION_KAVATS: [...],
COMPANION_KUBROWS: [...],
COMPANION_SENTINELS: [...],
SENTINEL_WEAPONS: [...],
WARFRAMES: [...],
WEAPON_PRIMARIES: [...],
WEAPON_SECONDARIES: [...],
WEAPON_MELEES: [...],
ZAWS: [...],
Amp: [...],
Archwing: [...],
ArchwingMelee: [...],
ArchwingPrimary: [...],
Kavat: [...],
Kubrow: [...],
Melee: [...],
Primary: [...],
Secondary: [...],
Sentinel: [...],
SentinelWeapon: [...],
Warframe: [...],
Zaw: [...],
},
constants: {
ACQUISITION: {...},
ITEM_TYPE: {...},
ITEM_TYPES: {...},
TYPE: {...},
TYPES: {...},
MELEE_CATEGORIES: {...},
PRIMARY_CATEGORIES: {...},
SECONDARY_CATEGORIES: {...},
Expand All @@ -76,25 +77,33 @@ Within each list, the objects are pretty similarly structured:

```js
{
id: 'string', // unique id for the item.
name: 'string', // name of the item.
acquisition: 'string', // where to acquire the item.
category: 'string', // category of weapon - this is only used in primary/secondary/melee and sentinel weapons.
masteryRank: 0, // the mastery rank required for the item.
type: 'string', // the type the item belongs to.
type: 'string', // type the item belongs to.
category: 'string', // category of the weapon - this is only used on primary/secondary/melee and sentinel weapons.
masteryRank: 0, // mastery rank required for the item.
image: 'string', // path to the image file for this item, relative to the root of the package.
wiki: 'string', // url for the items warframe wiki page.
},
```

And the `constants` contains those that are provided to define the `acquisition`, `category` and `type` in the item objects.
And the `constants` contains the strings that are used to define the `category` and `type` keys in the item objects.

There is also a handy `types` exposed in the `constants` where by using a `type` key you can get it's plural.

```js
const { TYPE, TYPES } = require('warframe-item-list').constants;

console.log(TYPE.PRIMARY); // returns string 'primary'.
console.log(TYPES[TYPE.PRIMARY]); // returns string 'primaries'.
```

## Contributing

Again, if you come across any missing items, problems or mistakes - please let me know by [creating an issue](https://github.com/South-Paw/warframe-item-list/issues/new) or feel free to have a shot at [fixing it yourself](https://github.com/South-Paw/warframe-item-list/pulls) with a pull-request.
If you come across any missing items, problems or mistakes - please let me know by [creating an issue](https://github.com/South-Paw/warframe-item-list/issues/new) or feel free to have a shot at [fixing it yourself](https://github.com/South-Paw/warframe-item-list/pulls) with a pull-request.

Please ensure that any PRs are linted + tested and keep with the general flow of things.

* Items should be grouped in files by `category` (categories follow the wiki order)
* Ideally; items are alphabetically sorted by `name` within each `category` file

## License

This project is licensed under [GNU GPLv3](https://github.com/South-Paw/warframe-item-list/blob/master/LICENSE)
Expand Down
Loading

0 comments on commit 99551b2

Please sign in to comment.