PHP Class Zendesk\API\HttpClient

Inheritance: use trait Zendesk\API\Traits\Utility\InstantiatorTrait
Afficher le fichier Open project: zendesk/zendesk_api_client_php Class Usage Examples

Méthodes publiques

Свойство Type Description
$embeddable Zendesk\API\Resources\Embeddable
$guzzle GuzzleHttp\Client
$helpCenter Zendesk\API\Resources\HelpCenter
$voice Zendesk\API\Resources\Voice

Protected Properties

Свойство Type Description
$apiBasePath This is appended between the full base domain and the resource endpoint
$apiUrl string
$auth Zendesk\API\Utilities\Auth
$debug Zendesk\API\Debug
$hostname string
$port integer
$scheme string
$sideload array | null
$subdomain string

Méthodes publiques

Méthode Description
__construct ( string $subdomain, string $username = '', string $scheme = "https", string $hostname = "zendesk.com", integer $port = 443, Client $guzzle = null )
delete ( $endpoint ) : null This is a helper method to do a delete request.
get ( $endpoint, array $queryParams = [] ) : stdClass This is a helper method to do a get request.
getApiBasePath ( ) : string Returns the api base path
getApiUrl ( ) : string Returns the generated api URL
getAuth ( ) : Auth
getDebug ( ) : Zendesk\API\Debug Returns debug information in an object
getHeaders ( ) : array
getSideload ( array $params = [] ) : array | null Sideload getter
getSubdomain ( ) : string Returns the supplied subdomain
getUserAgent ( ) : string Return the user agent string
getValidSubResources ( ) : array
post ( $endpoint, array $postData = [] ) : stdClass This is a helper method to do a post request.
put ( $endpoint, array $putData = [] ) : stdClass This is a helper method to do a put request.
setApiBasePath ( string $apiBasePath ) Sets the api base path
setAuth ( $strategy, array $options ) Configure the authorization method
setDebug ( mixed $lastRequestHeaders, mixed $lastRequestBody, mixed $lastResponseCode, string $lastResponseHeaders, mixed $lastResponseError ) Set debug information as an object
setHeader ( string $key, string $value ) : HttpClient
setSideload ( array $fields = null ) : HttpClient Sideload setter

Method Details

__construct() public méthode

public __construct ( string $subdomain, string $username = '', string $scheme = "https", string $hostname = "zendesk.com", integer $port = 443, Client $guzzle = null )
$subdomain string
$username string
$scheme string
$hostname string
$port integer
$guzzle GuzzleHttp\Client

delete() public méthode

This is a helper method to do a delete request.
public delete ( $endpoint ) : null
$endpoint
Résultat null

get() public méthode

This is a helper method to do a get request.
public get ( $endpoint, array $queryParams = [] ) : stdClass
$endpoint
$queryParams array
Résultat stdClass | null

getApiBasePath() public méthode

Returns the api base path
public getApiBasePath ( ) : string
Résultat string

getApiUrl() public méthode

Returns the generated api URL
public getApiUrl ( ) : string
Résultat string

getAuth() public méthode

public getAuth ( ) : Auth
Résultat Zendesk\API\Utilities\Auth

getDebug() public méthode

Returns debug information in an object
public getDebug ( ) : Zendesk\API\Debug
Résultat Zendesk\API\Debug

getHeaders() public méthode

public getHeaders ( ) : array
Résultat array

getSideload() public méthode

Sideload getter
public getSideload ( array $params = [] ) : array | null
$params array
Résultat array | null

getSubdomain() public méthode

Returns the supplied subdomain
public getSubdomain ( ) : string
Résultat string

getUserAgent() public méthode

Return the user agent string
public getUserAgent ( ) : string
Résultat string

getValidSubResources() public static méthode

public static getValidSubResources ( ) : array
Résultat array

post() public méthode

This is a helper method to do a post request.
public post ( $endpoint, array $postData = [] ) : stdClass
$endpoint
$postData array
Résultat stdClass | null

put() public méthode

This is a helper method to do a put request.
public put ( $endpoint, array $putData = [] ) : stdClass
$endpoint
$putData array
Résultat stdClass | null

setApiBasePath() public méthode

Sets the api base path
public setApiBasePath ( string $apiBasePath )
$apiBasePath string

setAuth() public méthode

Configure the authorization method
public setAuth ( $strategy, array $options )
$strategy
$options array

setDebug() public méthode

Set debug information as an object
public setDebug ( mixed $lastRequestHeaders, mixed $lastRequestBody, mixed $lastResponseCode, string $lastResponseHeaders, mixed $lastResponseError )
$lastRequestHeaders mixed
$lastRequestBody mixed
$lastResponseCode mixed
$lastResponseHeaders string
$lastResponseError mixed

setHeader() public méthode

public setHeader ( string $key, string $value ) : HttpClient
$key string The name of the header to set
$value string The value to set in the header
Résultat HttpClient

setSideload() public méthode

Sideload setter
public setSideload ( array $fields = null ) : HttpClient
$fields array
Résultat HttpClient

Property Details

$apiBasePath protected_oe property

This is appended between the full base domain and the resource endpoint
protected $apiBasePath

$apiUrl protected_oe property

protected string $apiUrl
Résultat string

$auth protected_oe property

protected Auth,Zendesk\API\Utilities $auth
Résultat Zendesk\API\Utilities\Auth

$debug protected_oe property

protected Debug,Zendesk\API $debug
Résultat Zendesk\API\Debug

$embeddable public_oe property

public Embeddable,Zendesk\API\Resources $embeddable
Résultat Zendesk\API\Resources\Embeddable

$guzzle public_oe property

public Client,GuzzleHttp $guzzle
Résultat GuzzleHttp\Client

$helpCenter public_oe property

public HelpCenter,Zendesk\API\Resources $helpCenter
Résultat Zendesk\API\Resources\HelpCenter

$hostname protected_oe property

protected string $hostname
Résultat string

$port protected_oe property

protected int $port
Résultat integer

$scheme protected_oe property

protected string $scheme
Résultat string

$sideload protected_oe property

protected array|null $sideload
Résultat array | null

$subdomain protected_oe property

protected string $subdomain
Résultat string

$voice public_oe property

public Voice,Zendesk\API\Resources $voice
Résultat Zendesk\API\Resources\Voice