Just want to update the set data? You can skip this party
Prerequisites:
- A fairly recent installation of Node - I use v8.9.3
- Able to use Terminal/bash
-
Copy
.env.local-sample
to.env.local
and fill inREACT_APP_BUNGIE_CLIENT_ID
andREACT_APP_API_KEY
with your Bungie.net OAuth client_id and API Key (see below for how to get these) -
Install dependencies with
npm install
(oryarn install
if you have Yarn) -
Run the local dev server with
npm start
(oryarn start
if you have Yarn) -
You should see "Compiled successfully!", with instructions, and the site should open in your browser.
- Note, as we're using HTTPS locally with a self-signed certificate, you'll get a security warning. You'll need to 'proceed anyway' to continue.
- Open the appropriate data file in
src/setData
- Look at the structure of the data - it reflects the layout of each page on
the site. Ultimately, items on the pages are specified in the
items
array, by their item hash (ID). - Search for an item on the
Data Explorer page on DestinySets.com, click
the item and copy the
hash
- the number in the little box next to the item's name in the overlay.- e.g. The hash for "Contender's Shell" is
113124080
.
- e.g. The hash for "Contender's Shell" is
- Paste the hash into the appropriate items array in the data file you're
making the change to. Just make sure you keep the syntax valid, observing
commas, etc. It's also nice to include the little
// item name
comment at the end of each line to make it easier for the next person - Save the file and Submit the pull request via Github 🎉
If you're adding multiple items in one set, the Data Explorer has a special mode to make it easier. Click the "Explore the entire Destiny 2 database..." text at the top to enable "Collect Mode". Now, as you click an item it'll appear in the sidebar, automatically categorised, and copied to your clipboard in a format appropriate for the data files.
TODO: write this better
- New app at https://www.bungie.net/en/Application
- oauth client type: public
- redirect url: url the site is running at. for dev, this will probably be https://localhost:4000
- check all scopes, except for "Administrate groups and clans..."
- Origin Header: if it's just a key for local development, just enter
*
here