PHP Class Intercom\IntercomClient

Show file Open project: intercom/intercom-php Class Usage Examples

Public Properties

Property Type Description
$admins IntercomAdmins
$bulk IntercomBulk
$companies IntercomCompanies
$conversations IntercomConversations
$counts IntercomCounts
$events IntercomEvents
$leads IntercomLeads
$messages IntercomMessages
$segments IntercomSegments
$tags IntercomTags
$users IntercomUsers

Protected Properties

Property Type Description
$passwordPart API password authentication
$usernamePart API user authentication

Public Methods

Method Description
__construct ( string $usernamePart, string $passwordPart ) IntercomClient constructor.
delete ( string $endpoint, string $json ) : mixed Sends DELETE request to Intercom API.
get ( string $endpoint, string $query ) : mixed
getAuth ( ) : array Returns authentication parameters.
nextPage ( array $pages ) : mixed Returns next page of the result.
post ( string $endpoint, string $json ) : mixed Sends POST request to Intercom API.
setClient ( Client $client ) Sets GuzzleHttp client.

Private Methods

Method Description
handleResponse ( Response $response ) : mixed
setDefaultClient ( )

Method Details

__construct() public method

IntercomClient constructor.
public __construct ( string $usernamePart, string $passwordPart )
$usernamePart string App ID.
$passwordPart string Api Key.

delete() public method

Sends DELETE request to Intercom API.
public delete ( string $endpoint, string $json ) : mixed
$endpoint string
$json string
return mixed

get() public method

public get ( string $endpoint, string $query ) : mixed
$endpoint string
$query string
return mixed

getAuth() public method

Returns authentication parameters.
public getAuth ( ) : array
return array

nextPage() public method

Returns next page of the result.
public nextPage ( array $pages ) : mixed
$pages array
return mixed

post() public method

Sends POST request to Intercom API.
public post ( string $endpoint, string $json ) : mixed
$endpoint string
$json string
return mixed

setClient() public method

Sets GuzzleHttp client.
public setClient ( Client $client )
$client GuzzleHttp\Client

Property Details

$admins public property

public IntercomAdmins,intercom $admins
return IntercomAdmins

$bulk public property

public IntercomBulk,intercom $bulk
return IntercomBulk

$companies public property

public IntercomCompanies,intercom $companies
return IntercomCompanies

$conversations public property

public IntercomConversations,intercom $conversations
return IntercomConversations

$counts public property

public IntercomCounts,intercom $counts
return IntercomCounts

$events public property

public IntercomEvents,intercom $events
return IntercomEvents

$leads public property

public IntercomLeads,intercom $leads
return IntercomLeads

$messages public property

public IntercomMessages,intercom $messages
return IntercomMessages

$passwordPart protected property

API password authentication
protected $passwordPart

$segments public property

public IntercomSegments,intercom $segments
return IntercomSegments

$tags public property

public IntercomTags,intercom $tags
return IntercomTags

$usernamePart protected property

API user authentication
protected $usernamePart

$users public property

public IntercomUsers,intercom $users
return IntercomUsers