Method | Description | |
---|---|---|
appendQueryString ( $url, $qs ) | ||
call ( DataSift_User $user, string $endPoint, $method, array $params = [], array $headers = [], string $userAgent = DataSift_User::USER_AGENT, $qs = [], $ingest = false ) : array | Make a call to a DataSift API endpoint. |
Method | Description | |
---|---|---|
decodeBody ( array $res ) : array | Decode the JSON response depending on the format. |
Method | Description | |
---|---|---|
initialize ( string $method, boolean $ssl, string $url, array $headers, array $params, string $userAgent, $qs, $raw = false ) : resource | Initalize the cURL connection. | |
parseHTTPResponse ( string $str ) : array | Parse an HTTP response. Separates the headers from the body and puts the headers into an associative array. |
public static call ( DataSift_User $user, string $endPoint, $method, array $params = [], array $headers = [], string $userAgent = DataSift_User::USER_AGENT, $qs = [], $ingest = false ) : array | ||
$user | DataSift_User | The user's username. |
$endPoint | string | The endpoint of the API call. |
$params | array | The parameters to be passed along with the request. |
$headers | array | The headers to be sent. |
$userAgent | string | The HTTP User-Agent header. |
return | array | The response from the server. |
protected static decodeBody ( array $res ) : array | ||
$res | array | The parsed HTTP response. |
return | array | An array of the decoded JSON response |