With apologies to Meta Wing
Note: This post is offered retrospectively. The work noted here was completed a week ago, so some actions may have been forgotten.
Sorry, Meta-Wing! I liked your content so much that I started out by pulling it directly! Over at Meta-Wing, we see that simply adding .json to the end of the address gives us the raw data they've compiled for us:
This is handy, because not only does it give us all the pilot details we wanted to borrow, but it also gives us the URL to their picture for it. For a few days, I was simply stealing this data and thus their bandwidth. I was only testing. Sorry. For what it's worth, it was only me loading it at the time!
Here's how I'm doing the data parse now:
1. Grab the complete JSON from http://meta-wing.com/pilots.json and parse it. Discard everything that doesn't have a "position" value of 1.
2. Load the local JSON for the Pilot (using the Id attribute). This gives us a complete data object for the pilot. The only thing we're keeping from Meta-Wing is the link to their page for the pilot (linked when clicking the component). Everything else, including the image is hosted locally.Notice that there's two classes at play here. Pilot, and MetaWingPilot - this is required because the JSON format I'm using stores "Ship" as a string (the name of the ship type) whereas MetaWing provides us additional information in-line. Ignore the "0 references" - Intellisense is currently broken.
3. Load the Meta Wing data from http://meta-wing.com/ship_combos.json, and discard everything other the archetype in position 1.
4. The MetaWing Partial View renders this data into a couple of simple frames.


Comments
Post a Comment