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.
 

Need API help

Author
Kane Edo
The Aquamarine Island Foundation
#1 - 2011-09-14 11:59:28 UTC
I'm really new to working with API and wanted to know if anyone could help me. I need to know how to contact the API with a keyID and vCode then verify that the Character name is on that account.

I'm using a form and they have to enter their Character Name, KeyID, and vCode to register and I want to just check to make sure that the character they are registering matches. If the character name matches I need to pull the character name from the API and also the CharacterID. Once they register the name will be there their username and the characterid will be used to grab their picture of the eve image site. If anyone could help me in this matter I've looked at a lot of different code for this but it seems to pull way to much and you have to preset the keyid and.

Thank you for any help. If not that ok :)
Elias v'Gorn
Viziam
Amarr Empire
#2 - 2011-09-14 12:11:24 UTC
You're looking for the Characters.xml.aspx api

Character Api Docs
Kane Edo
The Aquamarine Island Foundation
#3 - 2011-09-14 12:19:01 UTC
I know thats the file I need to look at, but with using this API do I have to cache everything than read it off of that cache or is there is away I can tell the api I just want the character name and character id?
Elias v'Gorn
Viziam
Amarr Empire
#4 - 2011-09-14 12:43:14 UTC
Kane Edo wrote:
I know thats the file I need to look at, but with using this API do I have to cache everything than read it off of that cache or is there is away I can tell the api I just want the character name and character id?


How the Api works.


  1. You Call it.
  2. Api returns a response.
  3. If you will be calling the same Api with the same credentials again, cache it.
  4. Read the response


Now you don't care about caching since this is a registration process and the user shouldn't be registering the same character multiple times.

The response is XML (the link i gave gives a sample) which contains a list of 1 to 3 characters exposed by the Key/Code pair and you just need to check the name given by user against name given by api.
Kane Edo
The Aquamarine Island Foundation
#5 - 2011-09-14 12:46:03 UTC
Thank you very much for the help. I think i got it now :)
Dragonaire
Here there be Dragons
#6 - 2011-09-14 14:16:36 UTC
Instead of Characters.xml.aspx I'd use account/APIKeyInfo.xml.aspx as it has the same info and also let's you know what other API access the key gives you etc.

Finds camping stations from the inside much easier. Designer of Yapeal for the Eve API. Check out the Yapeal PHP API Library thread.

Kane Edo
The Aquamarine Island Foundation
#7 - 2011-09-14 14:21:24 UTC
I lied lol I don't have it, I tried a few different ways of doing this and looking at other code and for some reason I can not get it.
Kane Edo
The Aquamarine Island Foundation
#8 - 2011-09-14 14:29:58 UTC
I am willing to pay some iskies for someone to make a quick code. I need the following

The user will enter the character name, keyid, vcode in a form
Once they click register it contacts the API server to verify that the charname is on that account
If it is not than it gives and error.

If it is then I need to put the charactername in a var $charname also the characterid in a var $charid

If someone could put this together fast I can do the rest. I for some reason can't get a grip on using the API.
Desmont McCallock
#9 - 2011-09-14 17:50:26 UTC
Why don't you use cURL to help you out with the API fetching and the SimpleXML syntax to deserialize your data?
I suppose you are using PHP.
Kane Edo
The Aquamarine Island Foundation
#10 - 2011-09-14 19:14:56 UTC
Desmont McCallock wrote:
Why don't you use cURL to help you out with the API fetching and the SimpleXML syntax to deserialize your data?
I suppose you are using PHP.



YOU ARE AMAZING thank you i forgot about curl!!!!!!! got it working :)