PHP 클래스 DataSift_ApiClient

The DataSift_ApiClient class wraps access to the DataSift API. This software is the intellectual property of MediaSift Ltd., and is covered by retained intellectual property rights, including copyright.
저자: Stuart Dallas ([email protected])
파일 보기 프로젝트 열기: datasift/datasift-php

공개 메소드들

메소드 설명
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.

보호된 메소드들

메소드 설명
decodeBody ( array $res ) : array Decode the JSON response depending on the format.

비공개 메소드들

메소드 설명
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.

메소드 상세

appendQueryString() 공개 정적인 메소드

public static appendQueryString ( $url, $qs )

call() 공개 정적인 메소드

Make a call to a DataSift API endpoint.
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.
리턴 array The response from the server.

decodeBody() 보호된 정적인 메소드

Decode the JSON response depending on the format.
protected static decodeBody ( array $res ) : array
$res array The parsed HTTP response.
리턴 array An array of the decoded JSON response