static
void
getStatusCodeMessage
( $status)
Wrapper for 140Proof's /ads/user
Returns an ad for a specified user. Returns an HTTP 404 error if the user does not exist, if the app does not exist, or if a targetted ad could not be found for the user.
void
getAd
(string $user_id, string $format, [integer $width = null], [float $lat = null], [float $long = null], [string $lang = null], [string $jsonp = null])
-
string
$user_id: Required. The screen name or id of the user on Twitter.
-
string
$format: Required. Response format, one of Api140Proof::HTML, Api140Proof::JS, Api140Proof::JSON, or Api140Proof::XML
-
integer
$width: Required (html format only). The width, in pixels, of the requested ad unit. Possible values: 240 (Api140Proof::TINY), 320 (Api140Proof::SMALL), 480 (Api140Proof::MEDIUM), 640 (Api140Proof::LARGE), or 960 (Api140Proof::EXTRA_LARGE)
-
float
$lat: Optional. The user's current latitude. Note: The valid ranges for latitude is -90.0 to +90.0 (North is positive) inclusive. This parameter will be ignored if outside that range, if it is not a number, or if there not a corresponding long parameter with this request.
-
float
$long: Optional. The user's current longitude. Note: The valid ranges for longitude is -180.0 to +180.0 (East is positive) inclusive. This parameter will be ignored if outside that range, if it is not a number, or if there not a corresponding lat parameter with this request.
-
string
$lang: Optional. Restricts ads to the given language, specified by an ISO 639-1 code.
-
string
$jsonp: Optional. Specify the name of a callback function for a js response.
Api140Proof
__construct
( $app_id, [string $api_base = self::API_BASE], string $api_id)
-
string
$api_id: Required. Your 140 Proof API ID
-
string
$api_base: Optional. Base URL for 140 Proof API (defaults to production)
-
$app_id