id int32 0 241k | repo stringlengths 6 63 | path stringlengths 5 140 | func_name stringlengths 3 151 | original_string stringlengths 84 13k | language stringclasses 1 value | code stringlengths 84 13k | code_tokens list | docstring stringlengths 3 47.2k | docstring_tokens list | sha stringlengths 40 40 | url stringlengths 91 247 |
|---|---|---|---|---|---|---|---|---|---|---|---|
38,700 | FlexyProject/GitHubAPI | lib/GitHub/Receiver/Activity/Events.php | Events.listRepositoryEvents | public function listRepositoryEvents(): array
{
return $this->getApi()->request($this->getApi()
->sprintf('/repos/:owner/:repo/events', $this->getActivity()->getOwner(),
$this->getActivity()->getRepo()));
} | php | public function listRepositoryEvents(): array
{
return $this->getApi()->request($this->getApi()
->sprintf('/repos/:owner/:repo/events', $this->getActivity()->getOwner(),
$this->getActivity()->getRepo()));
} | [
"public",
"function",
"listRepositoryEvents",
"(",
")",
":",
"array",
"{",
"return",
"$",
"this",
"->",
"getApi",
"(",
")",
"->",
"request",
"(",
"$",
"this",
"->",
"getApi",
"(",
")",
"->",
"sprintf",
"(",
"'/repos/:owner/:repo/events'",
",",
"$",
"this",... | List repository events
@link https://developer.github.com/v3/activity/events/#list-repository-events
@return array | [
"List",
"repository",
"events"
] | cb5044443daf138787a7feb9aa9bf50220a44fd6 | https://github.com/FlexyProject/GitHubAPI/blob/cb5044443daf138787a7feb9aa9bf50220a44fd6/lib/GitHub/Receiver/Activity/Events.php#L31-L36 |
38,701 | FlexyProject/GitHubAPI | lib/GitHub/Receiver/Activity/Events.php | Events.listIssueEvents | public function listIssueEvents(): array
{
return $this->getApi()->request($this->getApi()->sprintf('/repos/:owner/:repo/issues/events',
$this->getActivity()->getOwner(), $this->getActivity()->getRepo()));
} | php | public function listIssueEvents(): array
{
return $this->getApi()->request($this->getApi()->sprintf('/repos/:owner/:repo/issues/events',
$this->getActivity()->getOwner(), $this->getActivity()->getRepo()));
} | [
"public",
"function",
"listIssueEvents",
"(",
")",
":",
"array",
"{",
"return",
"$",
"this",
"->",
"getApi",
"(",
")",
"->",
"request",
"(",
"$",
"this",
"->",
"getApi",
"(",
")",
"->",
"sprintf",
"(",
"'/repos/:owner/:repo/issues/events'",
",",
"$",
"this... | List issue events for a repository
@link https://developer.github.com/v3/activity/events/#list-issue-events-for-a-repository
@return array | [
"List",
"issue",
"events",
"for",
"a",
"repository"
] | cb5044443daf138787a7feb9aa9bf50220a44fd6 | https://github.com/FlexyProject/GitHubAPI/blob/cb5044443daf138787a7feb9aa9bf50220a44fd6/lib/GitHub/Receiver/Activity/Events.php#L44-L48 |
38,702 | FlexyProject/GitHubAPI | lib/GitHub/Receiver/Activity/Events.php | Events.listPublicNetworkEvents | public function listPublicNetworkEvents(): array
{
return $this->getApi()->request($this->getApi()->sprintf('/networks/:owner/:repo/events',
$this->getActivity()->getOwner(), $this->getActivity()->getRepo()));
} | php | public function listPublicNetworkEvents(): array
{
return $this->getApi()->request($this->getApi()->sprintf('/networks/:owner/:repo/events',
$this->getActivity()->getOwner(), $this->getActivity()->getRepo()));
} | [
"public",
"function",
"listPublicNetworkEvents",
"(",
")",
":",
"array",
"{",
"return",
"$",
"this",
"->",
"getApi",
"(",
")",
"->",
"request",
"(",
"$",
"this",
"->",
"getApi",
"(",
")",
"->",
"sprintf",
"(",
"'/networks/:owner/:repo/events'",
",",
"$",
"... | List public events for a network of repositories
@link https://developer.github.com/v3/activity/events/#list-public-events-for-a-network-of-repositories
@return array | [
"List",
"public",
"events",
"for",
"a",
"network",
"of",
"repositories"
] | cb5044443daf138787a7feb9aa9bf50220a44fd6 | https://github.com/FlexyProject/GitHubAPI/blob/cb5044443daf138787a7feb9aa9bf50220a44fd6/lib/GitHub/Receiver/Activity/Events.php#L56-L60 |
38,703 | FlexyProject/GitHubAPI | lib/GitHub/Receiver/Activity/Events.php | Events.listPublicOrganizationEvents | public function listPublicOrganizationEvents(string $organization): array
{
return $this->getApi()->request($this->getApi()->sprintf('/orgs/:org/events', $organization));
} | php | public function listPublicOrganizationEvents(string $organization): array
{
return $this->getApi()->request($this->getApi()->sprintf('/orgs/:org/events', $organization));
} | [
"public",
"function",
"listPublicOrganizationEvents",
"(",
"string",
"$",
"organization",
")",
":",
"array",
"{",
"return",
"$",
"this",
"->",
"getApi",
"(",
")",
"->",
"request",
"(",
"$",
"this",
"->",
"getApi",
"(",
")",
"->",
"sprintf",
"(",
"'/orgs/:o... | List public events for an organization
@link https://developer.github.com/v3/activity/events/#list-public-events-for-an-organization
@param string $organization
@return array | [
"List",
"public",
"events",
"for",
"an",
"organization"
] | cb5044443daf138787a7feb9aa9bf50220a44fd6 | https://github.com/FlexyProject/GitHubAPI/blob/cb5044443daf138787a7feb9aa9bf50220a44fd6/lib/GitHub/Receiver/Activity/Events.php#L71-L74 |
38,704 | FlexyProject/GitHubAPI | lib/GitHub/Receiver/Activity/Events.php | Events.listUserReceiveEvents | public function listUserReceiveEvents(string $username): array
{
return $this->getApi()->request($this->getApi()->sprintf('/users/:username/received_events', $username));
} | php | public function listUserReceiveEvents(string $username): array
{
return $this->getApi()->request($this->getApi()->sprintf('/users/:username/received_events', $username));
} | [
"public",
"function",
"listUserReceiveEvents",
"(",
"string",
"$",
"username",
")",
":",
"array",
"{",
"return",
"$",
"this",
"->",
"getApi",
"(",
")",
"->",
"request",
"(",
"$",
"this",
"->",
"getApi",
"(",
")",
"->",
"sprintf",
"(",
"'/users/:username/re... | List events that a user has received
@link https://developer.github.com/v3/activity/events/#list-events-that-a-user-has-received
@param string $username
@return array | [
"List",
"events",
"that",
"a",
"user",
"has",
"received"
] | cb5044443daf138787a7feb9aa9bf50220a44fd6 | https://github.com/FlexyProject/GitHubAPI/blob/cb5044443daf138787a7feb9aa9bf50220a44fd6/lib/GitHub/Receiver/Activity/Events.php#L85-L88 |
38,705 | FlexyProject/GitHubAPI | lib/GitHub/Receiver/Activity/Events.php | Events.listPublicUserReceiveEvents | public function listPublicUserReceiveEvents(string $username): array
{
return $this->getApi()->request($this->getApi()->sprintf('/users/:username/received_events/public', $username));
} | php | public function listPublicUserReceiveEvents(string $username): array
{
return $this->getApi()->request($this->getApi()->sprintf('/users/:username/received_events/public', $username));
} | [
"public",
"function",
"listPublicUserReceiveEvents",
"(",
"string",
"$",
"username",
")",
":",
"array",
"{",
"return",
"$",
"this",
"->",
"getApi",
"(",
")",
"->",
"request",
"(",
"$",
"this",
"->",
"getApi",
"(",
")",
"->",
"sprintf",
"(",
"'/users/:usern... | List public events that a user has received
@link https://developer.github.com/v3/activity/events/#list-public-events-that-a-user-has-received
@param string $username
@return array | [
"List",
"public",
"events",
"that",
"a",
"user",
"has",
"received"
] | cb5044443daf138787a7feb9aa9bf50220a44fd6 | https://github.com/FlexyProject/GitHubAPI/blob/cb5044443daf138787a7feb9aa9bf50220a44fd6/lib/GitHub/Receiver/Activity/Events.php#L99-L102 |
38,706 | FlexyProject/GitHubAPI | lib/GitHub/Receiver/Activity/Events.php | Events.listUserPerformedEvents | public function listUserPerformedEvents(string $username): array
{
return $this->getApi()->request($this->getApi()->sprintf('/users/:username/events', $username));
} | php | public function listUserPerformedEvents(string $username): array
{
return $this->getApi()->request($this->getApi()->sprintf('/users/:username/events', $username));
} | [
"public",
"function",
"listUserPerformedEvents",
"(",
"string",
"$",
"username",
")",
":",
"array",
"{",
"return",
"$",
"this",
"->",
"getApi",
"(",
")",
"->",
"request",
"(",
"$",
"this",
"->",
"getApi",
"(",
")",
"->",
"sprintf",
"(",
"'/users/:username/... | List events performed by a user
@link https://developer.github.com/v3/activity/events/#list-events-performed-by-a-user
@param string $username
@return array | [
"List",
"events",
"performed",
"by",
"a",
"user"
] | cb5044443daf138787a7feb9aa9bf50220a44fd6 | https://github.com/FlexyProject/GitHubAPI/blob/cb5044443daf138787a7feb9aa9bf50220a44fd6/lib/GitHub/Receiver/Activity/Events.php#L113-L116 |
38,707 | FlexyProject/GitHubAPI | lib/GitHub/Receiver/Activity/Events.php | Events.listPublicUserPerformedEvents | public function listPublicUserPerformedEvents(string $username): array
{
return $this->getApi()->request($this->getApi()->sprintf('/users/:username/events/public', $username));
} | php | public function listPublicUserPerformedEvents(string $username): array
{
return $this->getApi()->request($this->getApi()->sprintf('/users/:username/events/public', $username));
} | [
"public",
"function",
"listPublicUserPerformedEvents",
"(",
"string",
"$",
"username",
")",
":",
"array",
"{",
"return",
"$",
"this",
"->",
"getApi",
"(",
")",
"->",
"request",
"(",
"$",
"this",
"->",
"getApi",
"(",
")",
"->",
"sprintf",
"(",
"'/users/:use... | List public events performed by a user
@link https://developer.github.com/v3/activity/events/#list-public-events-performed-by-a-user
@param string $username
@return array | [
"List",
"public",
"events",
"performed",
"by",
"a",
"user"
] | cb5044443daf138787a7feb9aa9bf50220a44fd6 | https://github.com/FlexyProject/GitHubAPI/blob/cb5044443daf138787a7feb9aa9bf50220a44fd6/lib/GitHub/Receiver/Activity/Events.php#L127-L130 |
38,708 | FlexyProject/GitHubAPI | lib/GitHub/Receiver/Activity/Events.php | Events.listOrganizationEvents | public function listOrganizationEvents(string $username, string $organization): array
{
return $this->getApi()->request($this->getApi()
->sprintf('/users/:username/events/orgs/:org', $username, $organization));
} | php | public function listOrganizationEvents(string $username, string $organization): array
{
return $this->getApi()->request($this->getApi()
->sprintf('/users/:username/events/orgs/:org', $username, $organization));
} | [
"public",
"function",
"listOrganizationEvents",
"(",
"string",
"$",
"username",
",",
"string",
"$",
"organization",
")",
":",
"array",
"{",
"return",
"$",
"this",
"->",
"getApi",
"(",
")",
"->",
"request",
"(",
"$",
"this",
"->",
"getApi",
"(",
")",
"->"... | List events for an organization
@link https://developer.github.com/v3/activity/events/#list-events-for-an-organization
@param string $username
@param string $organization
@return array | [
"List",
"events",
"for",
"an",
"organization"
] | cb5044443daf138787a7feb9aa9bf50220a44fd6 | https://github.com/FlexyProject/GitHubAPI/blob/cb5044443daf138787a7feb9aa9bf50220a44fd6/lib/GitHub/Receiver/Activity/Events.php#L142-L146 |
38,709 | FlexyProject/GitHubAPI | lib/GitHub/Receiver/Repositories/Releases.php | Releases.listReleases | public function listReleases(): array
{
return $this->getApi()->request($this->getApi()->sprintf('/repos/:owner/:repo/releases',
$this->getRepositories()->getOwner(), $this->getRepositories()->getRepo()));
} | php | public function listReleases(): array
{
return $this->getApi()->request($this->getApi()->sprintf('/repos/:owner/:repo/releases',
$this->getRepositories()->getOwner(), $this->getRepositories()->getRepo()));
} | [
"public",
"function",
"listReleases",
"(",
")",
":",
"array",
"{",
"return",
"$",
"this",
"->",
"getApi",
"(",
")",
"->",
"request",
"(",
"$",
"this",
"->",
"getApi",
"(",
")",
"->",
"sprintf",
"(",
"'/repos/:owner/:repo/releases'",
",",
"$",
"this",
"->... | List releases for a repository
@link https://developer.github.com/v3/repos/releases/#list-releases-for-a-repository
@return array | [
"List",
"releases",
"for",
"a",
"repository"
] | cb5044443daf138787a7feb9aa9bf50220a44fd6 | https://github.com/FlexyProject/GitHubAPI/blob/cb5044443daf138787a7feb9aa9bf50220a44fd6/lib/GitHub/Receiver/Repositories/Releases.php#L23-L27 |
38,710 | FlexyProject/GitHubAPI | lib/GitHub/Receiver/Repositories/Releases.php | Releases.getReleaseByTagName | public function getReleaseByTagName(string $tag): array
{
return $this->getApi()->request($this->getApi()->sprintf('/repos/:owner/:repo/releases/tags/:tag',
$this->getRepositories()->getOwner(), $this->getRepositories()->getRepo(), $tag));
} | php | public function getReleaseByTagName(string $tag): array
{
return $this->getApi()->request($this->getApi()->sprintf('/repos/:owner/:repo/releases/tags/:tag',
$this->getRepositories()->getOwner(), $this->getRepositories()->getRepo(), $tag));
} | [
"public",
"function",
"getReleaseByTagName",
"(",
"string",
"$",
"tag",
")",
":",
"array",
"{",
"return",
"$",
"this",
"->",
"getApi",
"(",
")",
"->",
"request",
"(",
"$",
"this",
"->",
"getApi",
"(",
")",
"->",
"sprintf",
"(",
"'/repos/:owner/:repo/releas... | Get a release by tag name
@link https://developer.github.com/v3/repos/releases/#get-a-release-by-tag-name
@param string $tag
@return array
@throws \Exception | [
"Get",
"a",
"release",
"by",
"tag",
"name"
] | cb5044443daf138787a7feb9aa9bf50220a44fd6 | https://github.com/FlexyProject/GitHubAPI/blob/cb5044443daf138787a7feb9aa9bf50220a44fd6/lib/GitHub/Receiver/Repositories/Releases.php#L67-L71 |
38,711 | FlexyProject/GitHubAPI | lib/GitHub/Receiver/Repositories/Releases.php | Releases.createRelease | public function createRelease(string $tagName, string $targetCommitish = AbstractApi::BRANCH_MASTER,
string $name = null, string $body = null, bool $draft = false,
bool $preRelease = false): array
{
return $this->getApi()->request($this->getApi()->sprintf('/repos/:owner/:repo/releases',
$this->getRepositories()->getOwner(), $this->getRepositories()->getRepo()), Request::METHOD_POST, [
'tag_name' => $tagName,
'target_commitish' => $targetCommitish,
'name' => $name,
'body' => $body,
'draft' => $draft,
'prerelease' => $preRelease
]);
} | php | public function createRelease(string $tagName, string $targetCommitish = AbstractApi::BRANCH_MASTER,
string $name = null, string $body = null, bool $draft = false,
bool $preRelease = false): array
{
return $this->getApi()->request($this->getApi()->sprintf('/repos/:owner/:repo/releases',
$this->getRepositories()->getOwner(), $this->getRepositories()->getRepo()), Request::METHOD_POST, [
'tag_name' => $tagName,
'target_commitish' => $targetCommitish,
'name' => $name,
'body' => $body,
'draft' => $draft,
'prerelease' => $preRelease
]);
} | [
"public",
"function",
"createRelease",
"(",
"string",
"$",
"tagName",
",",
"string",
"$",
"targetCommitish",
"=",
"AbstractApi",
"::",
"BRANCH_MASTER",
",",
"string",
"$",
"name",
"=",
"null",
",",
"string",
"$",
"body",
"=",
"null",
",",
"bool",
"$",
"dra... | Create a release
@link https://developer.github.com/v3/repos/releases/#create-a-release
@param string $tagName
@param string $targetCommitish
@param string $name
@param string $body
@param bool $draft
@param bool $preRelease
@return array | [
"Create",
"a",
"release"
] | cb5044443daf138787a7feb9aa9bf50220a44fd6 | https://github.com/FlexyProject/GitHubAPI/blob/cb5044443daf138787a7feb9aa9bf50220a44fd6/lib/GitHub/Receiver/Repositories/Releases.php#L87-L100 |
38,712 | FlexyProject/GitHubAPI | lib/GitHub/Receiver/Repositories/Releases.php | Releases.editRelease | public function editRelease(string $id, string $tagName, string $targetCommitish = AbstractApi::BRANCH_MASTER,
string $name, string $body, bool $draft = false, bool $preRelease = false): array
{
return $this->getApi()->request($this->getApi()->sprintf('/repos/:owner/:repo/releases/:id',
$this->getRepositories()->getOwner(), $this->getRepositories()->getRepo(), $id), Request::METHOD_PATCH, [
'tag_name' => $tagName,
'target_commitish' => $targetCommitish,
'name' => $name,
'body' => $body,
'draft' => $draft,
'prerelease' => $preRelease
]);
} | php | public function editRelease(string $id, string $tagName, string $targetCommitish = AbstractApi::BRANCH_MASTER,
string $name, string $body, bool $draft = false, bool $preRelease = false): array
{
return $this->getApi()->request($this->getApi()->sprintf('/repos/:owner/:repo/releases/:id',
$this->getRepositories()->getOwner(), $this->getRepositories()->getRepo(), $id), Request::METHOD_PATCH, [
'tag_name' => $tagName,
'target_commitish' => $targetCommitish,
'name' => $name,
'body' => $body,
'draft' => $draft,
'prerelease' => $preRelease
]);
} | [
"public",
"function",
"editRelease",
"(",
"string",
"$",
"id",
",",
"string",
"$",
"tagName",
",",
"string",
"$",
"targetCommitish",
"=",
"AbstractApi",
"::",
"BRANCH_MASTER",
",",
"string",
"$",
"name",
",",
"string",
"$",
"body",
",",
"bool",
"$",
"draft... | Edit a release
@link https://developer.github.com/v3/repos/releases/#edit-a-release
@param string $id
@param string $tagName
@param string $targetCommitish
@param string $name
@param string $body
@param bool $draft
@param bool $preRelease
@return array | [
"Edit",
"a",
"release"
] | cb5044443daf138787a7feb9aa9bf50220a44fd6 | https://github.com/FlexyProject/GitHubAPI/blob/cb5044443daf138787a7feb9aa9bf50220a44fd6/lib/GitHub/Receiver/Repositories/Releases.php#L117-L129 |
38,713 | FlexyProject/GitHubAPI | lib/GitHub/Receiver/Repositories/Releases.php | Releases.deleteRelease | public function deleteRelease(string $id): bool
{
$this->getApi()->request($this->getApi()->sprintf('/repos/:owner/:repo/releases/:id',
$this->getRepositories()->getOwner(), $this->getRepositories()->getRepo(), $id), Request::METHOD_DELETE);
if ($this->getApi()->getHeaders()['Status'] == '204 No Content') {
return true;
}
return false;
} | php | public function deleteRelease(string $id): bool
{
$this->getApi()->request($this->getApi()->sprintf('/repos/:owner/:repo/releases/:id',
$this->getRepositories()->getOwner(), $this->getRepositories()->getRepo(), $id), Request::METHOD_DELETE);
if ($this->getApi()->getHeaders()['Status'] == '204 No Content') {
return true;
}
return false;
} | [
"public",
"function",
"deleteRelease",
"(",
"string",
"$",
"id",
")",
":",
"bool",
"{",
"$",
"this",
"->",
"getApi",
"(",
")",
"->",
"request",
"(",
"$",
"this",
"->",
"getApi",
"(",
")",
"->",
"sprintf",
"(",
"'/repos/:owner/:repo/releases/:id'",
",",
"... | Delete a release
@link https://developer.github.com/v3/repos/releases/#delete-a-release
@param string $id
@return bool | [
"Delete",
"a",
"release"
] | cb5044443daf138787a7feb9aa9bf50220a44fd6 | https://github.com/FlexyProject/GitHubAPI/blob/cb5044443daf138787a7feb9aa9bf50220a44fd6/lib/GitHub/Receiver/Repositories/Releases.php#L140-L150 |
38,714 | FlexyProject/GitHubAPI | lib/GitHub/Receiver/Repositories/Releases.php | Releases.getReleaseAssets | public function getReleaseAssets(string $id): array
{
return $this->getApi()->request($this->getApi()->sprintf('/repos/:owner/:repo/releases/:id/assets',
$this->getRepositories()->getOwner(), $this->getRepositories()->getRepo(), $id));
} | php | public function getReleaseAssets(string $id): array
{
return $this->getApi()->request($this->getApi()->sprintf('/repos/:owner/:repo/releases/:id/assets',
$this->getRepositories()->getOwner(), $this->getRepositories()->getRepo(), $id));
} | [
"public",
"function",
"getReleaseAssets",
"(",
"string",
"$",
"id",
")",
":",
"array",
"{",
"return",
"$",
"this",
"->",
"getApi",
"(",
")",
"->",
"request",
"(",
"$",
"this",
"->",
"getApi",
"(",
")",
"->",
"sprintf",
"(",
"'/repos/:owner/:repo/releases/:... | List assets for a release
@link https://developer.github.com/v3/repos/releases/#list-assets-for-a-release
@param string $id
@return array | [
"List",
"assets",
"for",
"a",
"release"
] | cb5044443daf138787a7feb9aa9bf50220a44fd6 | https://github.com/FlexyProject/GitHubAPI/blob/cb5044443daf138787a7feb9aa9bf50220a44fd6/lib/GitHub/Receiver/Repositories/Releases.php#L161-L165 |
38,715 | FlexyProject/GitHubAPI | lib/GitHub/Receiver/Repositories/Releases.php | Releases.uploadReleaseAsset | public function uploadReleaseAsset(string $id, string $contentType, string $name): array
{
return $this->getApi()->setApiUrl(AbstractApi::API_UPLOADS)->request($this->getApi()
->sprintf('/repos/:owner/:repo/releases/:id/assets?:arg',
$this->getRepositories()
->getOwner(),
$this->getRepositories()
->getRepo(), $id,
http_build_query(['name' => $name])),
Request::METHOD_POST, [
'Content-Type' => $contentType
]);
} | php | public function uploadReleaseAsset(string $id, string $contentType, string $name): array
{
return $this->getApi()->setApiUrl(AbstractApi::API_UPLOADS)->request($this->getApi()
->sprintf('/repos/:owner/:repo/releases/:id/assets?:arg',
$this->getRepositories()
->getOwner(),
$this->getRepositories()
->getRepo(), $id,
http_build_query(['name' => $name])),
Request::METHOD_POST, [
'Content-Type' => $contentType
]);
} | [
"public",
"function",
"uploadReleaseAsset",
"(",
"string",
"$",
"id",
",",
"string",
"$",
"contentType",
",",
"string",
"$",
"name",
")",
":",
"array",
"{",
"return",
"$",
"this",
"->",
"getApi",
"(",
")",
"->",
"setApiUrl",
"(",
"AbstractApi",
"::",
"AP... | Upload a release asset
@link https://developer.github.com/v3/repos/releases/#upload-a-release-asset
@param string $id
@param string $contentType
@param string $name
@return array | [
"Upload",
"a",
"release",
"asset"
] | cb5044443daf138787a7feb9aa9bf50220a44fd6 | https://github.com/FlexyProject/GitHubAPI/blob/cb5044443daf138787a7feb9aa9bf50220a44fd6/lib/GitHub/Receiver/Repositories/Releases.php#L178-L191 |
38,716 | FlexyProject/GitHubAPI | lib/GitHub/Receiver/Repositories/Releases.php | Releases.editReleaseAsset | public function editReleaseAsset(string $id, string $name, string $label = ''): array
{
return $this->getApi()->request($this->getApi()->sprintf('/repos/:owner/:repo/releases/assets/:id',
$this->getRepositories()->getOwner(), $this->getRepositories()->getRepo(), $id), Request::METHOD_PATCH, [
'name' => $name,
'label' => $label
]);
} | php | public function editReleaseAsset(string $id, string $name, string $label = ''): array
{
return $this->getApi()->request($this->getApi()->sprintf('/repos/:owner/:repo/releases/assets/:id',
$this->getRepositories()->getOwner(), $this->getRepositories()->getRepo(), $id), Request::METHOD_PATCH, [
'name' => $name,
'label' => $label
]);
} | [
"public",
"function",
"editReleaseAsset",
"(",
"string",
"$",
"id",
",",
"string",
"$",
"name",
",",
"string",
"$",
"label",
"=",
"''",
")",
":",
"array",
"{",
"return",
"$",
"this",
"->",
"getApi",
"(",
")",
"->",
"request",
"(",
"$",
"this",
"->",
... | Edit a release asset
@link https://developer.github.com/v3/repos/releases/#edit-a-release-asset
@param string $id
@param string $name
@param string $label
@return array | [
"Edit",
"a",
"release",
"asset"
] | cb5044443daf138787a7feb9aa9bf50220a44fd6 | https://github.com/FlexyProject/GitHubAPI/blob/cb5044443daf138787a7feb9aa9bf50220a44fd6/lib/GitHub/Receiver/Repositories/Releases.php#L219-L226 |
38,717 | FlexyProject/GitHubAPI | lib/GitHub/Receiver/GitData/References.php | References.getAll | public function getAll(): array
{
return $this->getApi()->request($this->getApi()
->sprintf('/repos/:owner/:repo/git/refs', $this->getGitData()->getOwner(),
$this->getGitData()->getRepo()));
} | php | public function getAll(): array
{
return $this->getApi()->request($this->getApi()
->sprintf('/repos/:owner/:repo/git/refs', $this->getGitData()->getOwner(),
$this->getGitData()->getRepo()));
} | [
"public",
"function",
"getAll",
"(",
")",
":",
"array",
"{",
"return",
"$",
"this",
"->",
"getApi",
"(",
")",
"->",
"request",
"(",
"$",
"this",
"->",
"getApi",
"(",
")",
"->",
"sprintf",
"(",
"'/repos/:owner/:repo/git/refs'",
",",
"$",
"this",
"->",
"... | Get all References
@link https://developer.github.com/v3/git/refs/#get-all-references
@return array
@throws \Exception | [
"Get",
"all",
"References"
] | cb5044443daf138787a7feb9aa9bf50220a44fd6 | https://github.com/FlexyProject/GitHubAPI/blob/cb5044443daf138787a7feb9aa9bf50220a44fd6/lib/GitHub/Receiver/GitData/References.php#L38-L43 |
38,718 | FlexyProject/GitHubAPI | lib/GitHub/Receiver/GitData/References.php | References.create | public function create(string $ref, string $sha): array
{
return $this->getApi()->request($this->getApi()
->sprintf('/repos/:owner/:repo/git/refs', $this->getGitData()->getOwner(),
$this->getGitData()->getRepo()), Request::METHOD_POST, [
'ref' => $ref,
'sha' => $sha
]);
} | php | public function create(string $ref, string $sha): array
{
return $this->getApi()->request($this->getApi()
->sprintf('/repos/:owner/:repo/git/refs', $this->getGitData()->getOwner(),
$this->getGitData()->getRepo()), Request::METHOD_POST, [
'ref' => $ref,
'sha' => $sha
]);
} | [
"public",
"function",
"create",
"(",
"string",
"$",
"ref",
",",
"string",
"$",
"sha",
")",
":",
"array",
"{",
"return",
"$",
"this",
"->",
"getApi",
"(",
")",
"->",
"request",
"(",
"$",
"this",
"->",
"getApi",
"(",
")",
"->",
"sprintf",
"(",
"'/rep... | Create a Reference
@link https://developer.github.com/v3/git/refs/#create-a-reference
@param string $ref
@param string $sha
@return array
@throws \Exception | [
"Create",
"a",
"Reference"
] | cb5044443daf138787a7feb9aa9bf50220a44fd6 | https://github.com/FlexyProject/GitHubAPI/blob/cb5044443daf138787a7feb9aa9bf50220a44fd6/lib/GitHub/Receiver/GitData/References.php#L56-L64 |
38,719 | FlexyProject/GitHubAPI | lib/GitHub/Receiver/GitData/References.php | References.update | public function update(string $ref, string $sha, bool $force = false): array
{
return $this->getApi()->request($this->getApi()->sprintf('/repos/:owner/:repo/git/refs/:ref',
$this->getGitData()->getOwner(), $this->getGitData()->getRepo(), $ref), Request::METHOD_POST, [
'sha' => $sha,
'force' => $force
]);
} | php | public function update(string $ref, string $sha, bool $force = false): array
{
return $this->getApi()->request($this->getApi()->sprintf('/repos/:owner/:repo/git/refs/:ref',
$this->getGitData()->getOwner(), $this->getGitData()->getRepo(), $ref), Request::METHOD_POST, [
'sha' => $sha,
'force' => $force
]);
} | [
"public",
"function",
"update",
"(",
"string",
"$",
"ref",
",",
"string",
"$",
"sha",
",",
"bool",
"$",
"force",
"=",
"false",
")",
":",
"array",
"{",
"return",
"$",
"this",
"->",
"getApi",
"(",
")",
"->",
"request",
"(",
"$",
"this",
"->",
"getApi... | Update a Reference
@link https://developer.github.com/v3/git/refs/#update-a-reference
@param string $ref
@param string $sha
@param bool $force
@return array
@throws \Exception | [
"Update",
"a",
"Reference"
] | cb5044443daf138787a7feb9aa9bf50220a44fd6 | https://github.com/FlexyProject/GitHubAPI/blob/cb5044443daf138787a7feb9aa9bf50220a44fd6/lib/GitHub/Receiver/GitData/References.php#L78-L85 |
38,720 | FlexyProject/GitHubAPI | lib/GitHub/Receiver/GitData/References.php | References.delete | public function delete(string $ref): bool
{
$this->getApi()->request($this->getApi()
->sprintf('/repos/:owner/:repo/git/refs/:ref', $this->getGitData()->getOwner(),
$this->getGitData()->getRepo(), $ref), Request::METHOD_DELETE);
if ($this->getApi()->getHeaders()['Status'] == '204 No Content') {
return true;
}
return false;
} | php | public function delete(string $ref): bool
{
$this->getApi()->request($this->getApi()
->sprintf('/repos/:owner/:repo/git/refs/:ref', $this->getGitData()->getOwner(),
$this->getGitData()->getRepo(), $ref), Request::METHOD_DELETE);
if ($this->getApi()->getHeaders()['Status'] == '204 No Content') {
return true;
}
return false;
} | [
"public",
"function",
"delete",
"(",
"string",
"$",
"ref",
")",
":",
"bool",
"{",
"$",
"this",
"->",
"getApi",
"(",
")",
"->",
"request",
"(",
"$",
"this",
"->",
"getApi",
"(",
")",
"->",
"sprintf",
"(",
"'/repos/:owner/:repo/git/refs/:ref'",
",",
"$",
... | Delete a Reference
@link https://developer.github.com/v3/git/refs/#delete-a-reference
@param string $ref
@return bool
@throws \Exception | [
"Delete",
"a",
"Reference"
] | cb5044443daf138787a7feb9aa9bf50220a44fd6 | https://github.com/FlexyProject/GitHubAPI/blob/cb5044443daf138787a7feb9aa9bf50220a44fd6/lib/GitHub/Receiver/GitData/References.php#L97-L108 |
38,721 | FlexyProject/GitHubAPI | lib/GitHub/WebHook.php | WebHook.getEvent | public function getEvent(string $event)
{
$class = (string)$this->sprintf(':namespace\Event\:event', __NAMESPACE__, $event);
if (class_exists($class)) {
return new $class($this);
}
return null;
} | php | public function getEvent(string $event)
{
$class = (string)$this->sprintf(':namespace\Event\:event', __NAMESPACE__, $event);
if (class_exists($class)) {
return new $class($this);
}
return null;
} | [
"public",
"function",
"getEvent",
"(",
"string",
"$",
"event",
")",
"{",
"$",
"class",
"=",
"(",
"string",
")",
"$",
"this",
"->",
"sprintf",
"(",
"':namespace\\Event\\:event'",
",",
"__NAMESPACE__",
",",
"$",
"event",
")",
";",
"if",
"(",
"class_exists",
... | Returns Event object
@param string $event
@return null|EventInterface | [
"Returns",
"Event",
"object"
] | cb5044443daf138787a7feb9aa9bf50220a44fd6 | https://github.com/FlexyProject/GitHubAPI/blob/cb5044443daf138787a7feb9aa9bf50220a44fd6/lib/GitHub/WebHook.php#L25-L34 |
38,722 | FlexyProject/GitHubAPI | lib/GitHub/Client.php | Client.getReceiver | public function getReceiver(string $receiver)
{
$class = (string)$this->sprintf(':namespace\Receiver\:receiver', __NAMESPACE__, $receiver);
if (class_exists($class)) {
return new $class($this);
}
return null;
} | php | public function getReceiver(string $receiver)
{
$class = (string)$this->sprintf(':namespace\Receiver\:receiver', __NAMESPACE__, $receiver);
if (class_exists($class)) {
return new $class($this);
}
return null;
} | [
"public",
"function",
"getReceiver",
"(",
"string",
"$",
"receiver",
")",
"{",
"$",
"class",
"=",
"(",
"string",
")",
"$",
"this",
"->",
"sprintf",
"(",
"':namespace\\Receiver\\:receiver'",
",",
"__NAMESPACE__",
",",
"$",
"receiver",
")",
";",
"if",
"(",
"... | Returns receiver object
@param string $receiver
@return null|AbstractReceiver | [
"Returns",
"receiver",
"object"
] | cb5044443daf138787a7feb9aa9bf50220a44fd6 | https://github.com/FlexyProject/GitHubAPI/blob/cb5044443daf138787a7feb9aa9bf50220a44fd6/lib/GitHub/Client.php#L35-L44 |
38,723 | FlexyProject/GitHubAPI | lib/GitHub/Receiver/Repositories/Commits.php | Commits.listCommits | public function listCommits(string $sha = AbstractApi::BRANCH_MASTER, string $path = null, string $author = null,
string $since = null, string $until = null): array
{
return $this->getApi()->request($this->getApi()->sprintf('/repos/:owner/:repo/commits?:args',
$this->getRepositories()->getOwner(), $this->getRepositories()->getRepo(), http_build_query([
"sha" => $sha,
"path" => $path,
"author" => $author,
"since" => $since,
"until" => $until
])));
} | php | public function listCommits(string $sha = AbstractApi::BRANCH_MASTER, string $path = null, string $author = null,
string $since = null, string $until = null): array
{
return $this->getApi()->request($this->getApi()->sprintf('/repos/:owner/:repo/commits?:args',
$this->getRepositories()->getOwner(), $this->getRepositories()->getRepo(), http_build_query([
"sha" => $sha,
"path" => $path,
"author" => $author,
"since" => $since,
"until" => $until
])));
} | [
"public",
"function",
"listCommits",
"(",
"string",
"$",
"sha",
"=",
"AbstractApi",
"::",
"BRANCH_MASTER",
",",
"string",
"$",
"path",
"=",
"null",
",",
"string",
"$",
"author",
"=",
"null",
",",
"string",
"$",
"since",
"=",
"null",
",",
"string",
"$",
... | List commits on a repository
@link https://developer.github.com/v3/repos/commits/#list-commits-on-a-repository
@param string $sha
@param string|null $path
@param string|null $author
@param string|null $since
@param string|null $until
@return array | [
"List",
"commits",
"on",
"a",
"repository"
] | cb5044443daf138787a7feb9aa9bf50220a44fd6 | https://github.com/FlexyProject/GitHubAPI/blob/cb5044443daf138787a7feb9aa9bf50220a44fd6/lib/GitHub/Receiver/Repositories/Commits.php#L28-L39 |
38,724 | FlexyProject/GitHubAPI | lib/GitHub/Receiver/Enterprise/ManagementConsole.php | ManagementConsole.upload | public function upload(string $license, string $package, string $settings = ''): array
{
$this->getApi()->setApiUrl(sprintf('http://license:%s@%s', md5($license), $this->getHostname()));
return $this->getApi()->request(sprintf('/setup/api/start -F package=@%s -F license=@%s -F settings=<%s',
$package, $license, $settings), Request::METHOD_POST);
} | php | public function upload(string $license, string $package, string $settings = ''): array
{
$this->getApi()->setApiUrl(sprintf('http://license:%s@%s', md5($license), $this->getHostname()));
return $this->getApi()->request(sprintf('/setup/api/start -F package=@%s -F license=@%s -F settings=<%s',
$package, $license, $settings), Request::METHOD_POST);
} | [
"public",
"function",
"upload",
"(",
"string",
"$",
"license",
",",
"string",
"$",
"package",
",",
"string",
"$",
"settings",
"=",
"''",
")",
":",
"array",
"{",
"$",
"this",
"->",
"getApi",
"(",
")",
"->",
"setApiUrl",
"(",
"sprintf",
"(",
"'http://lic... | Upload a license and software package for the first time
@link https://developer.github.com/v3/enterprise/management_console/#upload-a-license-and-software-package-for-the-first-time
@param string $license
@param string $package
@param string $settings
@return array | [
"Upload",
"a",
"license",
"and",
"software",
"package",
"for",
"the",
"first",
"time"
] | cb5044443daf138787a7feb9aa9bf50220a44fd6 | https://github.com/FlexyProject/GitHubAPI/blob/cb5044443daf138787a7feb9aa9bf50220a44fd6/lib/GitHub/Receiver/Enterprise/ManagementConsole.php#L78-L84 |
38,725 | FlexyProject/GitHubAPI | lib/GitHub/Receiver/Enterprise/ManagementConsole.php | ManagementConsole.updateMaintenanceStatus | public function updateMaintenanceStatus(string $maintenance): array
{
return $this->getApi()->request(sprintf('/setup/api/maintenance -d maintenance=%s', $maintenance),
Request::METHOD_POST);
} | php | public function updateMaintenanceStatus(string $maintenance): array
{
return $this->getApi()->request(sprintf('/setup/api/maintenance -d maintenance=%s', $maintenance),
Request::METHOD_POST);
} | [
"public",
"function",
"updateMaintenanceStatus",
"(",
"string",
"$",
"maintenance",
")",
":",
"array",
"{",
"return",
"$",
"this",
"->",
"getApi",
"(",
")",
"->",
"request",
"(",
"sprintf",
"(",
"'/setup/api/maintenance -d maintenance=%s'",
",",
"$",
"maintenance"... | Enable or disable maintenance mode
@link https://developer.github.com/v3/enterprise/management_console/#enable-or-disable-maintenance-mode
@param string $maintenance
@return array | [
"Enable",
"or",
"disable",
"maintenance",
"mode"
] | cb5044443daf138787a7feb9aa9bf50220a44fd6 | https://github.com/FlexyProject/GitHubAPI/blob/cb5044443daf138787a7feb9aa9bf50220a44fd6/lib/GitHub/Receiver/Enterprise/ManagementConsole.php#L171-L175 |
38,726 | FlexyProject/GitHubAPI | lib/GitHub/Receiver/Enterprise/ManagementConsole.php | ManagementConsole.addNewAuthorizedSshKeys | public function addNewAuthorizedSshKeys(string $authorizedKey): array
{
return $this->getApi()->request(sprintf('/setup/api/settings/authorized-keys -F authorized_key=@%s',
$authorizedKey), Request::METHOD_POST);
} | php | public function addNewAuthorizedSshKeys(string $authorizedKey): array
{
return $this->getApi()->request(sprintf('/setup/api/settings/authorized-keys -F authorized_key=@%s',
$authorizedKey), Request::METHOD_POST);
} | [
"public",
"function",
"addNewAuthorizedSshKeys",
"(",
"string",
"$",
"authorizedKey",
")",
":",
"array",
"{",
"return",
"$",
"this",
"->",
"getApi",
"(",
")",
"->",
"request",
"(",
"sprintf",
"(",
"'/setup/api/settings/authorized-keys -F authorized_key=@%s'",
",",
"... | Add a new authorized SSH key
@link https://developer.github.com/v3/enterprise/management_console/#add-a-new-authorized-ssh-key
@param string $authorizedKey
@return array | [
"Add",
"a",
"new",
"authorized",
"SSH",
"key"
] | cb5044443daf138787a7feb9aa9bf50220a44fd6 | https://github.com/FlexyProject/GitHubAPI/blob/cb5044443daf138787a7feb9aa9bf50220a44fd6/lib/GitHub/Receiver/Enterprise/ManagementConsole.php#L197-L201 |
38,727 | FlexyProject/GitHubAPI | lib/GitHub/Receiver/Enterprise/ManagementConsole.php | ManagementConsole.removeAuthorizedSshKeys | public function removeAuthorizedSshKeys(string $authorizedKey): array
{
return $this->getApi()->request(sprintf('/setup/api/settings/authorized-keys -F authorized_key=@%s',
$authorizedKey), Request::METHOD_DELETE);
} | php | public function removeAuthorizedSshKeys(string $authorizedKey): array
{
return $this->getApi()->request(sprintf('/setup/api/settings/authorized-keys -F authorized_key=@%s',
$authorizedKey), Request::METHOD_DELETE);
} | [
"public",
"function",
"removeAuthorizedSshKeys",
"(",
"string",
"$",
"authorizedKey",
")",
":",
"array",
"{",
"return",
"$",
"this",
"->",
"getApi",
"(",
")",
"->",
"request",
"(",
"sprintf",
"(",
"'/setup/api/settings/authorized-keys -F authorized_key=@%s'",
",",
"... | Remove an authorized SSH key
@link https://developer.github.com/v3/enterprise/management_console/#remove-an-authorized-ssh-key
@param string $authorizedKey
@return array | [
"Remove",
"an",
"authorized",
"SSH",
"key"
] | cb5044443daf138787a7feb9aa9bf50220a44fd6 | https://github.com/FlexyProject/GitHubAPI/blob/cb5044443daf138787a7feb9aa9bf50220a44fd6/lib/GitHub/Receiver/Enterprise/ManagementConsole.php#L212-L216 |
38,728 | FlexyProject/GitHubAPI | lib/GitHub/Receiver/AbstractReceiver.php | AbstractReceiver.getReceiver | public function getReceiver(string $name)
{
$classPath = explode('\\', get_called_class());
$class = (string)$this->getApi()
->sprintf(':namespace\:class\:method', __NAMESPACE__, end($classPath), $name);
if (class_exists($class)) {
return new $class($this);
}
return null;
} | php | public function getReceiver(string $name)
{
$classPath = explode('\\', get_called_class());
$class = (string)$this->getApi()
->sprintf(':namespace\:class\:method', __NAMESPACE__, end($classPath), $name);
if (class_exists($class)) {
return new $class($this);
}
return null;
} | [
"public",
"function",
"getReceiver",
"(",
"string",
"$",
"name",
")",
"{",
"$",
"classPath",
"=",
"explode",
"(",
"'\\\\'",
",",
"get_called_class",
"(",
")",
")",
";",
"$",
"class",
"=",
"(",
"string",
")",
"$",
"this",
"->",
"getApi",
"(",
")",
"->... | Get a sub-receiver
@param string $name
@return null|object | [
"Get",
"a",
"sub",
"-",
"receiver"
] | cb5044443daf138787a7feb9aa9bf50220a44fd6 | https://github.com/FlexyProject/GitHubAPI/blob/cb5044443daf138787a7feb9aa9bf50220a44fd6/lib/GitHub/Receiver/AbstractReceiver.php#L85-L96 |
38,729 | FlexyProject/GitHubAPI | lib/GitHub/Receiver/Issues/Milestones.php | Milestones.listMilestones | public function listMilestones(string $state = AbstractApi::STATE_OPEN, string $sort = AbstractApi::SORT_DUE_DATE,
string $direction = AbstractApi::DIRECTION_ASC): array
{
return $this->getApi()->request($this->getApi()->sprintf('/repos/:owner/:repo/milestones?:args',
$this->getIssues()->getOwner(), $this->getIssues()->getRepo(), http_build_query([
'state' => $state,
'sort' => $sort,
'direction' => $direction
])));
} | php | public function listMilestones(string $state = AbstractApi::STATE_OPEN, string $sort = AbstractApi::SORT_DUE_DATE,
string $direction = AbstractApi::DIRECTION_ASC): array
{
return $this->getApi()->request($this->getApi()->sprintf('/repos/:owner/:repo/milestones?:args',
$this->getIssues()->getOwner(), $this->getIssues()->getRepo(), http_build_query([
'state' => $state,
'sort' => $sort,
'direction' => $direction
])));
} | [
"public",
"function",
"listMilestones",
"(",
"string",
"$",
"state",
"=",
"AbstractApi",
"::",
"STATE_OPEN",
",",
"string",
"$",
"sort",
"=",
"AbstractApi",
"::",
"SORT_DUE_DATE",
",",
"string",
"$",
"direction",
"=",
"AbstractApi",
"::",
"DIRECTION_ASC",
")",
... | List milestones for a repository
@link https://developer.github.com/v3/issues/milestones/#list-milestones-for-a-repository
@param string $state
@param string $sort
@param string $direction
@return array | [
"List",
"milestones",
"for",
"a",
"repository"
] | cb5044443daf138787a7feb9aa9bf50220a44fd6 | https://github.com/FlexyProject/GitHubAPI/blob/cb5044443daf138787a7feb9aa9bf50220a44fd6/lib/GitHub/Receiver/Issues/Milestones.php#L28-L37 |
38,730 | FlexyProject/GitHubAPI | lib/GitHub/Receiver/Issues/Milestones.php | Milestones.getMilestone | public function getMilestone(int $number): array
{
return $this->getApi()->request($this->getApi()->sprintf('/repos/:owner/:repo/milestones/:number',
$this->getIssues()->getOwner(), $this->getIssues()->getRepo(), $number));
} | php | public function getMilestone(int $number): array
{
return $this->getApi()->request($this->getApi()->sprintf('/repos/:owner/:repo/milestones/:number',
$this->getIssues()->getOwner(), $this->getIssues()->getRepo(), $number));
} | [
"public",
"function",
"getMilestone",
"(",
"int",
"$",
"number",
")",
":",
"array",
"{",
"return",
"$",
"this",
"->",
"getApi",
"(",
")",
"->",
"request",
"(",
"$",
"this",
"->",
"getApi",
"(",
")",
"->",
"sprintf",
"(",
"'/repos/:owner/:repo/milestones/:n... | Get a single milestone
@link https://developer.github.com/v3/issues/milestones/#get-a-single-milestone
@param int $number
@return array | [
"Get",
"a",
"single",
"milestone"
] | cb5044443daf138787a7feb9aa9bf50220a44fd6 | https://github.com/FlexyProject/GitHubAPI/blob/cb5044443daf138787a7feb9aa9bf50220a44fd6/lib/GitHub/Receiver/Issues/Milestones.php#L48-L52 |
38,731 | FlexyProject/GitHubAPI | lib/GitHub/Receiver/Issues/Milestones.php | Milestones.createMilestone | public function createMilestone(string $title, string $state = AbstractApi::STATE_OPEN, string $description = '',
string $dueOn = ''): array
{
return $this->getApi()->request($this->getApi()
->sprintf('/repos/:owner/:repo/milestones', $this->getIssues()->getOwner(),
$this->getIssues()->getRepo()), Request::METHOD_POST, [
'title' => $title,
'state' => $state,
'description' => $description,
'due_on' => (new DateTime($dueOn))->format(DateTime::ATOM)
]);
} | php | public function createMilestone(string $title, string $state = AbstractApi::STATE_OPEN, string $description = '',
string $dueOn = ''): array
{
return $this->getApi()->request($this->getApi()
->sprintf('/repos/:owner/:repo/milestones', $this->getIssues()->getOwner(),
$this->getIssues()->getRepo()), Request::METHOD_POST, [
'title' => $title,
'state' => $state,
'description' => $description,
'due_on' => (new DateTime($dueOn))->format(DateTime::ATOM)
]);
} | [
"public",
"function",
"createMilestone",
"(",
"string",
"$",
"title",
",",
"string",
"$",
"state",
"=",
"AbstractApi",
"::",
"STATE_OPEN",
",",
"string",
"$",
"description",
"=",
"''",
",",
"string",
"$",
"dueOn",
"=",
"''",
")",
":",
"array",
"{",
"retu... | Create a milestone
@link https://developer.github.com/v3/issues/milestones/#create-a-milestone
@param string $title
@param string $state
@param string $description
@param string $dueOn
@return array | [
"Create",
"a",
"milestone"
] | cb5044443daf138787a7feb9aa9bf50220a44fd6 | https://github.com/FlexyProject/GitHubAPI/blob/cb5044443daf138787a7feb9aa9bf50220a44fd6/lib/GitHub/Receiver/Issues/Milestones.php#L66-L77 |
38,732 | FlexyProject/GitHubAPI | lib/GitHub/Receiver/Repositories/Contents.php | Contents.getContents | public function getContents(string $path = '', string $ref = AbstractApi::BRANCH_MASTER): array
{
return $this->getApi()->request($this->getApi()->sprintf('/repos/:owner/:repo/contents/:path?:args',
$this->getRepositories()->getOwner(), $this->getRepositories()->getRepo(), $path,
http_build_query(['ref' => $ref])));
} | php | public function getContents(string $path = '', string $ref = AbstractApi::BRANCH_MASTER): array
{
return $this->getApi()->request($this->getApi()->sprintf('/repos/:owner/:repo/contents/:path?:args',
$this->getRepositories()->getOwner(), $this->getRepositories()->getRepo(), $path,
http_build_query(['ref' => $ref])));
} | [
"public",
"function",
"getContents",
"(",
"string",
"$",
"path",
"=",
"''",
",",
"string",
"$",
"ref",
"=",
"AbstractApi",
"::",
"BRANCH_MASTER",
")",
":",
"array",
"{",
"return",
"$",
"this",
"->",
"getApi",
"(",
")",
"->",
"request",
"(",
"$",
"this"... | This method returns the contents of a file or directory in a repository.
@link https://developer.github.com/v3/repos/contents/#get-contents
@param string $path
@param string $ref
@return array | [
"This",
"method",
"returns",
"the",
"contents",
"of",
"a",
"file",
"or",
"directory",
"in",
"a",
"repository",
"."
] | cb5044443daf138787a7feb9aa9bf50220a44fd6 | https://github.com/FlexyProject/GitHubAPI/blob/cb5044443daf138787a7feb9aa9bf50220a44fd6/lib/GitHub/Receiver/Repositories/Contents.php#L38-L43 |
38,733 | FlexyProject/GitHubAPI | lib/GitHub/Receiver/Repositories/Contents.php | Contents.getArchiveLink | public function getArchiveLink(string $archiveFormat = AbstractApi::ARCHIVE_TARBALL,
string $ref = AbstractApi::BRANCH_MASTER): array
{
return $this->getApi()->request($this->getApi()->sprintf('/repos/:owner/:repo/:archive_format/:ref',
$this->getRepositories()->getOwner(), $this->getRepositories()->getRepo(), $archiveFormat, $ref));
} | php | public function getArchiveLink(string $archiveFormat = AbstractApi::ARCHIVE_TARBALL,
string $ref = AbstractApi::BRANCH_MASTER): array
{
return $this->getApi()->request($this->getApi()->sprintf('/repos/:owner/:repo/:archive_format/:ref',
$this->getRepositories()->getOwner(), $this->getRepositories()->getRepo(), $archiveFormat, $ref));
} | [
"public",
"function",
"getArchiveLink",
"(",
"string",
"$",
"archiveFormat",
"=",
"AbstractApi",
"::",
"ARCHIVE_TARBALL",
",",
"string",
"$",
"ref",
"=",
"AbstractApi",
"::",
"BRANCH_MASTER",
")",
":",
"array",
"{",
"return",
"$",
"this",
"->",
"getApi",
"(",
... | Get archive link
@link https://developer.github.com/v3/repos/contents/#get-archive-link
@param string $archiveFormat
@param string $ref
@return array | [
"Get",
"archive",
"link"
] | cb5044443daf138787a7feb9aa9bf50220a44fd6 | https://github.com/FlexyProject/GitHubAPI/blob/cb5044443daf138787a7feb9aa9bf50220a44fd6/lib/GitHub/Receiver/Repositories/Contents.php#L121-L126 |
38,734 | FlexyProject/GitHubAPI | lib/GitHub/Receiver/GitData/Blobs.php | Blobs.createBlob | public function createBlob(string $content, string $encoding = 'utf-8'): array
{
return $this->getApi()->request($this->getApi()
->sprintf('/repos/:owner/:repo/git/blobs', $this->getGitData()->getOwner(),
$this->getGitData()->getRepo()), Request::METHOD_POST, [
'content' => $content,
'encoding' => $encoding
]);
} | php | public function createBlob(string $content, string $encoding = 'utf-8'): array
{
return $this->getApi()->request($this->getApi()
->sprintf('/repos/:owner/:repo/git/blobs', $this->getGitData()->getOwner(),
$this->getGitData()->getRepo()), Request::METHOD_POST, [
'content' => $content,
'encoding' => $encoding
]);
} | [
"public",
"function",
"createBlob",
"(",
"string",
"$",
"content",
",",
"string",
"$",
"encoding",
"=",
"'utf-8'",
")",
":",
"array",
"{",
"return",
"$",
"this",
"->",
"getApi",
"(",
")",
"->",
"request",
"(",
"$",
"this",
"->",
"getApi",
"(",
")",
"... | Create a Blob
@link https://developer.github.com/v3/git/blobs/#create-a-blob
@param string $content
@param string $encoding
@return array | [
"Create",
"a",
"Blob"
] | cb5044443daf138787a7feb9aa9bf50220a44fd6 | https://github.com/FlexyProject/GitHubAPI/blob/cb5044443daf138787a7feb9aa9bf50220a44fd6/lib/GitHub/Receiver/GitData/Blobs.php#L40-L48 |
38,735 | FlexyProject/GitHubAPI | lib/GitHub/Receiver/Repositories/Merging.php | Merging.performMerge | public function performMerge(string $base, string $head, string $commitMessage = null): array
{
return $this->getApi()->request($this->getApi()->sprintf('/repos/:owner/:repo/merges',
$this->getRepositories()->getOwner(), $this->getRepositories()->getRepo()), Request::METHOD_POST, [
'base' => $base,
'head' => $head,
'commit_message' => $commitMessage
]);
} | php | public function performMerge(string $base, string $head, string $commitMessage = null): array
{
return $this->getApi()->request($this->getApi()->sprintf('/repos/:owner/:repo/merges',
$this->getRepositories()->getOwner(), $this->getRepositories()->getRepo()), Request::METHOD_POST, [
'base' => $base,
'head' => $head,
'commit_message' => $commitMessage
]);
} | [
"public",
"function",
"performMerge",
"(",
"string",
"$",
"base",
",",
"string",
"$",
"head",
",",
"string",
"$",
"commitMessage",
"=",
"null",
")",
":",
"array",
"{",
"return",
"$",
"this",
"->",
"getApi",
"(",
")",
"->",
"request",
"(",
"$",
"this",
... | Perform a merge
@link https://developer.github.com/v3/repos/merging/#perform-a-merge
@param string $base
@param string $head
@param string|null $commitMessage
@return array | [
"Perform",
"a",
"merge"
] | cb5044443daf138787a7feb9aa9bf50220a44fd6 | https://github.com/FlexyProject/GitHubAPI/blob/cb5044443daf138787a7feb9aa9bf50220a44fd6/lib/GitHub/Receiver/Repositories/Merging.php#L26-L34 |
38,736 | FlexyProject/GitHubAPI | lib/GitHub/Receiver/Repositories/Forks.php | Forks.createFork | public function createFork(string $organization = ''): array
{
return $this->getApi()->request($this->getApi()->sprintf('/repos/:owner/:repo/forks',
$this->getRepositories()->getOwner(), $this->getRepositories()->getRepo()), Request::METHOD_POST,
['organization' => $organization]);
} | php | public function createFork(string $organization = ''): array
{
return $this->getApi()->request($this->getApi()->sprintf('/repos/:owner/:repo/forks',
$this->getRepositories()->getOwner(), $this->getRepositories()->getRepo()), Request::METHOD_POST,
['organization' => $organization]);
} | [
"public",
"function",
"createFork",
"(",
"string",
"$",
"organization",
"=",
"''",
")",
":",
"array",
"{",
"return",
"$",
"this",
"->",
"getApi",
"(",
")",
"->",
"request",
"(",
"$",
"this",
"->",
"getApi",
"(",
")",
"->",
"sprintf",
"(",
"'/repos/:own... | Create a fork
@link https://developer.github.com/v3/repos/forks/#create-a-fork
@param string $organization
@return array | [
"Create",
"a",
"fork"
] | cb5044443daf138787a7feb9aa9bf50220a44fd6 | https://github.com/FlexyProject/GitHubAPI/blob/cb5044443daf138787a7feb9aa9bf50220a44fd6/lib/GitHub/Receiver/Repositories/Forks.php#L41-L46 |
38,737 | FlexyProject/GitHubAPI | lib/GitHub/Receiver/Organizations/Teams.php | Teams.listTeamMembers | public function listTeamMembers(int $id): array
{
return $this->getApi()->request($this->getApi()->sprintf('/teams/:id/members', (string)$id));
} | php | public function listTeamMembers(int $id): array
{
return $this->getApi()->request($this->getApi()->sprintf('/teams/:id/members', (string)$id));
} | [
"public",
"function",
"listTeamMembers",
"(",
"int",
"$",
"id",
")",
":",
"array",
"{",
"return",
"$",
"this",
"->",
"getApi",
"(",
")",
"->",
"request",
"(",
"$",
"this",
"->",
"getApi",
"(",
")",
"->",
"sprintf",
"(",
"'/teams/:id/members'",
",",
"("... | List team members
@link https://developer.github.com/v3/orgs/teams/#list-team-members
@param int $id
@return array
@throws \Exception | [
"List",
"team",
"members"
] | cb5044443daf138787a7feb9aa9bf50220a44fd6 | https://github.com/FlexyProject/GitHubAPI/blob/cb5044443daf138787a7feb9aa9bf50220a44fd6/lib/GitHub/Receiver/Organizations/Teams.php#L124-L127 |
38,738 | FlexyProject/GitHubAPI | lib/GitHub/Receiver/Organizations/Teams.php | Teams.listTeamRepos | public function listTeamRepos(int $id): array
{
return $this->getApi()->request($this->getApi()->sprintf('/teams/:id/repos', (string)$id));
} | php | public function listTeamRepos(int $id): array
{
return $this->getApi()->request($this->getApi()->sprintf('/teams/:id/repos', (string)$id));
} | [
"public",
"function",
"listTeamRepos",
"(",
"int",
"$",
"id",
")",
":",
"array",
"{",
"return",
"$",
"this",
"->",
"getApi",
"(",
")",
"->",
"request",
"(",
"$",
"this",
"->",
"getApi",
"(",
")",
"->",
"sprintf",
"(",
"'/teams/:id/repos'",
",",
"(",
... | List team repos
@link https://developer.github.com/v3/orgs/teams/#list-team-repos
@param int $id
@return array
@throws \Exception | [
"List",
"team",
"repos"
] | cb5044443daf138787a7feb9aa9bf50220a44fd6 | https://github.com/FlexyProject/GitHubAPI/blob/cb5044443daf138787a7feb9aa9bf50220a44fd6/lib/GitHub/Receiver/Organizations/Teams.php#L197-L200 |
38,739 | FlexyProject/GitHubAPI | lib/GitHub/Receiver/Organizations/Teams.php | Teams.checkTeamManagesRepository | public function checkTeamManagesRepository(int $id): bool
{
$this->getApi()->request($this->getApi()->sprintf('/teams/:id/repos/:owner/:repo', (string)$id,
$this->getOrganizations()->getOwner(), $this->getOrganizations()->getRepo()));
if ($this->getApi()->getHeaders()['Status'] == '204 No Content') {
return true;
}
return false;
} | php | public function checkTeamManagesRepository(int $id): bool
{
$this->getApi()->request($this->getApi()->sprintf('/teams/:id/repos/:owner/:repo', (string)$id,
$this->getOrganizations()->getOwner(), $this->getOrganizations()->getRepo()));
if ($this->getApi()->getHeaders()['Status'] == '204 No Content') {
return true;
}
return false;
} | [
"public",
"function",
"checkTeamManagesRepository",
"(",
"int",
"$",
"id",
")",
":",
"bool",
"{",
"$",
"this",
"->",
"getApi",
"(",
")",
"->",
"request",
"(",
"$",
"this",
"->",
"getApi",
"(",
")",
"->",
"sprintf",
"(",
"'/teams/:id/repos/:owner/:repo'",
"... | Check if a team manages a repository
@link https://developer.github.com/v3/orgs/teams/#get-team-repo
@param int $id
@return bool
@throws \Exception | [
"Check",
"if",
"a",
"team",
"manages",
"a",
"repository"
] | cb5044443daf138787a7feb9aa9bf50220a44fd6 | https://github.com/FlexyProject/GitHubAPI/blob/cb5044443daf138787a7feb9aa9bf50220a44fd6/lib/GitHub/Receiver/Organizations/Teams.php#L212-L222 |
38,740 | FlexyProject/GitHubAPI | lib/GitHub/Receiver/Organizations/Teams.php | Teams.addTeamRepository | public function addTeamRepository(int $id)
{
$return = $this->getApi()->request($this->getApi()->sprintf('/teams/:id/repos/:org/:repo', (string)$id,
$this->getOrganizations()->getOwner(), $this->getOrganizations()->getRepo()), Request::METHOD_PUT);
if ($this->getApi()->getHeaders()['Status'] == '204 No Content') {
return true;
}
return $return;
} | php | public function addTeamRepository(int $id)
{
$return = $this->getApi()->request($this->getApi()->sprintf('/teams/:id/repos/:org/:repo', (string)$id,
$this->getOrganizations()->getOwner(), $this->getOrganizations()->getRepo()), Request::METHOD_PUT);
if ($this->getApi()->getHeaders()['Status'] == '204 No Content') {
return true;
}
return $return;
} | [
"public",
"function",
"addTeamRepository",
"(",
"int",
"$",
"id",
")",
"{",
"$",
"return",
"=",
"$",
"this",
"->",
"getApi",
"(",
")",
"->",
"request",
"(",
"$",
"this",
"->",
"getApi",
"(",
")",
"->",
"sprintf",
"(",
"'/teams/:id/repos/:org/:repo'",
","... | Add team repository
@link https://developer.github.com/v3/orgs/teams/#add-team-repo
@param int $id
@return bool|array
@throws \Exception | [
"Add",
"team",
"repository"
] | cb5044443daf138787a7feb9aa9bf50220a44fd6 | https://github.com/FlexyProject/GitHubAPI/blob/cb5044443daf138787a7feb9aa9bf50220a44fd6/lib/GitHub/Receiver/Organizations/Teams.php#L234-L244 |
38,741 | FlexyProject/GitHubAPI | lib/GitHub/Receiver/Organizations/Teams.php | Teams.removeTeamRepository | public function removeTeamRepository(int $id): bool
{
$this->getApi()->request($this->getApi()->sprintf('/teams/:id/repos/:owner/:repo', (string)$id,
$this->getOrganizations()->getOwner(), $this->getOrganizations()->getRepo()), Request::METHOD_DELETE);
if ($this->getApi()->getHeaders()['Status'] == '204 No Content') {
return true;
}
return false;
} | php | public function removeTeamRepository(int $id): bool
{
$this->getApi()->request($this->getApi()->sprintf('/teams/:id/repos/:owner/:repo', (string)$id,
$this->getOrganizations()->getOwner(), $this->getOrganizations()->getRepo()), Request::METHOD_DELETE);
if ($this->getApi()->getHeaders()['Status'] == '204 No Content') {
return true;
}
return false;
} | [
"public",
"function",
"removeTeamRepository",
"(",
"int",
"$",
"id",
")",
":",
"bool",
"{",
"$",
"this",
"->",
"getApi",
"(",
")",
"->",
"request",
"(",
"$",
"this",
"->",
"getApi",
"(",
")",
"->",
"sprintf",
"(",
"'/teams/:id/repos/:owner/:repo'",
",",
... | Remove team repository
@link https://developer.github.com/v3/orgs/teams/#remove-team-repo
@param int $id
@return bool
@throws \Exception | [
"Remove",
"team",
"repository"
] | cb5044443daf138787a7feb9aa9bf50220a44fd6 | https://github.com/FlexyProject/GitHubAPI/blob/cb5044443daf138787a7feb9aa9bf50220a44fd6/lib/GitHub/Receiver/Organizations/Teams.php#L256-L266 |
38,742 | FlexyProject/GitHubAPI | lib/GitHub/Receiver/Repositories/Pages.php | Pages.getInformation | public function getInformation(): array
{
return $this->getApi()->request($this->getApi()->sprintf('/repos/:owner/:repo/pages',
$this->getRepositories()->getOwner(), $this->getRepositories()->getRepo()));
} | php | public function getInformation(): array
{
return $this->getApi()->request($this->getApi()->sprintf('/repos/:owner/:repo/pages',
$this->getRepositories()->getOwner(), $this->getRepositories()->getRepo()));
} | [
"public",
"function",
"getInformation",
"(",
")",
":",
"array",
"{",
"return",
"$",
"this",
"->",
"getApi",
"(",
")",
"->",
"request",
"(",
"$",
"this",
"->",
"getApi",
"(",
")",
"->",
"sprintf",
"(",
"'/repos/:owner/:repo/pages'",
",",
"$",
"this",
"->"... | Get information about a Pages site
@link https://developer.github.com/v3/repos/pages/#get-information-about-a-pages-site
@return array | [
"Get",
"information",
"about",
"a",
"Pages",
"site"
] | cb5044443daf138787a7feb9aa9bf50220a44fd6 | https://github.com/FlexyProject/GitHubAPI/blob/cb5044443daf138787a7feb9aa9bf50220a44fd6/lib/GitHub/Receiver/Repositories/Pages.php#L19-L23 |
38,743 | FlexyProject/GitHubAPI | lib/GitHub/Receiver/Repositories/Pages.php | Pages.listPagesBuilds | public function listPagesBuilds(): array
{
return $this->getApi()->request($this->getApi()->sprintf('/repos/:owner/:repo/pages/builds',
$this->getRepositories()->getOwner(), $this->getRepositories()->getRepo()));
} | php | public function listPagesBuilds(): array
{
return $this->getApi()->request($this->getApi()->sprintf('/repos/:owner/:repo/pages/builds',
$this->getRepositories()->getOwner(), $this->getRepositories()->getRepo()));
} | [
"public",
"function",
"listPagesBuilds",
"(",
")",
":",
"array",
"{",
"return",
"$",
"this",
"->",
"getApi",
"(",
")",
"->",
"request",
"(",
"$",
"this",
"->",
"getApi",
"(",
")",
"->",
"sprintf",
"(",
"'/repos/:owner/:repo/pages/builds'",
",",
"$",
"this"... | List Pages builds
@link https://developer.github.com/v3/repos/pages/#list-pages-builds
@return array | [
"List",
"Pages",
"builds"
] | cb5044443daf138787a7feb9aa9bf50220a44fd6 | https://github.com/FlexyProject/GitHubAPI/blob/cb5044443daf138787a7feb9aa9bf50220a44fd6/lib/GitHub/Receiver/Repositories/Pages.php#L31-L35 |
38,744 | FlexyProject/GitHubAPI | lib/GitHub/Receiver/Organizations/Members.php | Members.listPublicMembers | public function listPublicMembers(string $org): array
{
return $this->getApi()->request($this->getApi()->sprintf('/orgs/:org/public_members', $org));
} | php | public function listPublicMembers(string $org): array
{
return $this->getApi()->request($this->getApi()->sprintf('/orgs/:org/public_members', $org));
} | [
"public",
"function",
"listPublicMembers",
"(",
"string",
"$",
"org",
")",
":",
"array",
"{",
"return",
"$",
"this",
"->",
"getApi",
"(",
")",
"->",
"request",
"(",
"$",
"this",
"->",
"getApi",
"(",
")",
"->",
"sprintf",
"(",
"'/orgs/:org/public_members'",... | Public members list
@link https://developer.github.com/v3/orgs/members/#public-members-list
@param string $org
@return array
@throws \Exception | [
"Public",
"members",
"list"
] | cb5044443daf138787a7feb9aa9bf50220a44fd6 | https://github.com/FlexyProject/GitHubAPI/blob/cb5044443daf138787a7feb9aa9bf50220a44fd6/lib/GitHub/Receiver/Organizations/Members.php#L89-L92 |
38,745 | FlexyProject/GitHubAPI | lib/GitHub/Receiver/Organizations/Members.php | Members.getOrganizationMembership | public function getOrganizationMembership(string $org, string $username): array
{
$this->getApi()->setAccept('application/vnd.github.moondragon+json');
return $this->getApi()->request($this->getApi()->sprintf('/orgs/:org/memberships/:username', $org, $username));
} | php | public function getOrganizationMembership(string $org, string $username): array
{
$this->getApi()->setAccept('application/vnd.github.moondragon+json');
return $this->getApi()->request($this->getApi()->sprintf('/orgs/:org/memberships/:username', $org, $username));
} | [
"public",
"function",
"getOrganizationMembership",
"(",
"string",
"$",
"org",
",",
"string",
"$",
"username",
")",
":",
"array",
"{",
"$",
"this",
"->",
"getApi",
"(",
")",
"->",
"setAccept",
"(",
"'application/vnd.github.moondragon+json'",
")",
";",
"return",
... | Get organization membership
@link https://developer.github.com/v3/orgs/members/#get-organization-membership
@param string $org
@param string $username
@return array
@throws \Exception | [
"Get",
"organization",
"membership"
] | cb5044443daf138787a7feb9aa9bf50220a44fd6 | https://github.com/FlexyProject/GitHubAPI/blob/cb5044443daf138787a7feb9aa9bf50220a44fd6/lib/GitHub/Receiver/Organizations/Members.php#L173-L178 |
38,746 | FlexyProject/GitHubAPI | lib/GitHub/Receiver/Organizations/Members.php | Members.removeOrganizationMembership | public function removeOrganizationMembership(string $org, string $username): bool
{
$this->getApi()->setAccept('application/vnd.github.moondragon+json');
$this->getApi()->request($this->getApi()->sprintf('/orgs/:org/memberships/:username', $org, $username),
Request::METHOD_DELETE);
if ($this->getApi()->getHeaders()['Status'] == '204 No Content') {
return true;
}
return false;
} | php | public function removeOrganizationMembership(string $org, string $username): bool
{
$this->getApi()->setAccept('application/vnd.github.moondragon+json');
$this->getApi()->request($this->getApi()->sprintf('/orgs/:org/memberships/:username', $org, $username),
Request::METHOD_DELETE);
if ($this->getApi()->getHeaders()['Status'] == '204 No Content') {
return true;
}
return false;
} | [
"public",
"function",
"removeOrganizationMembership",
"(",
"string",
"$",
"org",
",",
"string",
"$",
"username",
")",
":",
"bool",
"{",
"$",
"this",
"->",
"getApi",
"(",
")",
"->",
"setAccept",
"(",
"'application/vnd.github.moondragon+json'",
")",
";",
"$",
"t... | Remove organization membership
@link https://developer.github.com/v3/orgs/members/#remove-organization-membership
@param string $org
@param string $username
@return bool
@throws \Exception | [
"Remove",
"organization",
"membership"
] | cb5044443daf138787a7feb9aa9bf50220a44fd6 | https://github.com/FlexyProject/GitHubAPI/blob/cb5044443daf138787a7feb9aa9bf50220a44fd6/lib/GitHub/Receiver/Organizations/Members.php#L212-L224 |
38,747 | FlexyProject/GitHubAPI | lib/GitHub/Receiver/Organizations/Members.php | Members.getYourOrganizationMembership | public function getYourOrganizationMembership(string $org): array
{
return $this->getApi()->request($this->getApi()->sprintf('/user/memberships/orgs/:org', $org));
} | php | public function getYourOrganizationMembership(string $org): array
{
return $this->getApi()->request($this->getApi()->sprintf('/user/memberships/orgs/:org', $org));
} | [
"public",
"function",
"getYourOrganizationMembership",
"(",
"string",
"$",
"org",
")",
":",
"array",
"{",
"return",
"$",
"this",
"->",
"getApi",
"(",
")",
"->",
"request",
"(",
"$",
"this",
"->",
"getApi",
"(",
")",
"->",
"sprintf",
"(",
"'/user/membership... | Get your organization membership
@link https://developer.github.com/v3/orgs/members/#get-your-organization-membership
@param string $org
@return array
@throws \Exception | [
"Get",
"your",
"organization",
"membership"
] | cb5044443daf138787a7feb9aa9bf50220a44fd6 | https://github.com/FlexyProject/GitHubAPI/blob/cb5044443daf138787a7feb9aa9bf50220a44fd6/lib/GitHub/Receiver/Organizations/Members.php#L252-L255 |
38,748 | FlexyProject/GitHubAPI | lib/GitHub/Receiver/Issues/Events.php | Events.listIssueEvents | public function listIssueEvents(int $issueNumber): array
{
return $this->getApi()->request($this->getApi()->sprintf('/repos/:owner/:repo/issues/:issue_number/events',
$this->getIssues()->getOwner(), $this->getIssues()->getRepo(), $issueNumber));
} | php | public function listIssueEvents(int $issueNumber): array
{
return $this->getApi()->request($this->getApi()->sprintf('/repos/:owner/:repo/issues/:issue_number/events',
$this->getIssues()->getOwner(), $this->getIssues()->getRepo(), $issueNumber));
} | [
"public",
"function",
"listIssueEvents",
"(",
"int",
"$",
"issueNumber",
")",
":",
"array",
"{",
"return",
"$",
"this",
"->",
"getApi",
"(",
")",
"->",
"request",
"(",
"$",
"this",
"->",
"getApi",
"(",
")",
"->",
"sprintf",
"(",
"'/repos/:owner/:repo/issue... | List events for an issue
@link https://developer.github.com/v3/issues/events/#list-events-for-an-issue
@param int $issueNumber
@return array | [
"List",
"events",
"for",
"an",
"issue"
] | cb5044443daf138787a7feb9aa9bf50220a44fd6 | https://github.com/FlexyProject/GitHubAPI/blob/cb5044443daf138787a7feb9aa9bf50220a44fd6/lib/GitHub/Receiver/Issues/Events.php#L22-L26 |
38,749 | FlexyProject/GitHubAPI | lib/GitHub/Receiver/Issues/Events.php | Events.listRepositoryEvents | public function listRepositoryEvents(): array
{
return $this->getApi()->request($this->getApi()->sprintf('/repos/:owner/:repo/issues/events',
$this->getIssues()->getOwner(), $this->getIssues()->getRepo()));
} | php | public function listRepositoryEvents(): array
{
return $this->getApi()->request($this->getApi()->sprintf('/repos/:owner/:repo/issues/events',
$this->getIssues()->getOwner(), $this->getIssues()->getRepo()));
} | [
"public",
"function",
"listRepositoryEvents",
"(",
")",
":",
"array",
"{",
"return",
"$",
"this",
"->",
"getApi",
"(",
")",
"->",
"request",
"(",
"$",
"this",
"->",
"getApi",
"(",
")",
"->",
"sprintf",
"(",
"'/repos/:owner/:repo/issues/events'",
",",
"$",
... | List events for a repository
@link https://developer.github.com/v3/issues/events/#list-events-for-a-repository
@return array | [
"List",
"events",
"for",
"a",
"repository"
] | cb5044443daf138787a7feb9aa9bf50220a44fd6 | https://github.com/FlexyProject/GitHubAPI/blob/cb5044443daf138787a7feb9aa9bf50220a44fd6/lib/GitHub/Receiver/Issues/Events.php#L34-L38 |
38,750 | FlexyProject/GitHubAPI | lib/GitHub/Receiver/Issues/Labels.php | Labels.listRepositoryLabels | public function listRepositoryLabels(): array
{
return $this->getApi()->request($this->getApi()
->sprintf('/repos/:owner/:repo/labels', $this->getIssues()->getOwner(),
$this->getIssues()->getRepo()));
} | php | public function listRepositoryLabels(): array
{
return $this->getApi()->request($this->getApi()
->sprintf('/repos/:owner/:repo/labels', $this->getIssues()->getOwner(),
$this->getIssues()->getRepo()));
} | [
"public",
"function",
"listRepositoryLabels",
"(",
")",
":",
"array",
"{",
"return",
"$",
"this",
"->",
"getApi",
"(",
")",
"->",
"request",
"(",
"$",
"this",
"->",
"getApi",
"(",
")",
"->",
"sprintf",
"(",
"'/repos/:owner/:repo/labels'",
",",
"$",
"this",... | List all labels for this repository
@link https://developer.github.com/v3/issues/labels/#list-all-labels-for-this-repository
@return array | [
"List",
"all",
"labels",
"for",
"this",
"repository"
] | cb5044443daf138787a7feb9aa9bf50220a44fd6 | https://github.com/FlexyProject/GitHubAPI/blob/cb5044443daf138787a7feb9aa9bf50220a44fd6/lib/GitHub/Receiver/Issues/Labels.php#L21-L26 |
38,751 | FlexyProject/GitHubAPI | lib/GitHub/Receiver/Issues/Labels.php | Labels.getLabel | public function getLabel(string $name): array
{
return $this->getApi()->request($this->getApi()->sprintf('/repos/:owner/:repo/labels/:name',
$this->getIssues()->getOwner(), $this->getIssues()->getRepo(), $name));
} | php | public function getLabel(string $name): array
{
return $this->getApi()->request($this->getApi()->sprintf('/repos/:owner/:repo/labels/:name',
$this->getIssues()->getOwner(), $this->getIssues()->getRepo(), $name));
} | [
"public",
"function",
"getLabel",
"(",
"string",
"$",
"name",
")",
":",
"array",
"{",
"return",
"$",
"this",
"->",
"getApi",
"(",
")",
"->",
"request",
"(",
"$",
"this",
"->",
"getApi",
"(",
")",
"->",
"sprintf",
"(",
"'/repos/:owner/:repo/labels/:name'",
... | Get a single label
@link https://developer.github.com/v3/issues/labels/#get-a-single-label
@param string $name
@return array | [
"Get",
"a",
"single",
"label"
] | cb5044443daf138787a7feb9aa9bf50220a44fd6 | https://github.com/FlexyProject/GitHubAPI/blob/cb5044443daf138787a7feb9aa9bf50220a44fd6/lib/GitHub/Receiver/Issues/Labels.php#L37-L41 |
38,752 | FlexyProject/GitHubAPI | lib/GitHub/Receiver/Issues/Labels.php | Labels.updateLabel | public function updateLabel(string $name, string $color): array
{
return $this->getApi()->request($this->getApi()->sprintf('/repos/:owner/:repo/labels/:name',
$this->getIssues()->getOwner(), $this->getIssues()->getRepo(), $name), Request::METHOD_PATCH, [
'color' => $color
]);
} | php | public function updateLabel(string $name, string $color): array
{
return $this->getApi()->request($this->getApi()->sprintf('/repos/:owner/:repo/labels/:name',
$this->getIssues()->getOwner(), $this->getIssues()->getRepo(), $name), Request::METHOD_PATCH, [
'color' => $color
]);
} | [
"public",
"function",
"updateLabel",
"(",
"string",
"$",
"name",
",",
"string",
"$",
"color",
")",
":",
"array",
"{",
"return",
"$",
"this",
"->",
"getApi",
"(",
")",
"->",
"request",
"(",
"$",
"this",
"->",
"getApi",
"(",
")",
"->",
"sprintf",
"(",
... | Update a label
@link https://developer.github.com/v3/issues/labels/#update-a-label
@param string $name
@param string $color
@return array | [
"Update",
"a",
"label"
] | cb5044443daf138787a7feb9aa9bf50220a44fd6 | https://github.com/FlexyProject/GitHubAPI/blob/cb5044443daf138787a7feb9aa9bf50220a44fd6/lib/GitHub/Receiver/Issues/Labels.php#L73-L79 |
38,753 | FlexyProject/GitHubAPI | lib/GitHub/Receiver/Issues/Labels.php | Labels.deleteLabel | public function deleteLabel(string $name): bool
{
$this->getApi()->request($this->getApi()
->sprintf('/repos/:owner/:repo/labels/:name', $this->getIssues()->getOwner(),
$this->getIssues()->getRepo(), $name));
if ($this->getApi()->getHeaders()['Status'] == '204 No Content') {
return true;
}
return false;
} | php | public function deleteLabel(string $name): bool
{
$this->getApi()->request($this->getApi()
->sprintf('/repos/:owner/:repo/labels/:name', $this->getIssues()->getOwner(),
$this->getIssues()->getRepo(), $name));
if ($this->getApi()->getHeaders()['Status'] == '204 No Content') {
return true;
}
return false;
} | [
"public",
"function",
"deleteLabel",
"(",
"string",
"$",
"name",
")",
":",
"bool",
"{",
"$",
"this",
"->",
"getApi",
"(",
")",
"->",
"request",
"(",
"$",
"this",
"->",
"getApi",
"(",
")",
"->",
"sprintf",
"(",
"'/repos/:owner/:repo/labels/:name'",
",",
"... | Delete a label
@link https://developer.github.com/v3/issues/labels/#delete-a-label
@param string $name
@return bool | [
"Delete",
"a",
"label"
] | cb5044443daf138787a7feb9aa9bf50220a44fd6 | https://github.com/FlexyProject/GitHubAPI/blob/cb5044443daf138787a7feb9aa9bf50220a44fd6/lib/GitHub/Receiver/Issues/Labels.php#L90-L101 |
38,754 | FlexyProject/GitHubAPI | lib/GitHub/Receiver/Issues/Labels.php | Labels.removeIssueLabel | public function removeIssueLabel(int $number, string $name): bool
{
$this->getApi()->request($this->getApi()->sprintf('/repos/:owner/:repo/issues/:number/labels/:name',
$this->getIssues()->getOwner(), $this->getIssues()->getRepo(), $number, $name), Request::METHOD_DELETE);
if ($this->getApi()->getHeaders()['Status'] == '204 No Content') {
return true;
}
return false;
} | php | public function removeIssueLabel(int $number, string $name): bool
{
$this->getApi()->request($this->getApi()->sprintf('/repos/:owner/:repo/issues/:number/labels/:name',
$this->getIssues()->getOwner(), $this->getIssues()->getRepo(), $number, $name), Request::METHOD_DELETE);
if ($this->getApi()->getHeaders()['Status'] == '204 No Content') {
return true;
}
return false;
} | [
"public",
"function",
"removeIssueLabel",
"(",
"int",
"$",
"number",
",",
"string",
"$",
"name",
")",
":",
"bool",
"{",
"$",
"this",
"->",
"getApi",
"(",
")",
"->",
"request",
"(",
"$",
"this",
"->",
"getApi",
"(",
")",
"->",
"sprintf",
"(",
"'/repos... | Remove a label from an issue
@link https://developer.github.com/v3/issues/labels/#remove-a-label-from-an-issue
@param int $number
@param string $name
@return bool | [
"Remove",
"a",
"label",
"from",
"an",
"issue"
] | cb5044443daf138787a7feb9aa9bf50220a44fd6 | https://github.com/FlexyProject/GitHubAPI/blob/cb5044443daf138787a7feb9aa9bf50220a44fd6/lib/GitHub/Receiver/Issues/Labels.php#L143-L153 |
38,755 | FlexyProject/GitHubAPI | lib/GitHub/Receiver/Issues/Labels.php | Labels.replaceIssuesLabels | public function replaceIssuesLabels(int $number): array
{
return $this->getApi()->request($this->getApi()->sprintf('/repos/:owner/:repo/issues/:number/labels',
$this->getIssues()->getOwner(), $this->getIssues()->getRepo(), $number), Request::METHOD_PUT);
} | php | public function replaceIssuesLabels(int $number): array
{
return $this->getApi()->request($this->getApi()->sprintf('/repos/:owner/:repo/issues/:number/labels',
$this->getIssues()->getOwner(), $this->getIssues()->getRepo(), $number), Request::METHOD_PUT);
} | [
"public",
"function",
"replaceIssuesLabels",
"(",
"int",
"$",
"number",
")",
":",
"array",
"{",
"return",
"$",
"this",
"->",
"getApi",
"(",
")",
"->",
"request",
"(",
"$",
"this",
"->",
"getApi",
"(",
")",
"->",
"sprintf",
"(",
"'/repos/:owner/:repo/issues... | Replace all labels for an issue
@link https://developer.github.com/v3/issues/labels/#replace-all-labels-for-an-issue
@param int $number
@return array | [
"Replace",
"all",
"labels",
"for",
"an",
"issue"
] | cb5044443daf138787a7feb9aa9bf50220a44fd6 | https://github.com/FlexyProject/GitHubAPI/blob/cb5044443daf138787a7feb9aa9bf50220a44fd6/lib/GitHub/Receiver/Issues/Labels.php#L164-L168 |
38,756 | FlexyProject/GitHubAPI | lib/GitHub/Receiver/Issues/Labels.php | Labels.removeIssueLabels | public function removeIssueLabels(int $number): bool
{
$this->getApi()->request($this->getApi()->sprintf('/repos/:owner/:repo/issues/:number/labels',
$this->getIssues()->getOwner(), $this->getIssues()->getRepo(), $number), Request::METHOD_DELETE);
if ($this->getApi()->getHeaders()['Status'] == '204 No Content') {
return true;
}
return false;
} | php | public function removeIssueLabels(int $number): bool
{
$this->getApi()->request($this->getApi()->sprintf('/repos/:owner/:repo/issues/:number/labels',
$this->getIssues()->getOwner(), $this->getIssues()->getRepo(), $number), Request::METHOD_DELETE);
if ($this->getApi()->getHeaders()['Status'] == '204 No Content') {
return true;
}
return false;
} | [
"public",
"function",
"removeIssueLabels",
"(",
"int",
"$",
"number",
")",
":",
"bool",
"{",
"$",
"this",
"->",
"getApi",
"(",
")",
"->",
"request",
"(",
"$",
"this",
"->",
"getApi",
"(",
")",
"->",
"sprintf",
"(",
"'/repos/:owner/:repo/issues/:number/labels... | Remove all labels from an issue
@link https://developer.github.com/v3/issues/labels/#remove-all-labels-from-an-issue
@param int $number
@return bool | [
"Remove",
"all",
"labels",
"from",
"an",
"issue"
] | cb5044443daf138787a7feb9aa9bf50220a44fd6 | https://github.com/FlexyProject/GitHubAPI/blob/cb5044443daf138787a7feb9aa9bf50220a44fd6/lib/GitHub/Receiver/Issues/Labels.php#L179-L189 |
38,757 | FlexyProject/GitHubAPI | lib/GitHub/Receiver/Repositories/Deployments.php | Deployments.createDeployement | public function createDeployement(string $ref, string $task = AbstractApi::TASK_DEPLOY, bool $autoMerge = true,
array $requiredContexts = [], string $payload = '',
string $environment = AbstractApi::ENVIRONMENT_PRODUCTION,
string $description = ''): array
{
return $this->getApi()->request($this->getApi()->sprintf('/repos/:owner/:repo/deployments',
$this->getRepositories()->getOwner(), $this->getRepositories()->getRepo()), Request::METHOD_POST, [
'ref' => $ref,
'task' => $task,
'auto_merge' => $autoMerge,
'required_contexts' => $requiredContexts,
'payload' => $payload,
'environment' => $environment,
'description' => $description
]);
} | php | public function createDeployement(string $ref, string $task = AbstractApi::TASK_DEPLOY, bool $autoMerge = true,
array $requiredContexts = [], string $payload = '',
string $environment = AbstractApi::ENVIRONMENT_PRODUCTION,
string $description = ''): array
{
return $this->getApi()->request($this->getApi()->sprintf('/repos/:owner/:repo/deployments',
$this->getRepositories()->getOwner(), $this->getRepositories()->getRepo()), Request::METHOD_POST, [
'ref' => $ref,
'task' => $task,
'auto_merge' => $autoMerge,
'required_contexts' => $requiredContexts,
'payload' => $payload,
'environment' => $environment,
'description' => $description
]);
} | [
"public",
"function",
"createDeployement",
"(",
"string",
"$",
"ref",
",",
"string",
"$",
"task",
"=",
"AbstractApi",
"::",
"TASK_DEPLOY",
",",
"bool",
"$",
"autoMerge",
"=",
"true",
",",
"array",
"$",
"requiredContexts",
"=",
"[",
"]",
",",
"string",
"$",... | Create a Deployment
@link https://developer.github.com/v3/repos/deployments/#create-a-deployment
@param string $ref
@param string $task
@param bool $autoMerge
@param array $requiredContexts
@param string $payload
@param string $environment
@param string $description
@return array | [
"Create",
"a",
"Deployment"
] | cb5044443daf138787a7feb9aa9bf50220a44fd6 | https://github.com/FlexyProject/GitHubAPI/blob/cb5044443daf138787a7feb9aa9bf50220a44fd6/lib/GitHub/Receiver/Repositories/Deployments.php#L51-L66 |
38,758 | FlexyProject/GitHubAPI | lib/GitHub/Receiver/Repositories/Deployments.php | Deployments.createDeploymentStatus | public function createDeploymentStatus(int $id, string $state, string $targetUrl = '',
string $description = ''): array
{
return $this->getApi()->request($this->getApi()->sprintf('/repos/:owner/:repo/deployments/:id/statuses',
$this->getRepositories()->getOwner(), $this->getRepositories()->getRepo(), $id), Request::METHOD_POST, [
'state' => $state,
'target_url' => $targetUrl,
'description' => $description
]);
} | php | public function createDeploymentStatus(int $id, string $state, string $targetUrl = '',
string $description = ''): array
{
return $this->getApi()->request($this->getApi()->sprintf('/repos/:owner/:repo/deployments/:id/statuses',
$this->getRepositories()->getOwner(), $this->getRepositories()->getRepo(), $id), Request::METHOD_POST, [
'state' => $state,
'target_url' => $targetUrl,
'description' => $description
]);
} | [
"public",
"function",
"createDeploymentStatus",
"(",
"int",
"$",
"id",
",",
"string",
"$",
"state",
",",
"string",
"$",
"targetUrl",
"=",
"''",
",",
"string",
"$",
"description",
"=",
"''",
")",
":",
"array",
"{",
"return",
"$",
"this",
"->",
"getApi",
... | Create a Deployment Status
@link https://developer.github.com/v3/repos/deployments/#create-a-deployment-status
@param int $id
@param string $state
@param string $targetUrl
@param string $description
@return array | [
"Create",
"a",
"Deployment",
"Status"
] | cb5044443daf138787a7feb9aa9bf50220a44fd6 | https://github.com/FlexyProject/GitHubAPI/blob/cb5044443daf138787a7feb9aa9bf50220a44fd6/lib/GitHub/Receiver/Repositories/Deployments.php#L95-L104 |
38,759 | FlexyProject/GitHubAPI | lib/GitHub/Receiver/Enterprise/SearchIndexing.php | SearchIndexing.queueIndexingJob | public function queueIndexingJob(string $target): array
{
return $this->getApi()->request(sprintf('/staff/indexing_jobs'), Request::METHOD_POST, [
'target' => $target
]);
} | php | public function queueIndexingJob(string $target): array
{
return $this->getApi()->request(sprintf('/staff/indexing_jobs'), Request::METHOD_POST, [
'target' => $target
]);
} | [
"public",
"function",
"queueIndexingJob",
"(",
"string",
"$",
"target",
")",
":",
"array",
"{",
"return",
"$",
"this",
"->",
"getApi",
"(",
")",
"->",
"request",
"(",
"sprintf",
"(",
"'/staff/indexing_jobs'",
")",
",",
"Request",
"::",
"METHOD_POST",
",",
... | Queue an indexing job
@link https://developer.github.com/v3/enterprise/search_indexing/#queue-an-indexing-job
@param string $target
@return array | [
"Queue",
"an",
"indexing",
"job"
] | cb5044443daf138787a7feb9aa9bf50220a44fd6 | https://github.com/FlexyProject/GitHubAPI/blob/cb5044443daf138787a7feb9aa9bf50220a44fd6/lib/GitHub/Receiver/Enterprise/SearchIndexing.php#L24-L29 |
38,760 | FlexyProject/GitHubAPI | lib/GitHub/Receiver/Activity/Watching.php | Watching.listSubscriptions | public function listSubscriptions(string $username = null): array
{
if (null !== $username) {
return $this->getApi()->request($this->getApi()->sprintf('/users/:username/subscriptions',
$this->getActivity()->getOwner(), $this->getActivity()->getRepo(), $username));
}
return $this->getApi()->request($this->getApi()
->sprintf('/user/subscriptions', $this->getActivity()->getOwner(),
$this->getActivity()->getRepo()));
} | php | public function listSubscriptions(string $username = null): array
{
if (null !== $username) {
return $this->getApi()->request($this->getApi()->sprintf('/users/:username/subscriptions',
$this->getActivity()->getOwner(), $this->getActivity()->getRepo(), $username));
}
return $this->getApi()->request($this->getApi()
->sprintf('/user/subscriptions', $this->getActivity()->getOwner(),
$this->getActivity()->getRepo()));
} | [
"public",
"function",
"listSubscriptions",
"(",
"string",
"$",
"username",
"=",
"null",
")",
":",
"array",
"{",
"if",
"(",
"null",
"!==",
"$",
"username",
")",
"{",
"return",
"$",
"this",
"->",
"getApi",
"(",
")",
"->",
"request",
"(",
"$",
"this",
"... | List repositories being watched
@link https://developer.github.com/v3/activity/watching/#list-repositories-being-watched
@param string $username
@return array | [
"List",
"repositories",
"being",
"watched"
] | cb5044443daf138787a7feb9aa9bf50220a44fd6 | https://github.com/FlexyProject/GitHubAPI/blob/cb5044443daf138787a7feb9aa9bf50220a44fd6/lib/GitHub/Receiver/Activity/Watching.php#L37-L47 |
38,761 | FlexyProject/GitHubAPI | lib/GitHub/Receiver/Activity/Watching.php | Watching.getRepositorySubscription | public function getRepositorySubscription(): array
{
return $this->getApi()->request($this->getApi()->sprintf('/repos/:owner/:repo/subscription',
$this->getActivity()->getOwner(), $this->getActivity()->getRepo()));
} | php | public function getRepositorySubscription(): array
{
return $this->getApi()->request($this->getApi()->sprintf('/repos/:owner/:repo/subscription',
$this->getActivity()->getOwner(), $this->getActivity()->getRepo()));
} | [
"public",
"function",
"getRepositorySubscription",
"(",
")",
":",
"array",
"{",
"return",
"$",
"this",
"->",
"getApi",
"(",
")",
"->",
"request",
"(",
"$",
"this",
"->",
"getApi",
"(",
")",
"->",
"sprintf",
"(",
"'/repos/:owner/:repo/subscription'",
",",
"$"... | Get a Repository Subscription
@link https://developer.github.com/v3/activity/watching/#get-a-repository-subscription
@return array | [
"Get",
"a",
"Repository",
"Subscription"
] | cb5044443daf138787a7feb9aa9bf50220a44fd6 | https://github.com/FlexyProject/GitHubAPI/blob/cb5044443daf138787a7feb9aa9bf50220a44fd6/lib/GitHub/Receiver/Activity/Watching.php#L55-L59 |
38,762 | FlexyProject/GitHubAPI | lib/GitHub/Receiver/Activity/Watching.php | Watching.setRepositorySubscription | public function setRepositorySubscription(bool $subscribed = false, bool $ignored = false): array
{
return $this->getApi()->request($this->getApi()->sprintf('/repos/:owner/:repo/subscription?:args',
$this->getActivity()->getOwner(), $this->getActivity()->getRepo(), http_build_query([
'subscribed' => $subscribed,
'ignored' => $ignored
])), Request::METHOD_PUT);
} | php | public function setRepositorySubscription(bool $subscribed = false, bool $ignored = false): array
{
return $this->getApi()->request($this->getApi()->sprintf('/repos/:owner/:repo/subscription?:args',
$this->getActivity()->getOwner(), $this->getActivity()->getRepo(), http_build_query([
'subscribed' => $subscribed,
'ignored' => $ignored
])), Request::METHOD_PUT);
} | [
"public",
"function",
"setRepositorySubscription",
"(",
"bool",
"$",
"subscribed",
"=",
"false",
",",
"bool",
"$",
"ignored",
"=",
"false",
")",
":",
"array",
"{",
"return",
"$",
"this",
"->",
"getApi",
"(",
")",
"->",
"request",
"(",
"$",
"this",
"->",
... | Set a Repository Subscription
@link https://developer.github.com/v3/activity/watching/#set-a-repository-subscription
@param bool $subscribed
@param bool $ignored
@return array | [
"Set",
"a",
"Repository",
"Subscription"
] | cb5044443daf138787a7feb9aa9bf50220a44fd6 | https://github.com/FlexyProject/GitHubAPI/blob/cb5044443daf138787a7feb9aa9bf50220a44fd6/lib/GitHub/Receiver/Activity/Watching.php#L71-L78 |
38,763 | FlexyProject/GitHubAPI | lib/GitHub/Receiver/Issues.php | Issues.listRepositoryIssues | public function listRepositoryIssues(string $milestone = '*', string $state = AbstractApi::STATE_OPEN,
string $assignee = '*', string $creator = '', string $mentioned = '',
string $labels = '', string $sort = AbstractApi::SORT_CREATED,
string $direction = AbstractApi::DIRECTION_DESC,
string $since = '1970-01-01'): array
{
return $this->getApi()->request($this->getApi()->sprintf('/repos/:owner/:repo/issues?:args', $this->getOwner(),
$this->getRepo(), http_build_query([
'milestone' => $milestone,
'state' => $state,
'assignee' => $assignee,
'creator' => $creator,
'mentioned' => $mentioned,
'labels' => $labels,
'sort' => $sort,
'direction' => $direction,
'since' => (new DateTime($since))->format(DateTime::ATOM)
])));
} | php | public function listRepositoryIssues(string $milestone = '*', string $state = AbstractApi::STATE_OPEN,
string $assignee = '*', string $creator = '', string $mentioned = '',
string $labels = '', string $sort = AbstractApi::SORT_CREATED,
string $direction = AbstractApi::DIRECTION_DESC,
string $since = '1970-01-01'): array
{
return $this->getApi()->request($this->getApi()->sprintf('/repos/:owner/:repo/issues?:args', $this->getOwner(),
$this->getRepo(), http_build_query([
'milestone' => $milestone,
'state' => $state,
'assignee' => $assignee,
'creator' => $creator,
'mentioned' => $mentioned,
'labels' => $labels,
'sort' => $sort,
'direction' => $direction,
'since' => (new DateTime($since))->format(DateTime::ATOM)
])));
} | [
"public",
"function",
"listRepositoryIssues",
"(",
"string",
"$",
"milestone",
"=",
"'*'",
",",
"string",
"$",
"state",
"=",
"AbstractApi",
"::",
"STATE_OPEN",
",",
"string",
"$",
"assignee",
"=",
"'*'",
",",
"string",
"$",
"creator",
"=",
"''",
",",
"stri... | List issues for a repository
@link https://developer.github.com/v3/issues/#list-issues-for-a-repository
@param string $milestone
@param string $state
@param string $assignee
@param string $creator
@param string $mentioned
@param string $labels
@param string $sort
@param string $direction
@param string $since
@return array | [
"List",
"issues",
"for",
"a",
"repository"
] | cb5044443daf138787a7feb9aa9bf50220a44fd6 | https://github.com/FlexyProject/GitHubAPI/blob/cb5044443daf138787a7feb9aa9bf50220a44fd6/lib/GitHub/Receiver/Issues.php#L130-L148 |
38,764 | FlexyProject/GitHubAPI | lib/GitHub/Receiver/Issues.php | Issues.createIssue | public function createIssue(string $title, string $body = '', string $assignee = '', int $milestone = 0,
array $labels = []): array
{
return $this->getApi()->request($this->getApi()->sprintf('/repos/:owner/:repo/issues', $this->getOwner(),
$this->getRepo()), Request::METHOD_POST, [
'title' => $title,
'body' => $body,
'assignee' => $assignee,
'milestone' => $milestone,
'labels' => $labels
]);
} | php | public function createIssue(string $title, string $body = '', string $assignee = '', int $milestone = 0,
array $labels = []): array
{
return $this->getApi()->request($this->getApi()->sprintf('/repos/:owner/:repo/issues', $this->getOwner(),
$this->getRepo()), Request::METHOD_POST, [
'title' => $title,
'body' => $body,
'assignee' => $assignee,
'milestone' => $milestone,
'labels' => $labels
]);
} | [
"public",
"function",
"createIssue",
"(",
"string",
"$",
"title",
",",
"string",
"$",
"body",
"=",
"''",
",",
"string",
"$",
"assignee",
"=",
"''",
",",
"int",
"$",
"milestone",
"=",
"0",
",",
"array",
"$",
"labels",
"=",
"[",
"]",
")",
":",
"array... | Create an issue
@link https://developer.github.com/v3/issues/#create-an-issue
@param string $title
@param string $body
@param string $assignee
@param int $milestone
@param array $labels
@return array | [
"Create",
"an",
"issue"
] | cb5044443daf138787a7feb9aa9bf50220a44fd6 | https://github.com/FlexyProject/GitHubAPI/blob/cb5044443daf138787a7feb9aa9bf50220a44fd6/lib/GitHub/Receiver/Issues.php#L179-L190 |
38,765 | FlexyProject/GitHubAPI | lib/GitHub/Receiver/Issues.php | Issues.editIssue | public function editIssue(int $number, string $title = '', string $body = '', string $assignee = '',
int $milestone = 0, array $labels = []): array
{
return $this->getApi()->request($this->getApi()
->sprintf('/repos/:owner/:repo/issues/:number', $this->getOwner(),
$this->getRepo(), $number), Request::METHOD_PATCH, [
'title' => $title,
'body' => $body,
'assignee' => $assignee,
'milestone' => $milestone,
'labels' => $labels
]);
} | php | public function editIssue(int $number, string $title = '', string $body = '', string $assignee = '',
int $milestone = 0, array $labels = []): array
{
return $this->getApi()->request($this->getApi()
->sprintf('/repos/:owner/:repo/issues/:number', $this->getOwner(),
$this->getRepo(), $number), Request::METHOD_PATCH, [
'title' => $title,
'body' => $body,
'assignee' => $assignee,
'milestone' => $milestone,
'labels' => $labels
]);
} | [
"public",
"function",
"editIssue",
"(",
"int",
"$",
"number",
",",
"string",
"$",
"title",
"=",
"''",
",",
"string",
"$",
"body",
"=",
"''",
",",
"string",
"$",
"assignee",
"=",
"''",
",",
"int",
"$",
"milestone",
"=",
"0",
",",
"array",
"$",
"labe... | Edit an issue
@link https://developer.github.com/v3/issues/#edit-an-issue
@param int $number
@param string $title
@param string $body
@param string $assignee
@param int $milestone
@param array $labels
@return array | [
"Edit",
"an",
"issue"
] | cb5044443daf138787a7feb9aa9bf50220a44fd6 | https://github.com/FlexyProject/GitHubAPI/blob/cb5044443daf138787a7feb9aa9bf50220a44fd6/lib/GitHub/Receiver/Issues.php#L206-L218 |
38,766 | FlexyProject/GitHubAPI | lib/GitHub/Receiver/Miscellaneous/Licenses.php | Licenses.getIndividualLicense | public function getIndividualLicense(string $license): array
{
return $this->getApi()->setAccept('application/vnd.github.drax-preview+json')->request($this->getApi()
->sprintf('/licenses/:license',
$license));
} | php | public function getIndividualLicense(string $license): array
{
return $this->getApi()->setAccept('application/vnd.github.drax-preview+json')->request($this->getApi()
->sprintf('/licenses/:license',
$license));
} | [
"public",
"function",
"getIndividualLicense",
"(",
"string",
"$",
"license",
")",
":",
"array",
"{",
"return",
"$",
"this",
"->",
"getApi",
"(",
")",
"->",
"setAccept",
"(",
"'application/vnd.github.drax-preview+json'",
")",
"->",
"request",
"(",
"$",
"this",
... | Get an individual license
@link https://developer.github.com/v3/licenses/#get-an-individual-license
@param string $license
@return array | [
"Get",
"an",
"individual",
"license"
] | cb5044443daf138787a7feb9aa9bf50220a44fd6 | https://github.com/FlexyProject/GitHubAPI/blob/cb5044443daf138787a7feb9aa9bf50220a44fd6/lib/GitHub/Receiver/Miscellaneous/Licenses.php#L34-L39 |
38,767 | FlexyProject/GitHubAPI | lib/GitHub/Receiver/Gists/Comments.php | Comments.listComments | public function listComments(string $gistId): array
{
return $this->getApi()->request($this->getApi()->sprintf('/gists/:gist_id/comments', $gistId));
} | php | public function listComments(string $gistId): array
{
return $this->getApi()->request($this->getApi()->sprintf('/gists/:gist_id/comments', $gistId));
} | [
"public",
"function",
"listComments",
"(",
"string",
"$",
"gistId",
")",
":",
"array",
"{",
"return",
"$",
"this",
"->",
"getApi",
"(",
")",
"->",
"request",
"(",
"$",
"this",
"->",
"getApi",
"(",
")",
"->",
"sprintf",
"(",
"'/gists/:gist_id/comments'",
... | List comments on a gist
@link https://developer.github.com/v3/gists/comments/#list-comments-on-a-gist
@param string $gistId
@return array | [
"List",
"comments",
"on",
"a",
"gist"
] | cb5044443daf138787a7feb9aa9bf50220a44fd6 | https://github.com/FlexyProject/GitHubAPI/blob/cb5044443daf138787a7feb9aa9bf50220a44fd6/lib/GitHub/Receiver/Gists/Comments.php#L24-L27 |
38,768 | FlexyProject/GitHubAPI | lib/GitHub/Receiver/GitData/Commits.php | Commits.create | public function create(string $message, string $tree, $parents, string $name = null, string $email = null,
string $date = 'now'): array
{
return $this->getApi()->request($this->getApi()->sprintf('/repos/:owner/:repo/git/commits',
$this->getGitData()->getOwner(), $this->getGitData()->getRepo()), Request::METHOD_POST, [
'message' => $message,
'tree' => $tree,
'parents' => $parents,
'name' => $name,
'email' => $email,
'date' => (new DateTime($date))->format(DateTime::ATOM)
]);
} | php | public function create(string $message, string $tree, $parents, string $name = null, string $email = null,
string $date = 'now'): array
{
return $this->getApi()->request($this->getApi()->sprintf('/repos/:owner/:repo/git/commits',
$this->getGitData()->getOwner(), $this->getGitData()->getRepo()), Request::METHOD_POST, [
'message' => $message,
'tree' => $tree,
'parents' => $parents,
'name' => $name,
'email' => $email,
'date' => (new DateTime($date))->format(DateTime::ATOM)
]);
} | [
"public",
"function",
"create",
"(",
"string",
"$",
"message",
",",
"string",
"$",
"tree",
",",
"$",
"parents",
",",
"string",
"$",
"name",
"=",
"null",
",",
"string",
"$",
"email",
"=",
"null",
",",
"string",
"$",
"date",
"=",
"'now'",
")",
":",
"... | Create a Commit
@link https://developer.github.com/v3/git/commits/#create-a-commit
@param string $message
@param string $tree
@param array|string $parents
@param string $name
@param string $email
@param string $date
@return array
@throws \Exception | [
"Create",
"a",
"Commit"
] | cb5044443daf138787a7feb9aa9bf50220a44fd6 | https://github.com/FlexyProject/GitHubAPI/blob/cb5044443daf138787a7feb9aa9bf50220a44fd6/lib/GitHub/Receiver/GitData/Commits.php#L46-L58 |
38,769 | FlexyProject/GitHubAPI | lib/GitHub/Event/Payload.php | Payload.setSecret | public function setSecret(string $secret): Payload
{
$this->secret = hash_hmac('sha1', $this->rawData, $secret);
return $this;
} | php | public function setSecret(string $secret): Payload
{
$this->secret = hash_hmac('sha1', $this->rawData, $secret);
return $this;
} | [
"public",
"function",
"setSecret",
"(",
"string",
"$",
"secret",
")",
":",
"Payload",
"{",
"$",
"this",
"->",
"secret",
"=",
"hash_hmac",
"(",
"'sha1'",
",",
"$",
"this",
"->",
"rawData",
",",
"$",
"secret",
")",
";",
"return",
"$",
"this",
";",
"}"
... | Set secret, encode this secret with Hmac, SHA1 method
@param string $secret
@return Payload | [
"Set",
"secret",
"encode",
"this",
"secret",
"with",
"Hmac",
"SHA1",
"method"
] | cb5044443daf138787a7feb9aa9bf50220a44fd6 | https://github.com/FlexyProject/GitHubAPI/blob/cb5044443daf138787a7feb9aa9bf50220a44fd6/lib/GitHub/Event/Payload.php#L76-L81 |
38,770 | FlexyProject/GitHubAPI | lib/GitHub/Event/Payload.php | Payload.parse | public function parse(): Payload
{
/** Check signature from header */
if (!$this->_checkSignature()) {
throw new BadSignatureException('Hook secret does not match.');
}
/** Get data from different locations according to content-type */
switch ($this->serverBag->get('CONTENT_TYPE')) {
case 'application/json':
$data = $this->getRawData();
break;
case 'application/x-www-form-urlencoded':
$data = $_POST['payload'];
break;
default:
throw new Exception('Unsupported content type: "' . $this->serverBag->get('CONTENT_TYPE') . '"');
}
$this->setParsedData($data);
return $this;
} | php | public function parse(): Payload
{
/** Check signature from header */
if (!$this->_checkSignature()) {
throw new BadSignatureException('Hook secret does not match.');
}
/** Get data from different locations according to content-type */
switch ($this->serverBag->get('CONTENT_TYPE')) {
case 'application/json':
$data = $this->getRawData();
break;
case 'application/x-www-form-urlencoded':
$data = $_POST['payload'];
break;
default:
throw new Exception('Unsupported content type: "' . $this->serverBag->get('CONTENT_TYPE') . '"');
}
$this->setParsedData($data);
return $this;
} | [
"public",
"function",
"parse",
"(",
")",
":",
"Payload",
"{",
"/** Check signature from header */",
"if",
"(",
"!",
"$",
"this",
"->",
"_checkSignature",
"(",
")",
")",
"{",
"throw",
"new",
"BadSignatureException",
"(",
"'Hook secret does not match.'",
")",
";",
... | Parse raw data
@return Payload
@throws BadSignatureException
@throws \Exception | [
"Parse",
"raw",
"data"
] | cb5044443daf138787a7feb9aa9bf50220a44fd6 | https://github.com/FlexyProject/GitHubAPI/blob/cb5044443daf138787a7feb9aa9bf50220a44fd6/lib/GitHub/Event/Payload.php#L164-L187 |
38,771 | FlexyProject/GitHubAPI | lib/GitHub/Event/Payload.php | Payload._checkSignature | private function _checkSignature(): bool
{
$secret = $this->getSecret();
$httpHubSignature = $this->serverBag->get('HTTP_X_HUB_SIGNATURE');
if (null !== $secret) {
if ($httpHubSignature) {
/**
* Split signature into algorithm and hash
*
* @link http://isometriks.com/verify-github-webhooks-with-php
*/
list(, $hash) = explode('=', $httpHubSignature, 2);
return $secret == $hash;
}
throw new BadSignatureException('HTTP header "X-Hub-Signature" is missing.');
}
return true;
} | php | private function _checkSignature(): bool
{
$secret = $this->getSecret();
$httpHubSignature = $this->serverBag->get('HTTP_X_HUB_SIGNATURE');
if (null !== $secret) {
if ($httpHubSignature) {
/**
* Split signature into algorithm and hash
*
* @link http://isometriks.com/verify-github-webhooks-with-php
*/
list(, $hash) = explode('=', $httpHubSignature, 2);
return $secret == $hash;
}
throw new BadSignatureException('HTTP header "X-Hub-Signature" is missing.');
}
return true;
} | [
"private",
"function",
"_checkSignature",
"(",
")",
":",
"bool",
"{",
"$",
"secret",
"=",
"$",
"this",
"->",
"getSecret",
"(",
")",
";",
"$",
"httpHubSignature",
"=",
"$",
"this",
"->",
"serverBag",
"->",
"get",
"(",
"'HTTP_X_HUB_SIGNATURE'",
")",
";",
"... | Check X-Hub-Signature
@throws BadSignatureException
@return bool | [
"Check",
"X",
"-",
"Hub",
"-",
"Signature"
] | cb5044443daf138787a7feb9aa9bf50220a44fd6 | https://github.com/FlexyProject/GitHubAPI/blob/cb5044443daf138787a7feb9aa9bf50220a44fd6/lib/GitHub/Event/Payload.php#L195-L216 |
38,772 | FlexyProject/GitHubAPI | lib/GitHub/Receiver/Users/Followers.php | Followers.listFollowers | public function listFollowers(string $username = null): array
{
$url = '/user/followers';
if (null !== $username) {
$url = $this->getApi()->sprintf('/users/:username/followers', $username);
}
return $this->getApi()->request($url);
} | php | public function listFollowers(string $username = null): array
{
$url = '/user/followers';
if (null !== $username) {
$url = $this->getApi()->sprintf('/users/:username/followers', $username);
}
return $this->getApi()->request($url);
} | [
"public",
"function",
"listFollowers",
"(",
"string",
"$",
"username",
"=",
"null",
")",
":",
"array",
"{",
"$",
"url",
"=",
"'/user/followers'",
";",
"if",
"(",
"null",
"!==",
"$",
"username",
")",
"{",
"$",
"url",
"=",
"$",
"this",
"->",
"getApi",
... | List followers of a user
@link https://developer.github.com/v3/users/followers/#list-followers-of-a-user
@param null|string $username
@return array
@throws \Exception | [
"List",
"followers",
"of",
"a",
"user"
] | cb5044443daf138787a7feb9aa9bf50220a44fd6 | https://github.com/FlexyProject/GitHubAPI/blob/cb5044443daf138787a7feb9aa9bf50220a44fd6/lib/GitHub/Receiver/Users/Followers.php#L25-L33 |
38,773 | FlexyProject/GitHubAPI | lib/GitHub/Receiver/Users/Followers.php | Followers.checkFollowingUser | public function checkFollowingUser(string $username): bool
{
$this->getApi()->request($this->getApi()->sprintf('/user/following/:username', $username));
if ($this->getApi()->getHeaders()['Status'] == '204 No Content') {
return true;
}
return false;
} | php | public function checkFollowingUser(string $username): bool
{
$this->getApi()->request($this->getApi()->sprintf('/user/following/:username', $username));
if ($this->getApi()->getHeaders()['Status'] == '204 No Content') {
return true;
}
return false;
} | [
"public",
"function",
"checkFollowingUser",
"(",
"string",
"$",
"username",
")",
":",
"bool",
"{",
"$",
"this",
"->",
"getApi",
"(",
")",
"->",
"request",
"(",
"$",
"this",
"->",
"getApi",
"(",
")",
"->",
"sprintf",
"(",
"'/user/following/:username'",
",",... | Check if you are following a user
@link https://developer.github.com/v3/users/followers/#check-if-you-are-following-a-user
@param string $username
@return bool
@throws \Exception | [
"Check",
"if",
"you",
"are",
"following",
"a",
"user"
] | cb5044443daf138787a7feb9aa9bf50220a44fd6 | https://github.com/FlexyProject/GitHubAPI/blob/cb5044443daf138787a7feb9aa9bf50220a44fd6/lib/GitHub/Receiver/Users/Followers.php#L65-L74 |
38,774 | FlexyProject/GitHubAPI | lib/GitHub/Receiver/Users/Followers.php | Followers.checkUserFollowsAnother | public function checkUserFollowsAnother(string $username, string $targetUser): bool
{
$this->getApi()->request($this->getApi()
->sprintf('/users/:username/following/:target_user', $username, $targetUser));
if ($this->getApi()->getHeaders()['Status'] == '204 No Content') {
return true;
}
return false;
} | php | public function checkUserFollowsAnother(string $username, string $targetUser): bool
{
$this->getApi()->request($this->getApi()
->sprintf('/users/:username/following/:target_user', $username, $targetUser));
if ($this->getApi()->getHeaders()['Status'] == '204 No Content') {
return true;
}
return false;
} | [
"public",
"function",
"checkUserFollowsAnother",
"(",
"string",
"$",
"username",
",",
"string",
"$",
"targetUser",
")",
":",
"bool",
"{",
"$",
"this",
"->",
"getApi",
"(",
")",
"->",
"request",
"(",
"$",
"this",
"->",
"getApi",
"(",
")",
"->",
"sprintf",... | Check if one user follows another
@link https://developer.github.com/v3/users/followers/#check-if-one-user-follows-another
@param string $username
@param string $targetUser
@return bool
@throws \Exception | [
"Check",
"if",
"one",
"user",
"follows",
"another"
] | cb5044443daf138787a7feb9aa9bf50220a44fd6 | https://github.com/FlexyProject/GitHubAPI/blob/cb5044443daf138787a7feb9aa9bf50220a44fd6/lib/GitHub/Receiver/Users/Followers.php#L87-L97 |
38,775 | FlexyProject/GitHubAPI | lib/GitHub/Receiver/Repositories/Statuses.php | Statuses.createStatus | public function createStatus(string $sha, string $state, string $targetUrl = null, string $description = null,
string $context = 'default'): array
{
return $this->getApi()->request($this->getApi()->sprintf('/repos/:owner/:repo/statuses/:sha',
$this->getRepositories()->getOwner(), $this->getRepositories()->getRepo(), $sha), Request::METHOD_POST, [
'state' => $state,
'target_url' => $targetUrl,
'description' => $description,
'context' => $context
]);
} | php | public function createStatus(string $sha, string $state, string $targetUrl = null, string $description = null,
string $context = 'default'): array
{
return $this->getApi()->request($this->getApi()->sprintf('/repos/:owner/:repo/statuses/:sha',
$this->getRepositories()->getOwner(), $this->getRepositories()->getRepo(), $sha), Request::METHOD_POST, [
'state' => $state,
'target_url' => $targetUrl,
'description' => $description,
'context' => $context
]);
} | [
"public",
"function",
"createStatus",
"(",
"string",
"$",
"sha",
",",
"string",
"$",
"state",
",",
"string",
"$",
"targetUrl",
"=",
"null",
",",
"string",
"$",
"description",
"=",
"null",
",",
"string",
"$",
"context",
"=",
"'default'",
")",
":",
"array"... | Create a Status
@link https://developer.github.com/v3/repos/statuses/#create-a-status
@param string $sha
@param string $state
@param string $targetUrl
@param string $description
@param string $context
@return array | [
"Create",
"a",
"Status"
] | cb5044443daf138787a7feb9aa9bf50220a44fd6 | https://github.com/FlexyProject/GitHubAPI/blob/cb5044443daf138787a7feb9aa9bf50220a44fd6/lib/GitHub/Receiver/Repositories/Statuses.php#L28-L38 |
38,776 | FlexyProject/GitHubAPI | lib/GitHub/Receiver/PullRequests.php | PullRequests.getSinglePullRequest | public function getSinglePullRequest(int $number): array
{
return $this->getApi()->request($this->getApi()->sprintf('/repos/:owner/:repo/pulls/:number', $this->getOwner(),
$this->getRepo(), $number));
} | php | public function getSinglePullRequest(int $number): array
{
return $this->getApi()->request($this->getApi()->sprintf('/repos/:owner/:repo/pulls/:number', $this->getOwner(),
$this->getRepo(), $number));
} | [
"public",
"function",
"getSinglePullRequest",
"(",
"int",
"$",
"number",
")",
":",
"array",
"{",
"return",
"$",
"this",
"->",
"getApi",
"(",
")",
"->",
"request",
"(",
"$",
"this",
"->",
"getApi",
"(",
")",
"->",
"sprintf",
"(",
"'/repos/:owner/:repo/pulls... | Get a single pull request
@link https://developer.github.com/v3/pulls/#get-a-single-pull-request
@param int $number
@return array
@throws \Exception | [
"Get",
"a",
"single",
"pull",
"request"
] | cb5044443daf138787a7feb9aa9bf50220a44fd6 | https://github.com/FlexyProject/GitHubAPI/blob/cb5044443daf138787a7feb9aa9bf50220a44fd6/lib/GitHub/Receiver/PullRequests.php#L58-L62 |
38,777 | FlexyProject/GitHubAPI | lib/GitHub/Receiver/PullRequests/ReviewComments.php | ReviewComments.listCommentsPullRequest | public function listCommentsPullRequest(int $number): array
{
return $this->getApi()->request($this->getApi()->sprintf('/repos/:owner/:repo/pulls/:number/comments',
$this->getPullRequests()->getOwner(), $this->getPullRequests()->getRepo(), $number));
} | php | public function listCommentsPullRequest(int $number): array
{
return $this->getApi()->request($this->getApi()->sprintf('/repos/:owner/:repo/pulls/:number/comments',
$this->getPullRequests()->getOwner(), $this->getPullRequests()->getRepo(), $number));
} | [
"public",
"function",
"listCommentsPullRequest",
"(",
"int",
"$",
"number",
")",
":",
"array",
"{",
"return",
"$",
"this",
"->",
"getApi",
"(",
")",
"->",
"request",
"(",
"$",
"this",
"->",
"getApi",
"(",
")",
"->",
"sprintf",
"(",
"'/repos/:owner/:repo/pu... | List comments on a pull request
@link https://developer.github.com/v3/pulls/comments/#list-comments-on-a-pull-request
@param int $number
@return array
@throws \Exception | [
"List",
"comments",
"on",
"a",
"pull",
"request"
] | cb5044443daf138787a7feb9aa9bf50220a44fd6 | https://github.com/FlexyProject/GitHubAPI/blob/cb5044443daf138787a7feb9aa9bf50220a44fd6/lib/GitHub/Receiver/PullRequests/ReviewComments.php#L27-L31 |
38,778 | FlexyProject/GitHubAPI | lib/GitHub/Receiver/Repositories.php | Repositories.listYourRepositories | public function listYourRepositories(string $type = AbstractApi::TYPE_ALL,
string $sort = AbstractApi::SORT_FULL_NAME,
string $direction = AbstractApi::DIRECTION_DESC): array
{
return $this->getApi()->request($this->getApi()->sprintf('/user/repos?:args',
http_build_query(['type' => $type, 'sort' => $sort, 'direction' => $direction])));
} | php | public function listYourRepositories(string $type = AbstractApi::TYPE_ALL,
string $sort = AbstractApi::SORT_FULL_NAME,
string $direction = AbstractApi::DIRECTION_DESC): array
{
return $this->getApi()->request($this->getApi()->sprintf('/user/repos?:args',
http_build_query(['type' => $type, 'sort' => $sort, 'direction' => $direction])));
} | [
"public",
"function",
"listYourRepositories",
"(",
"string",
"$",
"type",
"=",
"AbstractApi",
"::",
"TYPE_ALL",
",",
"string",
"$",
"sort",
"=",
"AbstractApi",
"::",
"SORT_FULL_NAME",
",",
"string",
"$",
"direction",
"=",
"AbstractApi",
"::",
"DIRECTION_DESC",
"... | List repositories for the authenticated user.
@link https://developer.github.com/v3/repos/#list-your-repositories
@param string $type
@param string $sort
@param string $direction
@return array | [
"List",
"repositories",
"for",
"the",
"authenticated",
"user",
"."
] | cb5044443daf138787a7feb9aa9bf50220a44fd6 | https://github.com/FlexyProject/GitHubAPI/blob/cb5044443daf138787a7feb9aa9bf50220a44fd6/lib/GitHub/Receiver/Repositories.php#L42-L48 |
38,779 | FlexyProject/GitHubAPI | lib/GitHub/Receiver/Repositories.php | Repositories.listOrganizationRepositories | public function listOrganizationRepositories(string $organization, string $type = AbstractApi::TYPE_ALL): array
{
return $this->getApi()->request($this->getApi()->sprintf('/orgs/:org/repos?:args', $organization,
http_build_query(['type' => $type])));
} | php | public function listOrganizationRepositories(string $organization, string $type = AbstractApi::TYPE_ALL): array
{
return $this->getApi()->request($this->getApi()->sprintf('/orgs/:org/repos?:args', $organization,
http_build_query(['type' => $type])));
} | [
"public",
"function",
"listOrganizationRepositories",
"(",
"string",
"$",
"organization",
",",
"string",
"$",
"type",
"=",
"AbstractApi",
"::",
"TYPE_ALL",
")",
":",
"array",
"{",
"return",
"$",
"this",
"->",
"getApi",
"(",
")",
"->",
"request",
"(",
"$",
... | List repositories for the specified org.
@link https://developer.github.com/v3/repos/#list-organization-repositories
@param string $organization
@param string $type
@return array | [
"List",
"repositories",
"for",
"the",
"specified",
"org",
"."
] | cb5044443daf138787a7feb9aa9bf50220a44fd6 | https://github.com/FlexyProject/GitHubAPI/blob/cb5044443daf138787a7feb9aa9bf50220a44fd6/lib/GitHub/Receiver/Repositories.php#L80-L84 |
38,780 | FlexyProject/GitHubAPI | lib/GitHub/Receiver/Repositories.php | Repositories.listPublicRepositories | public function listPublicRepositories(string $since = '1970-01-01'): array
{
return $this->getApi()->request($this->getApi()
->sprintf('/repositories?:arg', http_build_query(['since', $since])));
} | php | public function listPublicRepositories(string $since = '1970-01-01'): array
{
return $this->getApi()->request($this->getApi()
->sprintf('/repositories?:arg', http_build_query(['since', $since])));
} | [
"public",
"function",
"listPublicRepositories",
"(",
"string",
"$",
"since",
"=",
"'1970-01-01'",
")",
":",
"array",
"{",
"return",
"$",
"this",
"->",
"getApi",
"(",
")",
"->",
"request",
"(",
"$",
"this",
"->",
"getApi",
"(",
")",
"->",
"sprintf",
"(",
... | List all public repositories
@link https://developer.github.com/v3/repos/#list-all-public-repositories
@param string $since
@return array | [
"List",
"all",
"public",
"repositories"
] | cb5044443daf138787a7feb9aa9bf50220a44fd6 | https://github.com/FlexyProject/GitHubAPI/blob/cb5044443daf138787a7feb9aa9bf50220a44fd6/lib/GitHub/Receiver/Repositories.php#L95-L99 |
38,781 | FlexyProject/GitHubAPI | lib/GitHub/Receiver/Repositories.php | Repositories.createRepository | public function createRepository(string $name, string $description = '', string $homepage = '',
bool $private = false, bool $hasIssues = true, bool $hasWiki = true,
bool $hasDownloads = true, int $teamId = 0, bool $autoInit = false,
string $gitignoreTemplate = '', string $licenseTemplate = ''): array
{
return $this->getApi()->request(sprintf('/user/repos'), Request::METHOD_POST, [
'name' => $name,
'description' => $description,
'homepage' => $homepage,
'private' => $private,
'has_issues' => $hasIssues,
'has_wiki' => $hasWiki,
'has_downloads' => $hasDownloads,
'team_id' => $teamId,
'auto_init' => $autoInit,
'gitignore_template' => $gitignoreTemplate,
'license_template' => $licenseTemplate
]);
} | php | public function createRepository(string $name, string $description = '', string $homepage = '',
bool $private = false, bool $hasIssues = true, bool $hasWiki = true,
bool $hasDownloads = true, int $teamId = 0, bool $autoInit = false,
string $gitignoreTemplate = '', string $licenseTemplate = ''): array
{
return $this->getApi()->request(sprintf('/user/repos'), Request::METHOD_POST, [
'name' => $name,
'description' => $description,
'homepage' => $homepage,
'private' => $private,
'has_issues' => $hasIssues,
'has_wiki' => $hasWiki,
'has_downloads' => $hasDownloads,
'team_id' => $teamId,
'auto_init' => $autoInit,
'gitignore_template' => $gitignoreTemplate,
'license_template' => $licenseTemplate
]);
} | [
"public",
"function",
"createRepository",
"(",
"string",
"$",
"name",
",",
"string",
"$",
"description",
"=",
"''",
",",
"string",
"$",
"homepage",
"=",
"''",
",",
"bool",
"$",
"private",
"=",
"false",
",",
"bool",
"$",
"hasIssues",
"=",
"true",
",",
"... | Create a new repository for the authenticated user.
@link https://developer.github.com/v3/repos/#create
@param string $name
@param string $description
@param string $homepage
@param bool $private
@param bool $hasIssues
@param bool $hasWiki
@param bool $hasDownloads
@param int $teamId
@param bool $autoInit
@param string $gitignoreTemplate
@param string $licenseTemplate
@return array | [
"Create",
"a",
"new",
"repository",
"for",
"the",
"authenticated",
"user",
"."
] | cb5044443daf138787a7feb9aa9bf50220a44fd6 | https://github.com/FlexyProject/GitHubAPI/blob/cb5044443daf138787a7feb9aa9bf50220a44fd6/lib/GitHub/Receiver/Repositories.php#L120-L138 |
38,782 | FlexyProject/GitHubAPI | lib/GitHub/Receiver/Repositories.php | Repositories.deleteRepository | public function deleteRepository(): array
{
return $this->getApi()->request($this->getApi()
->sprintf('/repos/:owner/:repo', $this->getOwner(), $this->getRepo()),
Request::METHOD_DELETE);
} | php | public function deleteRepository(): array
{
return $this->getApi()->request($this->getApi()
->sprintf('/repos/:owner/:repo', $this->getOwner(), $this->getRepo()),
Request::METHOD_DELETE);
} | [
"public",
"function",
"deleteRepository",
"(",
")",
":",
"array",
"{",
"return",
"$",
"this",
"->",
"getApi",
"(",
")",
"->",
"request",
"(",
"$",
"this",
"->",
"getApi",
"(",
")",
"->",
"sprintf",
"(",
"'/repos/:owner/:repo'",
",",
"$",
"this",
"->",
... | Delete a Repository
@link https://developer.github.com/v3/repos/#delete-a-repository
@return array | [
"Delete",
"a",
"Repository"
] | cb5044443daf138787a7feb9aa9bf50220a44fd6 | https://github.com/FlexyProject/GitHubAPI/blob/cb5044443daf138787a7feb9aa9bf50220a44fd6/lib/GitHub/Receiver/Repositories.php#L315-L320 |
38,783 | FlexyProject/GitHubAPI | lib/GitHub/Receiver/Repositories.php | Repositories.getRepositoryLicenseContent | public function getRepositoryLicenseContent(): array
{
return $this->getApi()->request($this->getApi()->sprintf('/repos/:owner/:repo/license', $this->getOwner(),
$this->getRepo()));
} | php | public function getRepositoryLicenseContent(): array
{
return $this->getApi()->request($this->getApi()->sprintf('/repos/:owner/:repo/license', $this->getOwner(),
$this->getRepo()));
} | [
"public",
"function",
"getRepositoryLicenseContent",
"(",
")",
":",
"array",
"{",
"return",
"$",
"this",
"->",
"getApi",
"(",
")",
"->",
"request",
"(",
"$",
"this",
"->",
"getApi",
"(",
")",
"->",
"sprintf",
"(",
"'/repos/:owner/:repo/license'",
",",
"$",
... | Get the contents of a repository's license
@link https://developer.github.com/v3/licenses/#get-the-contents-of-a-repositorys-license
@return array | [
"Get",
"the",
"contents",
"of",
"a",
"repository",
"s",
"license"
] | cb5044443daf138787a7feb9aa9bf50220a44fd6 | https://github.com/FlexyProject/GitHubAPI/blob/cb5044443daf138787a7feb9aa9bf50220a44fd6/lib/GitHub/Receiver/Repositories.php#L328-L332 |
38,784 | FlexyProject/GitHubAPI | lib/GitHub/Receiver/GitData/Trees.php | Trees.get | public function get(string $sha): array
{
return $this->getApi()->request($this->getApi()->sprintf('/repos/:owner/:repo/git/trees/:sha',
$this->getGitData()->getOwner(), $this->getGitData()->getRepo(), $sha));
} | php | public function get(string $sha): array
{
return $this->getApi()->request($this->getApi()->sprintf('/repos/:owner/:repo/git/trees/:sha',
$this->getGitData()->getOwner(), $this->getGitData()->getRepo(), $sha));
} | [
"public",
"function",
"get",
"(",
"string",
"$",
"sha",
")",
":",
"array",
"{",
"return",
"$",
"this",
"->",
"getApi",
"(",
")",
"->",
"request",
"(",
"$",
"this",
"->",
"getApi",
"(",
")",
"->",
"sprintf",
"(",
"'/repos/:owner/:repo/git/trees/:sha'",
",... | Get a Tree
@link https://developer.github.com/v3/git/trees/#get-a-tree
@param string $sha
@return array
@throws \Exception | [
"Get",
"a",
"Tree"
] | cb5044443daf138787a7feb9aa9bf50220a44fd6 | https://github.com/FlexyProject/GitHubAPI/blob/cb5044443daf138787a7feb9aa9bf50220a44fd6/lib/GitHub/Receiver/GitData/Trees.php#L25-L29 |
38,785 | FlexyProject/GitHubAPI | lib/GitHub/Receiver/GitData/Trees.php | Trees.create | public function create(array $tree, string $base_tree): array
{
return $this->getApi()->request($this->getApi()
->sprintf('/repos/:owner/:repo/git/trees', $this->getGitData()->getOwner(),
$this->getGitData()->getRepo()), Request::METHOD_POST, [
'tree' => $tree,
'base_tree' => $base_tree
]);
} | php | public function create(array $tree, string $base_tree): array
{
return $this->getApi()->request($this->getApi()
->sprintf('/repos/:owner/:repo/git/trees', $this->getGitData()->getOwner(),
$this->getGitData()->getRepo()), Request::METHOD_POST, [
'tree' => $tree,
'base_tree' => $base_tree
]);
} | [
"public",
"function",
"create",
"(",
"array",
"$",
"tree",
",",
"string",
"$",
"base_tree",
")",
":",
"array",
"{",
"return",
"$",
"this",
"->",
"getApi",
"(",
")",
"->",
"request",
"(",
"$",
"this",
"->",
"getApi",
"(",
")",
"->",
"sprintf",
"(",
... | Create a Tree
@link https://developer.github.com/v3/git/trees/#create-a-tree
@param array $tree
@param string $base_tree
@return array
@throws \Exception | [
"Create",
"a",
"Tree"
] | cb5044443daf138787a7feb9aa9bf50220a44fd6 | https://github.com/FlexyProject/GitHubAPI/blob/cb5044443daf138787a7feb9aa9bf50220a44fd6/lib/GitHub/Receiver/GitData/Trees.php#L58-L66 |
38,786 | FlexyProject/GitHubAPI | lib/GitHub/Receiver/Enterprise/Ldap.php | Ldap.updateMappingUser | public function updateMappingUser(string $username): array
{
return $this->getApi()->request($this->getApi()->sprintf('/admin/ldap/user/:username/mapping', $username),
Request::METHOD_PATCH);
} | php | public function updateMappingUser(string $username): array
{
return $this->getApi()->request($this->getApi()->sprintf('/admin/ldap/user/:username/mapping', $username),
Request::METHOD_PATCH);
} | [
"public",
"function",
"updateMappingUser",
"(",
"string",
"$",
"username",
")",
":",
"array",
"{",
"return",
"$",
"this",
"->",
"getApi",
"(",
")",
"->",
"request",
"(",
"$",
"this",
"->",
"getApi",
"(",
")",
"->",
"sprintf",
"(",
"'/admin/ldap/user/:usern... | Update LDAP mapping for a user
@link https://developer.github.com/v3/enterprise/ldap/#update-ldap-mapping-for-a-user
@param string $username
@return array
@throws Exception | [
"Update",
"LDAP",
"mapping",
"for",
"a",
"user"
] | cb5044443daf138787a7feb9aa9bf50220a44fd6 | https://github.com/FlexyProject/GitHubAPI/blob/cb5044443daf138787a7feb9aa9bf50220a44fd6/lib/GitHub/Receiver/Enterprise/Ldap.php#L28-L32 |
38,787 | FlexyProject/GitHubAPI | lib/GitHub/Receiver/Enterprise/Ldap.php | Ldap.syncMappingUser | public function syncMappingUser(int $userId): array
{
return $this->getApi()->request($this->getApi()->sprintf('/admin/ldap/user/:user_id/sync', (string)$userId),
Request::METHOD_POST);
} | php | public function syncMappingUser(int $userId): array
{
return $this->getApi()->request($this->getApi()->sprintf('/admin/ldap/user/:user_id/sync', (string)$userId),
Request::METHOD_POST);
} | [
"public",
"function",
"syncMappingUser",
"(",
"int",
"$",
"userId",
")",
":",
"array",
"{",
"return",
"$",
"this",
"->",
"getApi",
"(",
")",
"->",
"request",
"(",
"$",
"this",
"->",
"getApi",
"(",
")",
"->",
"sprintf",
"(",
"'/admin/ldap/user/:user_id/sync... | Sync LDAP mapping for a user
@link https://developer.github.com/v3/enterprise/ldap/#sync-ldap-mapping-for-a-user
@param int $userId
@return array
@throws Exception | [
"Sync",
"LDAP",
"mapping",
"for",
"a",
"user"
] | cb5044443daf138787a7feb9aa9bf50220a44fd6 | https://github.com/FlexyProject/GitHubAPI/blob/cb5044443daf138787a7feb9aa9bf50220a44fd6/lib/GitHub/Receiver/Enterprise/Ldap.php#L44-L48 |
38,788 | FlexyProject/GitHubAPI | lib/GitHub/Receiver/Enterprise/Ldap.php | Ldap.updateMappingTeam | public function updateMappingTeam(int $teamId): array
{
return $this->getApi()->request($this->getApi()->sprintf('/admin/ldap/teams/:team_id/mapping', (string)$teamId),
Request::METHOD_PATCH);
} | php | public function updateMappingTeam(int $teamId): array
{
return $this->getApi()->request($this->getApi()->sprintf('/admin/ldap/teams/:team_id/mapping', (string)$teamId),
Request::METHOD_PATCH);
} | [
"public",
"function",
"updateMappingTeam",
"(",
"int",
"$",
"teamId",
")",
":",
"array",
"{",
"return",
"$",
"this",
"->",
"getApi",
"(",
")",
"->",
"request",
"(",
"$",
"this",
"->",
"getApi",
"(",
")",
"->",
"sprintf",
"(",
"'/admin/ldap/teams/:team_id/m... | Update LDAP mapping for a team
@link https://developer.github.com/v3/enterprise/ldap/#update-ldap-mapping-for-a-team
@param int $teamId
@return array
@throws Exception | [
"Update",
"LDAP",
"mapping",
"for",
"a",
"team"
] | cb5044443daf138787a7feb9aa9bf50220a44fd6 | https://github.com/FlexyProject/GitHubAPI/blob/cb5044443daf138787a7feb9aa9bf50220a44fd6/lib/GitHub/Receiver/Enterprise/Ldap.php#L60-L64 |
38,789 | FlexyProject/GitHubAPI | lib/GitHub/Receiver/Enterprise/Ldap.php | Ldap.syncMappingTeam | public function syncMappingTeam(int $teamId): array
{
return $this->getApi()->request($this->getApi()->sprintf('/admin/ldap/teams/:team_id/sync', (string)$teamId),
Request::METHOD_POST);
} | php | public function syncMappingTeam(int $teamId): array
{
return $this->getApi()->request($this->getApi()->sprintf('/admin/ldap/teams/:team_id/sync', (string)$teamId),
Request::METHOD_POST);
} | [
"public",
"function",
"syncMappingTeam",
"(",
"int",
"$",
"teamId",
")",
":",
"array",
"{",
"return",
"$",
"this",
"->",
"getApi",
"(",
")",
"->",
"request",
"(",
"$",
"this",
"->",
"getApi",
"(",
")",
"->",
"sprintf",
"(",
"'/admin/ldap/teams/:team_id/syn... | Sync LDAP mapping for a team
@link https://developer.github.com/v3/enterprise/ldap/#sync-ldap-mapping-for-a-team
@param int $teamId
@return array
@throws Exception | [
"Sync",
"LDAP",
"mapping",
"for",
"a",
"team"
] | cb5044443daf138787a7feb9aa9bf50220a44fd6 | https://github.com/FlexyProject/GitHubAPI/blob/cb5044443daf138787a7feb9aa9bf50220a44fd6/lib/GitHub/Receiver/Enterprise/Ldap.php#L76-L80 |
38,790 | FlexyProject/GitHubAPI | lib/GitHub/Receiver/Gists.php | Gists.listGists | public function listGists(string $username = null, string $since = '1970-01-01'): array
{
$url = '/gists';
if (null !== $username) {
$url = '/users/:username/gists';
}
return $this->getApi()->request($this->getApi()->sprintf(':url?:arg', $url, $username,
http_build_query(['since' => (new DateTime($since))->format(DateTime::ATOM)])));
} | php | public function listGists(string $username = null, string $since = '1970-01-01'): array
{
$url = '/gists';
if (null !== $username) {
$url = '/users/:username/gists';
}
return $this->getApi()->request($this->getApi()->sprintf(':url?:arg', $url, $username,
http_build_query(['since' => (new DateTime($since))->format(DateTime::ATOM)])));
} | [
"public",
"function",
"listGists",
"(",
"string",
"$",
"username",
"=",
"null",
",",
"string",
"$",
"since",
"=",
"'1970-01-01'",
")",
":",
"array",
"{",
"$",
"url",
"=",
"'/gists'",
";",
"if",
"(",
"null",
"!==",
"$",
"username",
")",
"{",
"$",
"url... | List a user's gists
@link https://developer.github.com/v3/gists/#list-a-users-gists
@param string $username
@param string $since
@return array | [
"List",
"a",
"user",
"s",
"gists"
] | cb5044443daf138787a7feb9aa9bf50220a44fd6 | https://github.com/FlexyProject/GitHubAPI/blob/cb5044443daf138787a7feb9aa9bf50220a44fd6/lib/GitHub/Receiver/Gists.php#L29-L38 |
38,791 | FlexyProject/GitHubAPI | lib/GitHub/Receiver/Gists.php | Gists.getGist | public function getGist(string $id): array
{
return $this->getApi()->request($this->getApi()->sprintf('/gists/:id', $id));
} | php | public function getGist(string $id): array
{
return $this->getApi()->request($this->getApi()->sprintf('/gists/:id', $id));
} | [
"public",
"function",
"getGist",
"(",
"string",
"$",
"id",
")",
":",
"array",
"{",
"return",
"$",
"this",
"->",
"getApi",
"(",
")",
"->",
"request",
"(",
"$",
"this",
"->",
"getApi",
"(",
")",
"->",
"sprintf",
"(",
"'/gists/:id'",
",",
"$",
"id",
"... | Get a single gist
@link https://developer.github.com/v3/gists/#get-a-single-gist
@param string $id
@return array | [
"Get",
"a",
"single",
"gist"
] | cb5044443daf138787a7feb9aa9bf50220a44fd6 | https://github.com/FlexyProject/GitHubAPI/blob/cb5044443daf138787a7feb9aa9bf50220a44fd6/lib/GitHub/Receiver/Gists.php#L79-L82 |
38,792 | FlexyProject/GitHubAPI | lib/GitHub/Receiver/Gists.php | Gists.getGistRevision | public function getGistRevision(string $id, string $sha): array
{
return $this->getApi()->request($this->getApi()->sprintf('/gists/:id/:sha', $id, $sha));
} | php | public function getGistRevision(string $id, string $sha): array
{
return $this->getApi()->request($this->getApi()->sprintf('/gists/:id/:sha', $id, $sha));
} | [
"public",
"function",
"getGistRevision",
"(",
"string",
"$",
"id",
",",
"string",
"$",
"sha",
")",
":",
"array",
"{",
"return",
"$",
"this",
"->",
"getApi",
"(",
")",
"->",
"request",
"(",
"$",
"this",
"->",
"getApi",
"(",
")",
"->",
"sprintf",
"(",
... | Get a specific revision of a gist
@link https://developer.github.com/v3/gists/#get-a-specific-revision-of-a-gist
@param string $id
@param string $sha
@return array
@throws \Exception | [
"Get",
"a",
"specific",
"revision",
"of",
"a",
"gist"
] | cb5044443daf138787a7feb9aa9bf50220a44fd6 | https://github.com/FlexyProject/GitHubAPI/blob/cb5044443daf138787a7feb9aa9bf50220a44fd6/lib/GitHub/Receiver/Gists.php#L95-L98 |
38,793 | FlexyProject/GitHubAPI | lib/GitHub/Receiver/Gists.php | Gists.editGist | public function editGist(string $id, string $description = '', array $files = [], string $content = '',
string $filename = ''): array
{
return $this->getApi()->request($this->getApi()->sprintf('/gists/:id', $id), Request::METHOD_PATCH, [
'description' => $description,
'files' => $files,
'content' => $content,
'filename' => $filename
]);
} | php | public function editGist(string $id, string $description = '', array $files = [], string $content = '',
string $filename = ''): array
{
return $this->getApi()->request($this->getApi()->sprintf('/gists/:id', $id), Request::METHOD_PATCH, [
'description' => $description,
'files' => $files,
'content' => $content,
'filename' => $filename
]);
} | [
"public",
"function",
"editGist",
"(",
"string",
"$",
"id",
",",
"string",
"$",
"description",
"=",
"''",
",",
"array",
"$",
"files",
"=",
"[",
"]",
",",
"string",
"$",
"content",
"=",
"''",
",",
"string",
"$",
"filename",
"=",
"''",
")",
":",
"arr... | Edit a gist
@link https://developer.github.com/v3/gists/#edit-a-gist
@param string $id
@param string $description
@param array $files
@param string $content
@param string $filename
@return array | [
"Edit",
"a",
"gist"
] | cb5044443daf138787a7feb9aa9bf50220a44fd6 | https://github.com/FlexyProject/GitHubAPI/blob/cb5044443daf138787a7feb9aa9bf50220a44fd6/lib/GitHub/Receiver/Gists.php#L133-L142 |
38,794 | FlexyProject/GitHubAPI | lib/GitHub/Receiver/Gists.php | Gists.listGistsCommits | public function listGistsCommits(string $id): array
{
return $this->getApi()->request($this->getApi()->sprintf('/gists/:id/commits', $id));
} | php | public function listGistsCommits(string $id): array
{
return $this->getApi()->request($this->getApi()->sprintf('/gists/:id/commits', $id));
} | [
"public",
"function",
"listGistsCommits",
"(",
"string",
"$",
"id",
")",
":",
"array",
"{",
"return",
"$",
"this",
"->",
"getApi",
"(",
")",
"->",
"request",
"(",
"$",
"this",
"->",
"getApi",
"(",
")",
"->",
"sprintf",
"(",
"'/gists/:id/commits'",
",",
... | List gist commits
@link https://developer.github.com/v3/gists/#list-gist-commits
@param string $id
@return array | [
"List",
"gist",
"commits"
] | cb5044443daf138787a7feb9aa9bf50220a44fd6 | https://github.com/FlexyProject/GitHubAPI/blob/cb5044443daf138787a7feb9aa9bf50220a44fd6/lib/GitHub/Receiver/Gists.php#L153-L156 |
38,795 | FlexyProject/GitHubAPI | lib/GitHub/Receiver/Gists.php | Gists.starGist | public function starGist(string $id): bool
{
$this->getApi()->request($this->getApi()->sprintf('/gists/:id/star', $id), Request::METHOD_PUT);
if ($this->getApi()->getHeaders()['Status'] == '204 No Content') {
return true;
}
return false;
} | php | public function starGist(string $id): bool
{
$this->getApi()->request($this->getApi()->sprintf('/gists/:id/star', $id), Request::METHOD_PUT);
if ($this->getApi()->getHeaders()['Status'] == '204 No Content') {
return true;
}
return false;
} | [
"public",
"function",
"starGist",
"(",
"string",
"$",
"id",
")",
":",
"bool",
"{",
"$",
"this",
"->",
"getApi",
"(",
")",
"->",
"request",
"(",
"$",
"this",
"->",
"getApi",
"(",
")",
"->",
"sprintf",
"(",
"'/gists/:id/star'",
",",
"$",
"id",
")",
"... | Star a gist
@link https://developer.github.com/v3/gists/#star-a-gist
@param string $id
@return bool | [
"Star",
"a",
"gist"
] | cb5044443daf138787a7feb9aa9bf50220a44fd6 | https://github.com/FlexyProject/GitHubAPI/blob/cb5044443daf138787a7feb9aa9bf50220a44fd6/lib/GitHub/Receiver/Gists.php#L167-L176 |
38,796 | FlexyProject/GitHubAPI | lib/GitHub/Receiver/Gists.php | Gists.checkGistIsStarred | public function checkGistIsStarred(string $id): bool
{
$this->getApi()->request($this->getApi()->sprintf('/gists/:id/star', $id));
if ($this->getApi()->getHeaders()['Status'] == '204 No Content') {
return true;
}
return false;
} | php | public function checkGistIsStarred(string $id): bool
{
$this->getApi()->request($this->getApi()->sprintf('/gists/:id/star', $id));
if ($this->getApi()->getHeaders()['Status'] == '204 No Content') {
return true;
}
return false;
} | [
"public",
"function",
"checkGistIsStarred",
"(",
"string",
"$",
"id",
")",
":",
"bool",
"{",
"$",
"this",
"->",
"getApi",
"(",
")",
"->",
"request",
"(",
"$",
"this",
"->",
"getApi",
"(",
")",
"->",
"sprintf",
"(",
"'/gists/:id/star'",
",",
"$",
"id",
... | Check if a gist is starred
@link https://developer.github.com/v3/gists/#check-if-a-gist-is-starred
@param string $id
@return bool | [
"Check",
"if",
"a",
"gist",
"is",
"starred"
] | cb5044443daf138787a7feb9aa9bf50220a44fd6 | https://github.com/FlexyProject/GitHubAPI/blob/cb5044443daf138787a7feb9aa9bf50220a44fd6/lib/GitHub/Receiver/Gists.php#L207-L216 |
38,797 | FlexyProject/GitHubAPI | lib/GitHub/Receiver/Gists.php | Gists.forkGist | public function forkGist(string $id): array
{
return $this->getApi()->request($this->getApi()->sprintf('/gists/:id/forks', $id), Request::METHOD_POST);
} | php | public function forkGist(string $id): array
{
return $this->getApi()->request($this->getApi()->sprintf('/gists/:id/forks', $id), Request::METHOD_POST);
} | [
"public",
"function",
"forkGist",
"(",
"string",
"$",
"id",
")",
":",
"array",
"{",
"return",
"$",
"this",
"->",
"getApi",
"(",
")",
"->",
"request",
"(",
"$",
"this",
"->",
"getApi",
"(",
")",
"->",
"sprintf",
"(",
"'/gists/:id/forks'",
",",
"$",
"i... | Fork a gist
@link https://developer.github.com/v3/gists/#fork-a-gist
@param string $id
@return array | [
"Fork",
"a",
"gist"
] | cb5044443daf138787a7feb9aa9bf50220a44fd6 | https://github.com/FlexyProject/GitHubAPI/blob/cb5044443daf138787a7feb9aa9bf50220a44fd6/lib/GitHub/Receiver/Gists.php#L227-L230 |
38,798 | FlexyProject/GitHubAPI | lib/GitHub/Receiver/Gists.php | Gists.listGistForks | public function listGistForks(string $id): array
{
return $this->getApi()->request($this->getApi()->sprintf('/gists/:id/forks', $id));
} | php | public function listGistForks(string $id): array
{
return $this->getApi()->request($this->getApi()->sprintf('/gists/:id/forks', $id));
} | [
"public",
"function",
"listGistForks",
"(",
"string",
"$",
"id",
")",
":",
"array",
"{",
"return",
"$",
"this",
"->",
"getApi",
"(",
")",
"->",
"request",
"(",
"$",
"this",
"->",
"getApi",
"(",
")",
"->",
"sprintf",
"(",
"'/gists/:id/forks'",
",",
"$",... | List gist forks
@link https://developer.github.com/v3/gists/#list-gist-forks
@param string $id
@return array | [
"List",
"gist",
"forks"
] | cb5044443daf138787a7feb9aa9bf50220a44fd6 | https://github.com/FlexyProject/GitHubAPI/blob/cb5044443daf138787a7feb9aa9bf50220a44fd6/lib/GitHub/Receiver/Gists.php#L241-L244 |
38,799 | FlexyProject/GitHubAPI | lib/GitHub/Receiver/Organizations/Hooks.php | Hooks.deleteHook | public function deleteHook(string $org, int $id): bool
{
$this->getApi()->request($this->getApi()->sprintf('/orgs/:org/hooks/:id', $org, (string)$id),
Request::METHOD_DELETE);
if ($this->getApi()->getHeaders()['Status'] == '204 No Content') {
return true;
}
return false;
} | php | public function deleteHook(string $org, int $id): bool
{
$this->getApi()->request($this->getApi()->sprintf('/orgs/:org/hooks/:id', $org, (string)$id),
Request::METHOD_DELETE);
if ($this->getApi()->getHeaders()['Status'] == '204 No Content') {
return true;
}
return false;
} | [
"public",
"function",
"deleteHook",
"(",
"string",
"$",
"org",
",",
"int",
"$",
"id",
")",
":",
"bool",
"{",
"$",
"this",
"->",
"getApi",
"(",
")",
"->",
"request",
"(",
"$",
"this",
"->",
"getApi",
"(",
")",
"->",
"sprintf",
"(",
"'/orgs/:org/hooks/... | Delete a hook
@link https://developer.github.com/v3/orgs/hooks/#delete-a-hook
@param string $org
@param int $id
@return bool
@throws \Exception | [
"Delete",
"a",
"hook"
] | cb5044443daf138787a7feb9aa9bf50220a44fd6 | https://github.com/FlexyProject/GitHubAPI/blob/cb5044443daf138787a7feb9aa9bf50220a44fd6/lib/GitHub/Receiver/Organizations/Hooks.php#L130-L140 |
Subsets and Splits
Yii Code Samples
Gathers all records from test, train, and validation sets that contain the word 'yii', providing a basic filtered view of the dataset relevant to Yii-related content.