Skip to content

Commit 6aee035

Browse files
committed
Add ClientIntface
1 parent fb7bf78 commit 6aee035

File tree

7 files changed

+65
-15
lines changed

7 files changed

+65
-15
lines changed

composer.lock

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/OpenAPI/ApiGitHubCom/Client.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
namespace ApiClients\Client\Github\OpenAPI\ApiGitHubCom;
44

5-
final class Client
5+
final class Client implements ClientInterface
66
{
77
private readonly \ApiClients\Contracts\HTTP\Headers\AuthenticationInterface $authentication;
88
private readonly \React\Http\Browser $browser;
@@ -2585,11 +2585,11 @@ public function call(string $call, array $params = array()) : \React\Promise\Pro
25852585
case \ApiClients\Client\Github\OpenAPI\ApiGitHubCom\Operation\Orgs\ListPendingInvitations::OPERATION_MATCH:
25862586
$requestBodyData = array();
25872587
foreach (\array_keys($params) as $param) {
2588-
if (\in_array($param, array('org', 'per_page', 'page')) != false) {
2588+
if (\in_array($param, array('org', 'per_page', 'page', 'role', 'invitation_source')) != false) {
25892589
\array_push($requestBodyData, $param);
25902590
}
25912591
}
2592-
$operation = $this->orgs()->listPendingInvitations($params['org'], $params['per_page'], $params['page']);
2592+
$operation = $this->orgs()->listPendingInvitations($params['org'], $params['per_page'], $params['page'], $params['role'], $params['invitation_source']);
25932593
$request = $operation->createRequest($requestBodyData);
25942594
return $this->browser->request($request->getMethod(), $request->getUri(), $request->withHeader('Authorization', $this->authentication->authHeader())->getHeaders(), $request->getBody())->then(function (\Psr\Http\Message\ResponseInterface $response) use($operation) : \Rx\Observable|\ApiClients\Client\Github\OpenAPI\ApiGitHubCom\Schema\BasicError {
25952595
return $operation->createResponse($response);

src/OpenAPI/ApiGitHubCom/ClientInterface.php

Lines changed: 44 additions & 0 deletions
Large diffs are not rendered by default.

src/OpenAPI/ApiGitHubCom/Operation/Orgs.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,9 +93,9 @@ public function listAppInstallations(string $org, int $per_page = 30, int $page
9393
{
9494
return new \ApiClients\Client\Github\OpenAPI\ApiGitHubCom\Operation\Orgs\ListAppInstallations($this->requestSchemaValidator, $this->responseSchemaValidator, $this->hydrator, $org, $per_page, $page);
9595
}
96-
public function listPendingInvitations(string $org, int $per_page = 30, int $page = 1) : \ApiClients\Client\Github\OpenAPI\ApiGitHubCom\Operation\Orgs\ListPendingInvitations
96+
public function listPendingInvitations(string $org, int $per_page = 30, int $page = 1, string $role = 'all', string $invitation_source = 'all') : \ApiClients\Client\Github\OpenAPI\ApiGitHubCom\Operation\Orgs\ListPendingInvitations
9797
{
98-
return new \ApiClients\Client\Github\OpenAPI\ApiGitHubCom\Operation\Orgs\ListPendingInvitations($this->requestSchemaValidator, $this->responseSchemaValidator, $this->hydrator, $org, $per_page, $page);
98+
return new \ApiClients\Client\Github\OpenAPI\ApiGitHubCom\Operation\Orgs\ListPendingInvitations($this->requestSchemaValidator, $this->responseSchemaValidator, $this->hydrator, $org, $per_page, $page, $role, $invitation_source);
9999
}
100100
public function createInvitation(string $org) : \ApiClients\Client\Github\OpenAPI\ApiGitHubCom\Operation\Orgs\CreateInvitation
101101
{

src/OpenAPI/ApiGitHubCom/Operation/Orgs/ListPendingInvitations.php

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,22 +15,28 @@ final class ListPendingInvitations
1515
private int $per_page;
1616
/**Page number of the results to fetch.**/
1717
private int $page;
18+
/**Filter invitations by their member role.**/
19+
private string $role;
20+
/**Filter invitations by their invitation source.**/
21+
private string $invitation_source;
1822
public function operationId() : string
1923
{
2024
return self::OPERATION_ID;
2125
}
22-
public function __construct(\League\OpenAPIValidation\Schema\SchemaValidator $requestSchemaValidator, \League\OpenAPIValidation\Schema\SchemaValidator $responseSchemaValidator, \ApiClients\Client\Github\OpenAPI\ApiGitHubCom\OptimizedHydratorMapper $hydrator, string $org, int $per_page = 30, int $page = 1)
26+
public function __construct(\League\OpenAPIValidation\Schema\SchemaValidator $requestSchemaValidator, \League\OpenAPIValidation\Schema\SchemaValidator $responseSchemaValidator, \ApiClients\Client\Github\OpenAPI\ApiGitHubCom\OptimizedHydratorMapper $hydrator, string $org, int $per_page = 30, int $page = 1, string $role = 'all', string $invitation_source = 'all')
2327
{
2428
$this->requestSchemaValidator = $requestSchemaValidator;
2529
$this->responseSchemaValidator = $responseSchemaValidator;
2630
$this->hydrator = $hydrator;
2731
$this->org = $org;
2832
$this->per_page = $per_page;
2933
$this->page = $page;
34+
$this->role = $role;
35+
$this->invitation_source = $invitation_source;
3036
}
3137
function createRequest(array $data = array()) : \Psr\Http\Message\RequestInterface
3238
{
33-
return new \RingCentral\Psr7\Request('GET', \str_replace(array('{org}', '{per_page}', '{page}'), array($this->org, $this->per_page, $this->page), '/orgs/{org}/invitations?per_page={per_page}&page={page}'));
39+
return new \RingCentral\Psr7\Request('GET', \str_replace(array('{org}', '{per_page}', '{page}', '{role}', '{invitation_source}'), array($this->org, $this->per_page, $this->page, $this->role, $this->invitation_source), '/orgs/{org}/invitations?per_page={per_page}&page={page}&role={role}&invitation_source={invitation_source}'));
3440
}
3541
/**
3642
* @return \Rx\Observable<\ApiClients\Client\Github\OpenAPI\ApiGitHubCom\Schema\OrganizationInvitation>|\ApiClients\Client\Github\OpenAPI\ApiGitHubCom\Schema\BasicError

src/OpenAPI/ApiGitHubCom/Path/Orgs/CbOrgRcb/Invitations.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44

55
final class Invitations
66
{
7-
function get($org, int $per_page = 30, int $page = 1) : \ApiClients\Client\Github\OpenAPI\ApiGitHubCom\Operation\Orgs\ListPendingInvitations
7+
function get($org, int $per_page = 30, int $page = 1, string $role = 'all', string $invitation_source = 'all') : \ApiClients\Client\Github\OpenAPI\ApiGitHubCom\Operation\Orgs\ListPendingInvitations
88
{
9-
return new \ApiClients\Client\Github\OpenAPI\ApiGitHubCom\Operation\Orgs\ListPendingInvitations($org, $per_page, $page);
9+
return new \ApiClients\Client\Github\OpenAPI\ApiGitHubCom\Operation\Orgs\ListPendingInvitations($org, $per_page, $page, $role, $invitation_source);
1010
}
1111
function post($org) : \ApiClients\Client\Github\OpenAPI\ApiGitHubCom\Operation\Orgs\CreateInvitation
1212
{

0 commit comments

Comments
 (0)