SevenShores\Hubspot\Resources\Forms::getById PHP Method

getById() public method

Return a single form based on the unique ID of that form.
See also: http://developers.hubspot.com/docs/methods/forms/v2/get_form
public getById ( string $form_guid ) : Response
$form_guid string
return SevenShores\Hubspot\Http\Response
    function getById($form_guid)
    {
        $endpoint = "https://api.hubapi.com/forms/v2/forms/{$form_guid}";
        return $this->client->request('get', $endpoint);
    }

Usage Example

Example #1
0
 /** @test */
 public function getById()
 {
     $form = $this->createForm();
     $response = $this->forms->getById($form->guid);
     $this->assertEquals(200, $response->getStatusCode());
 }