aHawk :: API

aHawk :: API

The API is several different endpoints which returns the data requested -or errors- in JSON.
Tokens are required for most endpoints so that API subscriptions can be cleaned.

Public Endpoints

These endpoints are publicly available, and require no authentication and will be accessible as long as the item has any subscribers.
It is not recommended that an application uses this, as it's possible for the item to lose it's subscribers and the application would break.

GET Availability JSON <Realm Name>/<Item ID>.JSON
Parameters
Realm Name: (str) The name of the realm, urlencoded, case sensitive (Shu'halo is still Shu'halo, but Steamweedle Cartel is Steamwheedle%20Cartel)
Item ID: (int) The ID of the item

Requires
Nothing
Example URL
/api/Eitrigg/21877.JSON
Example Response

( ! ) Notice: Array to string conversion in /var/www/aHawk/api/handler.php on line 79
Call Stack
#TimeMemoryFunctionLocation
10.2006358680{main}( ).../handler.php:0

( ! ) Notice: Undefined property: stdClass::$Array in /var/www/aHawk/api/handler.php on line 79
Call Stack
#TimeMemoryFunctionLocation
10.2006358680{main}( ).../handler.php:0
{"available":null,"time":1542534359}

GET Availability Feed <Realm Name>/<Item ID>.RSS (doesn't work)
Parameters
Realm Name: (str) The name of the realm, urlencoded, case sensitive (Shu'halo is still Shu'halo, but Steamweedle Cartel is Steamwheedle%20Cartel)
Item ID: (int) The ID of the item

Requires
Nothing
Example URL
/api/Eitrigg/21877.RSS
Example Response
{"available":true,"time":1436580671}


Subscription-based Endpoints

These endpoints are not publicly available, and instead require authentication gained from subscribing to the item.
It is recommended that applications use these endpoints because even if the item loses all other subscribers, as long as the application is being used it will still work.

GET /availabilityOf/ availabilityOf/<Realm Name>/<Item ID>/<Time>
Parameters
Realm Name: (str) The name of the realm, urlencoded, case sensitive (Shu'halo is still Shu'halo, but Steamweedle Cartel is Steamwheedle%20Cartel)
Item ID: (int) The ID of the item
Time: (str or int) Accepts "now" (in the most recent check), "today" (results for all checks today), or minutes ago (rounds to check closest to the number of minutes ago) (int)

Requires
Token: (str) The token given to you after subscribing, emailed to you, and available on your IP managing page

Example URL

Example Response
{"available":true,"time":1436580671}

GET /lowestPricePer/ lowestPricePer/<Realm Name>/<Item ID>/<Time>
Parameters
Realm Name: (str) The name of the realm, urlencoded, case sensitive (Shu'halo is still Shu'halo, but Steamweedle Cartel is Steamwheedle%20Cartel)
Item ID: (int) The ID of the item
Time: (str or int) Accepts "now" (in the most recent check), "today" (results for all checks today), or minutes ago (rounds to check closest to the number of minutes ago) (int)

Requires
Token: (str) The token given to you after subscribing, emailed to you, and available on your IP managing page

Example URL

Example Response
{'time': 120586, 'available': true}

GET /quantityOf/ quantityOf/<Realm Name>/<Item ID>/<Time>
Parameters
Realm Name: (str) The name of the realm, urlencoded, case sensitive (Shu'halo is still Shu'halo, but Steamweedle Cartel is Steamwheedle%20Cartel)
Item ID: (int) The ID of the item
Time: (str or int) Accepts "now" (in the most recent check), "today" (results for all checks today), or minutes ago (rounds to check closest to the number of minutes ago) (int)

Requires
Token: (str) The token given to you after subscribing, emailed to you, and available on your IP managing page

Example URL

Example Response
{'time': 120586, 'quantity': [18, "1x10+2x4"]}


Made with <3 by Zbee, open source GitHub, no affiliation whatsoever with Blizzard