Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- // Example Without Factory
- $client = new hubspot\Http\Client(['key' => '5977bdcd-f966-493d-af93-9982ec46aafd']);
- $contacts = new hubspot\Resources\Contacts($client);
- $response = $contacts->all();
- foreach ($response->contacts as $contact) {
- }
- // ------- //
- // Example With Factory
- $hubspot = hubspot\Factory::create('5977bdcd-f966-493d-af93-9982ec46aafd');
- $new_contact = $hubspot->create([
- 'email' => 'testcontact@gmail.com',
- 'firstname' => 'Adrian',
- 'lastname' => 'Mott',
- ]);
- $get_contact = $hubspot->contacts()->getByEmail("testcontact@gmail.com");
- $get_all_contacts = $hubspot->contacts()->all([
- 'count' => 10,
- 'property' => ['firstname', 'lastname'],
- 'vidOffset' => 123456,
- ]);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement