PHP Class SevenShores\Hubspot\Http\Client

Show file Open project: fungku/hubspot-php

Public Properties

Property Type Description
$client GuzzleHttp\Client
$key string
$oauth boolean
$oauth2 boolean
$userId integer

Public Methods

Method Description
__construct ( array $config = [], Client $client = null ) Make it, baby.
request ( string $method, string $endpoint, array $options = [], string $query_string = null, boolean $requires_auth = true ) : Response Send the request.

Protected Methods

Method Description
generateUrl ( string $endpoint, string $query_string = null, boolean $requires_auth = true ) : string Generate the full endpoint url, including query string.

Method Details

__construct() public method

Make it, baby.
public __construct ( array $config = [], Client $client = null )
$config array Configuration array
$client GuzzleHttp\Client The Http Client (Defaults to Guzzle)

generateUrl() protected method

Generate the full endpoint url, including query string.
protected generateUrl ( string $endpoint, string $query_string = null, boolean $requires_auth = true ) : string
$endpoint string The HubSpot API endpoint.
$query_string string The query string to send to the endpoint.
$requires_auth boolean Whether or not this HubSpot API endpoint requires authentication
return string

request() public method

..
public request ( string $method, string $endpoint, array $options = [], string $query_string = null, boolean $requires_auth = true ) : Response
$method string The HTTP request verb
$endpoint string The Hubspot API endpoint
$options array An array of options to send with the request
$query_string string A query string to send with the request
$requires_auth boolean Whether or not this HubSpot API endpoint requires authentication
return Response

Property Details

$client public property

public Client,GuzzleHttp $client
return GuzzleHttp\Client

$key public property

public string $key
return string

$oauth public property

public bool $oauth
return boolean

$oauth2 public property

public bool $oauth2
return boolean

$userId public property

public int $userId
return integer