These forums have been archived and are now read-only.

The new forums are live and can be found at https://forums.eveonline.com/

EVE General Discussion

 
  • Topic is locked indefinitely.
 

EVE API Newb

First post
Author
Whitney Aubaris
AWOLGamers
#1 - 2017-01-04 09:31:07 UTC
I am trying to display a list of all my blueprints in alphabetical format descending and numerical format descending.

Currently this is what I have. Everything I have googled has been zero help. I figure I just need to add an & to the end of my link, something like "vCode=*****&sortColumn@typeName&sortColumn@runs".
https://api.eveonline.com/corp/Blueprints.xml.aspx?characterID=*****&keyID=*****&vCode=*****

Any constructive help is greatly appreciated.
Chribba
Otherworld Enterprises
Otherworld Empire
#2 - 2017-01-04 11:17:32 UTC
The API doesn't provide you with options to sort the results, so you'll have to import and sort it yourself.

/c

★★★ Secure 3rd party service ★★★

Visit my in-game channel 'Holy Veldspar'

Twitter @ChribbaVeldspar

Scipio Artelius
Weaponised Vegemite
Flying Dangerous
#3 - 2017-01-04 11:21:15 UTC  |  Edited by: Scipio Artelius
The API doesn't have filters to sort like you are hoping.

It returns the response to you and it's up to you to sort it how you want.

If you aren't using a specific programming language, or importing the result directly into Excel or Google Sheets, etc. then I'd suggest the simplest way is to use one of the online xml viewers like this:

http://codebeautify.org/xmlviewer

You can import from url and then export the result as a csv file and then open that directly in Excel, etc. and then just easily sort the data by column.

If instead you want to automate the process a bit more then that, where are you hoping to directly import it to? It's relatively easy to provide the code to do what you want.
Whitney Aubaris
AWOLGamers
#4 - 2017-01-04 12:04:43 UTC  |  Edited by: Whitney Aubaris
I was worried about that though I'm not surprised.

Because I thought that might be the case I have been trying to figure out how to do a basic api link to a mysql db and have still had no luck. What?

The idea would be to have a db called "mycorp" with a table called "Blueprints". Each table would be something different like AccountBalance, AssetList, etc.
With some basic code I could have the "Blueprints" cleared and the same api group call once per week to repopulate the "Blueprints" table. I would want the table cleared before updating it just in case I don't have a blueprint/item anymore.

I would want it to call from the basic api link "https://api.eveonline.com/corp/Blueprints.xml.aspx?characterID=*****&keyID=*****&vCode=*****".

I'm a newb to every code but HTML and CSS and honestly have no idea how to do this. Been trying to learn as I go. Smile

Here is what I have so far. blueprints.php
And here is a link to a text version of that file. blueprints.txt

If I could get everything put into my mysql server then I can sort and filter it no problem.
Scipio Artelius
Weaponised Vegemite
Flying Dangerous
#5 - 2017-01-04 12:16:44 UTC  |  Edited by: Scipio Artelius
There are several options and a number of code repositories on GitHub already that could help you, but it isn't quite as simple as linking the API to a mysql database.

What you need to do is make a call to the api server from your server side code, receive the response and process it to pull out the information you want and then save that information into your mysql database.

So you really need at least one additional language like PHP, JavaScript (eg. NodeJS server), Python, Java to handle the backend and then use HTML/CSS just to display the information in the browser.

The alternative would be to setup an Excel Spreadsheet or Google Sheet to import the data and format it for you. That isn't backed by a database, but you can call the xml api when you need to update the information and just save it in the Spreadsheet.

Edit:
Seems we were replying at the same time. Ok, I'll take a look at the PHP for you.

This is also worth posting into the Eve Technology Lab, where these types of questions are regularly posted.
Hakawai
State War Academy
Caldari State
#6 - 2017-01-04 12:28:34 UTC  |  Edited by: Hakawai
If you can use Java for this, I'll write you some simple sort/select logic.

If u can write the data to a file this can be done without trying to figure out how to connect Java to yr web page.
Whitney Aubaris
AWOLGamers
#7 - 2017-01-04 12:40:35 UTC  |  Edited by: Whitney Aubaris
Anything you guys can offer would be greatly appreciated!

Though I learned the basics of JS at the same time I learned HTML and CSS, JS just never stuck with me.

I'm not quite sure how well a file will work for me as I have next to zero experience in using files like .txt in sites.
Hakawai
State War Academy
Caldari State
#8 - 2017-01-04 13:09:50 UTC
Whitney Aubaris wrote:
Anything you guys can offer would be greatly appreciated!

Though I learned the basics of JS at the same time I learned HTML and CSS, JS just never stuck with me.

I'm not quite sure how well a file will work for me as I have next to zero experience in using files like .txt in sites.

I won't promise to learn JS just for this, but I'll see if I can find an example somewhere. Watch this space :)

FWIW: I offered the Java logic because I just wrote some file-processing code that does this kind of thing. If I can figure out JS data capture + write to file fast, the reformatting isn't much extra. But it's never wise to make rash promises about a new language :)
ISD Max Trix
ISD Community Communications Liaisons
ISD Alliance
#9 - 2017-01-04 15:37:39 UTC
Try the EVE Technology Subform as thats our API Sub Forum ; https://forums.eveonline.com/default.aspx?g=topics&f=263

ISD Max Trix

Lieutenant

Community Communication Liaisons (CCLs)

Interstellar Services Department

I do not respond to EVE mails about forum moderation.