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 Technology Lab

 
  • Topic is locked indefinitely.
 

Installing API into website

Author
Jade III
Sebiestor Tribe
#1 - 2013-10-17 15:29:36 UTC  |  Edited by: Jade III
Hi all,

I was wondering if you could help me on a few things regarding API. My website is about an Online EVE Character management system (Like EVEMon, but online), and it will have a fleet operation management where you can manage mining ops, and PVP ops as well.


My question is probably a noobish one. How do I install the API keys onto my website?

My adventure blog: http://lonewolfadventures.wordpress.com/

Rob Crowley
State War Academy
#2 - 2013-10-17 16:13:43 UTC
You might have to be a bit more specific, cause I don't quite understand what "installing API keys onto a website" is supposed to mean.

The closest thing this sounds to me would be "How do I get/store people's API keys for the website?", but that would be rather trivial: have 2 fields where people can enter the numeric key and the alphanumeric code and store them in any format you see fit.

If you mean "How do I use the API once I have someone's key?", then this site might help: http://wiki.eve-id.net/APIv2_Page_Index
Jade III
Sebiestor Tribe
#3 - 2013-10-17 16:40:02 UTC  |  Edited by: Jade III
Rob Crowley wrote:
You might have to be a bit more specific, cause I don't quite understand what "installing API keys onto a website" is supposed to mean.

The closest thing this sounds to me would be "How do I get/store people's API keys for the website?", but that would be rather trivial: have 2 fields where people can enter the numeric key and the alphanumeric code and store them in any format you see fit.

If you mean "How do I use the API once I have someone's key?", then this site might help: http://wiki.eve-id.net/APIv2_Page_Index


Sorry about that, I meant to ask the "How do I get/store people's API keys for the website?" question. Thank you for your answer.

My adventure blog: http://lonewolfadventures.wordpress.com/

Louis Vitton
Viziam
Amarr Empire
#4 - 2013-10-17 19:08:55 UTC
Which language are you using?
There are frameworks about to help such as phealIng and yapeal. These are php based.
Yapeal is database powered and inserts the results in the database.
PhealIng you make the calls with php using the framework and then you can insert to the DB or you can just use the code on the page.
Both have cache control on them to avoid making heaps of calls to the API server and respecting the cache timers.

As for how you would do it, high level.

Make the API call to ccp server.
Read the results.
Check for errors.
Output the results / put them in a database.

I personally use a mix of both Pheal and Yapeal for my API pull needs.

This may also be of help to you.
https://forums.eveonline.com/default.aspx?g=posts&t=26274&find=unread

Overall your questions a little to broad.
Jade III
Sebiestor Tribe
#5 - 2013-10-17 19:27:06 UTC
I might be using Phealing, but I'm not sure. Also new to coding EVE's API. Thank you for the link to the tutorial, and for your time by the way. Hopefully when I am able to get the API working on my website, the site will be of use to you guys.

My adventure blog: http://lonewolfadventures.wordpress.com/

Louis Vitton
Viziam
Amarr Empire
#6 - 2013-10-17 20:33:33 UTC
Pheal is a good choice, it has a toArray function which makes it simple to then insert to database or output.
I use Pheal with cron jobs to pull alot of information from the API.
If you need help just ask. If you are using php also i would suggest using PDO for database interaction also.
http://php.net/manual/en/book.pdo.php
http://net.tutsplus.com/tutorials/php/php-database-access-are-you-doing-it-correctly/

Also with pheal it is best if pulling API requests from users that you use the;

// The EVE API blocks applications which cause too many errors. Requesting a page
// that the API key does not allow to request is one of those possible errors.
// Pheal can be configured so pheal will request the AccessMask of a specific key
// and block requests to API Pages not covered by that key.
Config::getInstance()->access = new \Pheal\Access\StaticCheck();

above info from https://github.com/3rdpartyeve/phealng