Skip to content

Commit

Permalink
Merge pull request #108 from HubSpot/feature/updateDiscoveries
Browse files Browse the repository at this point in the history
add new client to discoveries
  • Loading branch information
ksvirkou-hubspot authored Mar 21, 2022
2 parents e76cf3a + c05f563 commit 54f26ed
Show file tree
Hide file tree
Showing 24 changed files with 473 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/Discovery/Cms/Discovery.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
* @method Hubdb\Discovery hubdb()
* @method Performance\Discovery performance()
* @method SiteSearch\Discovery siteSearch()
* @method SourceCode\Discovery sourceCode()
* @method UrlRedirects\Discovery urlRedirects()
*/
class Discovery extends DiscoveryBase
Expand Down
21 changes: 21 additions & 0 deletions lib/Discovery/Cms/SourceCode/Discovery.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?php

namespace HubSpot\Discovery\Cms\SourceCode;

use HubSpot\Client\Cms\SourceCode\Api\ContentApi;
use HubSpot\Client\Cms\SourceCode\Api\ExtractApi;
use HubSpot\Client\Cms\SourceCode\Api\MetadataApi;
use HubSpot\Client\Cms\SourceCode\Api\SourceCodeExtractApi;
use HubSpot\Client\Cms\SourceCode\Api\ValidationApi;
use HubSpot\Discovery\DiscoveryBase;

/**
* @method ContentApi contentApi()
* @method ExtractApi extractApi()
* @method MetadataApi metadataApi()
* @method SourceCodeExtractApi sourceCodeExtractApi()
* @method ValidationApi validationApi()
*/
class Discovery extends DiscoveryBase
{
}
19 changes: 19 additions & 0 deletions lib/Discovery/Crm/Objects/Calls/Discovery.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?php

namespace HubSpot\Discovery\Crm\Objects\Calls;

use HubSpot\Client\Crm\Objects\Calls\Api\AssociationsApi;
use HubSpot\Client\Crm\Objects\Calls\Api\BasicApi;
use HubSpot\Client\Crm\Objects\Calls\Api\BatchApi;
use HubSpot\Client\Crm\Objects\Calls\Api\SearchApi;
use HubSpot\Discovery\DiscoveryBase;

/**
* @method AssociationsApi associationsApi()
* @method BasicApi basicApi()
* @method BatchApi batchApi()
* @method SearchApi searchApi()
*/
class Discovery extends DiscoveryBase
{
}
5 changes: 5 additions & 0 deletions lib/Discovery/Crm/Objects/Discovery.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,14 @@
* @method AssociationsApi associationsApi()
* @method BasicApi basicApi()
* @method BatchApi batchApi()
* @method Calls\Discovery сalls()
* @method GDPRApi gdprApi()
* @method Emails\Discovery emails()
* @method FeedbackSubmissions\Discovery feedbackSubmissions()
* @method Meetings\Discovery meetings()
* @method Notes\Discovery notes()
* @method SearchApi searchApi()
* @method Tasks\Discovery tasks()
*/
class Discovery extends DiscoveryBase
{
Expand Down
19 changes: 19 additions & 0 deletions lib/Discovery/Crm/Objects/Emails/Discovery.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?php

namespace HubSpot\Discovery\Crm\Objects\Emails;

use HubSpot\Client\Crm\Objects\Emails\Api\AssociationsApi;
use HubSpot\Client\Crm\Objects\Emails\Api\BasicApi;
use HubSpot\Client\Crm\Objects\Emails\Api\BatchApi;
use HubSpot\Client\Crm\Objects\Emails\Api\SearchApi;
use HubSpot\Discovery\DiscoveryBase;

/**
* @method AssociationsApi associationsApi()
* @method BasicApi basicApi()
* @method BatchApi batchApi()
* @method SearchApi searchApi()
*/
class Discovery extends DiscoveryBase
{
}
19 changes: 19 additions & 0 deletions lib/Discovery/Crm/Objects/Meetings/Discovery.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?php

namespace HubSpot\Discovery\Crm\Objects\Meetings;

use HubSpot\Client\Crm\Objects\Meetings\Api\AssociationsApi;
use HubSpot\Client\Crm\Objects\Meetings\Api\BasicApi;
use HubSpot\Client\Crm\Objects\Meetings\Api\BatchApi;
use HubSpot\Client\Crm\Objects\Meetings\Api\SearchApi;
use HubSpot\Discovery\DiscoveryBase;

/**
* @method AssociationsApi associationsApi()
* @method BasicApi basicApi()
* @method BatchApi batchApi()
* @method SearchApi searchApi()
*/
class Discovery extends DiscoveryBase
{
}
19 changes: 19 additions & 0 deletions lib/Discovery/Crm/Objects/Notes/Discovery.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?php

namespace HubSpot\Discovery\Crm\Objects\Notes;

use HubSpot\Client\Crm\Objects\Notes\Api\AssociationsApi;
use HubSpot\Client\Crm\Objects\Notes\Api\BasicApi;
use HubSpot\Client\Crm\Objects\Notes\Api\BatchApi;
use HubSpot\Client\Crm\Objects\Notes\Api\SearchApi;
use HubSpot\Discovery\DiscoveryBase;

/**
* @method AssociationsApi associationsApi()
* @method BasicApi basicApi()
* @method BatchApi batchApi()
* @method SearchApi searchApi()
*/
class Discovery extends DiscoveryBase
{
}
19 changes: 19 additions & 0 deletions lib/Discovery/Crm/Objects/Tasks/Discovery.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?php

namespace HubSpot\Discovery\Crm\Objects\Tasks;

use HubSpot\Client\Crm\Objects\Tasks\Api\AssociationsApi;
use HubSpot\Client\Crm\Objects\Tasks\Api\BasicApi;
use HubSpot\Client\Crm\Objects\Tasks\Api\BatchApi;
use HubSpot\Client\Crm\Objects\Tasks\Api\SearchApi;
use HubSpot\Discovery\DiscoveryBase;

/**
* @method AssociationsApi associationsApi()
* @method BasicApi basicApi()
* @method BatchApi batchApi()
* @method SearchApi searchApi()
*/
class Discovery extends DiscoveryBase
{
}
1 change: 1 addition & 0 deletions lib/Discovery/Discovery.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
* @method Events\Discovery events()
* @method Files\Discovery files()
* @method Marketing\Discovery marketing()
* @method Settings\Discovery settings()
* @method Webhooks\Discovery webhooks()
*/
class Discovery extends DiscoveryBase
Expand Down
21 changes: 21 additions & 0 deletions lib/Discovery/Marketing/Events/Discovery.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?php

namespace HubSpot\Discovery\Marketing\Events;

use HubSpot\Client\Marketing\Events\Api\BasicApi;
use HubSpot\Client\Marketing\Events\Api\BatchApi;
use HubSpot\Client\Marketing\Events\Api\SearchApi;
use HubSpot\Client\Marketing\Events\Api\SettingsApi;
use HubSpot\Client\Marketing\Events\Api\SubscriberStateChangesApi;
use HubSpot\Discovery\DiscoveryBase;

/**
* @method BasicApi basicApi()
* @method BatchApi batchApi()
* @method SearchApi searchApi()
* @method SettingsApi settingsApi()
* @method SubscriberStateChangesApi subscriberStateChangesApi()
*/
class Discovery extends DiscoveryBase
{
}
12 changes: 12 additions & 0 deletions lib/Discovery/Settings/Discovery.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?php

namespace HubSpot\Discovery\Settings;

use HubSpot\Discovery\DiscoveryBase;

/**
* @method Users\Discovery users()
*/
class Discovery extends DiscoveryBase
{
}
17 changes: 17 additions & 0 deletions lib/Discovery/Settings/Users/Discovery.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?php

namespace HubSpot\Discovery\Settings\Users;

use HubSpot\Client\Settings\Users\Api\RolesApi;
use HubSpot\Client\Settings\Users\Api\TeamsApi;
use HubSpot\Client\Settings\Users\Api\UsersApi;
use HubSpot\Discovery\DiscoveryBase;

/**
* @method RolesApi rolesApi()
* @method TeamsApi teamsApi()
* @method UsersApi usersApi()
*/
class Discovery extends DiscoveryBase
{
}
1 change: 1 addition & 0 deletions tests/spec/Discovery/Cms/DiscoverySpec.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ public function it_creates_clients()
$this->hubdb()->shouldHaveType(\HubSpot\Discovery\Cms\Hubdb\Discovery::class);
$this->performance()->shouldHaveType(\HubSpot\Discovery\Cms\Performance\Discovery::class);
$this->siteSearch()->shouldHaveType(\HubSpot\Discovery\Cms\SiteSearch\Discovery::class);
$this->sourceCode()->shouldHaveType(\HubSpot\Discovery\Cms\SourceCode\Discovery::class);
$this->urlRedirects()->shouldHaveType(\HubSpot\Discovery\Cms\UrlRedirects\Discovery::class);
}
}
34 changes: 34 additions & 0 deletions tests/spec/Discovery/Cms/SourceCode/DiscoverySpec.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<?php

namespace spec\HubSpot\Discovery\Cms\SourceCode;

use GuzzleHttp\Client;
use HubSpot\Client\Cms\SourceCode\Api\ContentApi;
use HubSpot\Client\Cms\SourceCode\Api\ExtractApi;
use HubSpot\Client\Cms\SourceCode\Api\MetadataApi;
use HubSpot\Client\Cms\SourceCode\Api\SourceCodeExtractApi;
use HubSpot\Client\Cms\SourceCode\Api\ValidationApi;
use HubSpot\Config;
use PhpSpec\ObjectBehavior;

class DiscoverySpec extends ObjectBehavior
{
public function let(Client $client, Config $config)
{
$this->beConstructedWith($client, $config);
}

public function it_is_initializable()
{
$this->shouldHaveType(\HubSpot\Discovery\Cms\SourceCode\Discovery::class);
}

public function it_creates_clients()
{
$this->contentApi()->shouldHaveType(ContentApi::class);
$this->extractApi()->shouldHaveType(ExtractApi::class);
$this->metadataApi()->shouldHaveType(MetadataApi::class);
$this->sourceCodeExtractApi()->shouldHaveType(SourceCodeExtractApi::class);
$this->validationApi()->shouldHaveType(ValidationApi::class);
}
}
33 changes: 33 additions & 0 deletions tests/spec/Discovery/Crm/Objects/Calls/DiscoverySpec.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<?php

namespace spec\HubSpot\Discovery\Crm\Objects\Calls;

use GuzzleHttp\Client;
use HubSpot\Client\Crm\Objects\Calls\Api\AssociationsApi;
use HubSpot\Client\Crm\Objects\Calls\Api\BasicApi;
use HubSpot\Client\Crm\Objects\Calls\Api\BatchApi;
use HubSpot\Client\Crm\Objects\Calls\Api\SearchApi;
use HubSpot\Config;
use HubSpot\Discovery\Crm\Objects\Calls\Discovery;
use PhpSpec\ObjectBehavior;

class DiscoverySpec extends ObjectBehavior
{
public function let(Client $client, Config $config)
{
$this->beConstructedWith($client, $config);
}

public function it_is_initializable()
{
$this->shouldHaveType(Discovery::class);
}

public function it_creates_clients()
{
$this->associationsApi()->shouldHaveType(AssociationsApi::class);
$this->basicApi()->shouldHaveType(BasicApi::class);
$this->batchApi()->shouldHaveType(BatchApi::class);
$this->searchApi()->shouldHaveType(SearchApi::class);
}
}
10 changes: 10 additions & 0 deletions tests/spec/Discovery/Crm/Objects/DiscoverySpec.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,13 @@
use HubSpot\Client\Crm\Objects\Api\GDPRApi;
use HubSpot\Client\Crm\Objects\Api\SearchApi;
use HubSpot\Config;
use HubSpot\Discovery\Crm\Objects\Calls\Discovery as CallsDiscovery;
use HubSpot\Discovery\Crm\Objects\Discovery;
use HubSpot\Discovery\Crm\Objects\Emails\Discovery as EmailsDiscovery;
use HubSpot\Discovery\Crm\Objects\FeedbackSubmissions\Discovery as FeedbackSubmissionsDiscovery;
use HubSpot\Discovery\Crm\Objects\Meetings\Discovery as MeetingsDiscovery;
use HubSpot\Discovery\Crm\Objects\Notes\Discovery as NotesDiscovery;
use HubSpot\Discovery\Crm\Objects\Tasks\Discovery as TasksDiscovery;
use PhpSpec\ObjectBehavior;

class DiscoverySpec extends ObjectBehavior
Expand All @@ -30,8 +35,13 @@ public function it_creates_clients()
$this->associationsApi()->shouldHaveType(AssociationsApi::class);
$this->basicApi()->shouldHaveType(BasicApi::class);
$this->batchApi()->shouldHaveType(BatchApi::class);
$this->calls()->shouldHaveType(CallsDiscovery::class);
$this->gdprApi()->shouldHaveType(GDPRApi::class);
$this->emails()->shouldHaveType(EmailsDiscovery::class);
$this->feedbackSubmissions()->shouldHaveType(FeedbackSubmissionsDiscovery::class);
$this->meetings()->shouldHaveType(MeetingsDiscovery::class);
$this->notes()->shouldHaveType(NotesDiscovery::class);
$this->searchApi()->shouldHaveType(SearchApi::class);
$this->tasks()->shouldHaveType(TasksDiscovery::class);
}
}
33 changes: 33 additions & 0 deletions tests/spec/Discovery/Crm/Objects/Emails/DiscoverySpec.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<?php

namespace spec\HubSpot\Discovery\Crm\Objects\Emails;

use GuzzleHttp\Client;
use HubSpot\Client\Crm\Objects\Emails\Api\AssociationsApi;
use HubSpot\Client\Crm\Objects\Emails\Api\BasicApi;
use HubSpot\Client\Crm\Objects\Emails\Api\BatchApi;
use HubSpot\Client\Crm\Objects\Emails\Api\SearchApi;
use HubSpot\Config;
use HubSpot\Discovery\Crm\Objects\Emails\Discovery;
use PhpSpec\ObjectBehavior;

class DiscoverySpec extends ObjectBehavior
{
public function let(Client $client, Config $config)
{
$this->beConstructedWith($client, $config);
}

public function it_is_initializable()
{
$this->shouldHaveType(Discovery::class);
}

public function it_creates_clients()
{
$this->associationsApi()->shouldHaveType(AssociationsApi::class);
$this->basicApi()->shouldHaveType(BasicApi::class);
$this->batchApi()->shouldHaveType(BatchApi::class);
$this->searchApi()->shouldHaveType(SearchApi::class);
}
}
33 changes: 33 additions & 0 deletions tests/spec/Discovery/Crm/Objects/Meetings/DiscoverySpec.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<?php

namespace spec\HubSpot\Discovery\Crm\Objects\Meetings;

use GuzzleHttp\Client;
use HubSpot\Client\Crm\Objects\Meetings\Api\AssociationsApi;
use HubSpot\Client\Crm\Objects\Meetings\Api\BasicApi;
use HubSpot\Client\Crm\Objects\Meetings\Api\BatchApi;
use HubSpot\Client\Crm\Objects\Meetings\Api\SearchApi;
use HubSpot\Config;
use HubSpot\Discovery\Crm\Objects\Meetings\Discovery;
use PhpSpec\ObjectBehavior;

class DiscoverySpec extends ObjectBehavior
{
public function let(Client $client, Config $config)
{
$this->beConstructedWith($client, $config);
}

public function it_is_initializable()
{
$this->shouldHaveType(Discovery::class);
}

public function it_creates_clients()
{
$this->associationsApi()->shouldHaveType(AssociationsApi::class);
$this->basicApi()->shouldHaveType(BasicApi::class);
$this->batchApi()->shouldHaveType(BatchApi::class);
$this->searchApi()->shouldHaveType(SearchApi::class);
}
}
Loading

0 comments on commit 54f26ed

Please sign in to comment.