api_request()
is the main function to access the GAMEBANANA API. It is declared in gamebanana_api.php
, which you must include()
in your project before using api_request()
.
Function
mixed
api_request ( string
$item_type , int
$itemid , string
$field [, string
$field ... ] )
Parameters
$item_type
The item's section, e.g
Member
. (currently this is the only supported $item_type).
$itemid
The item's ID (must be a number larger than 0) - e.g
1382
(this is tom's item ID)
$field
A data call to return. E.g
name
Return Value
Returns the result as a string if only one $item_type was specified, otherwise an an array of results. On error, returns an array with the key _sError
explaining the error.