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

Add API Update Scripts #40

Merged
merged 34 commits into from
Sep 21, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
e7d3b2b
WIP first cut of the updater script
South-Paw Aug 31, 2018
3e7deda
Updater progress, now produces nice json files.
South-Paw Aug 31, 2018
201a522
Changes to updater to add manually updated weapon category lists
South-Paw Sep 1, 2018
52463f9
Update package javascript to use the `.json` files.
South-Paw Sep 1, 2018
fdc5066
Update version and readme.
South-Paw Sep 1, 2018
4f47fed
Add comments to update scripts so they're a bit easier to follow.
South-Paw Sep 1, 2018
2b25733
Use wiki data to populate weapon categories
South-Paw Sep 3, 2018
3a43cc5
Bump travis ci version
South-Paw Sep 3, 2018
e90a8d7
Fix typo
South-Paw Sep 4, 2018
22480f1
Add pre-resized image for each mastery item.
South-Paw Sep 10, 2018
acc0a46
Fixed image location paths relative to the package.
South-Paw Sep 10, 2018
7b3cf47
Update
South-Paw Sep 15, 2018
1cb324a
Test adding Lua to CI
South-Paw Sep 17, 2018
bb9e36f
Add Lua to CI
South-Paw Sep 17, 2018
c924130
Revert "Add Lua to CI"
South-Paw Sep 17, 2018
5109256
Lua CI test
South-Paw Sep 17, 2018
42c6453
Lua CI test
South-Paw Sep 17, 2018
4203670
Lua CI test
South-Paw Sep 17, 2018
7fa4302
Reverting lua changes
South-Paw Sep 17, 2018
03fb96f
Just Use Node-LuaJIT™
resir014 Sep 19, 2018
9d1efc2
sudo build luajit for me please
resir014 Sep 19, 2018
197ea5a
enable sudo -su before install
resir014 Sep 19, 2018
64a3c11
add luajit as package
resir014 Sep 19, 2018
f683588
Revert "Just Use Node-LuaJIT™"
resir014 Sep 19, 2018
745bff7
add libluajit-5.1-dev
resir014 Sep 19, 2018
ecdec78
only include libluajit-5.1-dev
resir014 Sep 19, 2018
b9f7ab4
switch back to standard node-lua
resir014 Sep 19, 2018
48350b0
use the forked version of node-lua
resir014 Sep 19, 2018
ca7955e
yes, I'm that dumb.
resir014 Sep 19, 2018
0eadc2f
no need for sudo now (hopefully)
resir014 Sep 19, 2018
fb87b78
Merge pull request #41 from resir014/api-generated
South-Paw Sep 20, 2018
6499aa0
Update readme and lockfile
South-Paw Sep 20, 2018
85a9c05
Update warframe version
South-Paw Sep 20, 2018
78babbe
Add tests and fix some comments
South-Paw Sep 20, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
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