Skip to content

shopiqo/gitea-php-api-client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

REST client for Gitea

This documentation describes the Gitea API.

Installation & Usage

Requirements

PHP 7.2 and later.

Composer

To install the bindings via Composer, add the following to composer.json:

{
  "repositories": [
    {
      "type": "vcs",
      "url": "https://github.com/efsa-io/gitea-php-api-client.git"
    }
  ],
  "require": {
    "efsa-io/gitea-php-api-client": "*@dev"
  }
}

Then run composer install

Manual Installation

Download the files and include autoload.php:

<?php
require_once('/path/to/REST client for Gitea/vendor/autoload.php');

Getting Started

Please follow the installation procedure and then run the following:

<?php
require_once(__DIR__ . '/vendor/autoload.php');



// Configure API key authorization: AccessToken
$config = Efsa\Client\Gitea\Configuration::getDefaultConfiguration()->setApiKey('access_token', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Efsa\Client\Gitea\Configuration::getDefaultConfiguration()->setApiKeyPrefix('access_token', 'Bearer');

// Configure API key authorization: AuthorizationHeaderToken
$config = Efsa\Client\Gitea\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Efsa\Client\Gitea\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');

// Configure HTTP basic authorization: BasicAuth
$config = Efsa\Client\Gitea\Configuration::getDefaultConfiguration()
              ->setUsername('YOUR_USERNAME')
              ->setPassword('YOUR_PASSWORD');

// Configure API key authorization: SudoHeader
$config = Efsa\Client\Gitea\Configuration::getDefaultConfiguration()->setApiKey('Sudo', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Efsa\Client\Gitea\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Sudo', 'Bearer');

// Configure API key authorization: SudoParam
$config = Efsa\Client\Gitea\Configuration::getDefaultConfiguration()->setApiKey('sudo', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Efsa\Client\Gitea\Configuration::getDefaultConfiguration()->setApiKeyPrefix('sudo', 'Bearer');

// Configure API key authorization: TOTPHeader
$config = Efsa\Client\Gitea\Configuration::getDefaultConfiguration()->setApiKey('X-GITEA-OTP', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Efsa\Client\Gitea\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-GITEA-OTP', 'Bearer');

// Configure API key authorization: Token
$config = Efsa\Client\Gitea\Configuration::getDefaultConfiguration()->setApiKey('token', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Efsa\Client\Gitea\Configuration::getDefaultConfiguration()->setApiKeyPrefix('token', 'Bearer');


$apiInstance = new Efsa\Client\Gitea\Api\AdminApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$owner = 'owner_example'; // string | owner of the repo
$repo = 'repo_example'; // string | name of the repo

try {
    $apiInstance->adminAdoptRepository($owner, $repo);
} catch (Exception $e) {
    echo 'Exception when calling AdminApi->adminAdoptRepository: ', $e->getMessage(), PHP_EOL;
}

API Endpoints

All URIs are relative to http://localhost/api/v1

Class Method HTTP request Description
AdminApi adminAdoptRepository POST /admin/unadopted/{owner}/{repo} Adopt unadopted files as a repository
AdminApi adminCreateOrg POST /admin/users/{username}/orgs Create an organization
AdminApi adminCreatePublicKey POST /admin/users/{username}/keys Add a public key on behalf of a user
AdminApi adminCreateRepo POST /admin/users/{username}/repos Create a repository on behalf of a user
AdminApi adminCreateUser POST /admin/users Create a user
AdminApi adminCronList GET /admin/cron List cron tasks
AdminApi adminCronRun POST /admin/cron/{task} Run cron task
AdminApi adminDeleteUnadoptedRepository DELETE /admin/unadopted/{owner}/{repo} Delete unadopted files
AdminApi adminDeleteUser DELETE /admin/users/{username} Delete a user
AdminApi adminDeleteUserPublicKey DELETE /admin/users/{username}/keys/{id} Delete a user's public key
AdminApi adminEditUser PATCH /admin/users/{username} Edit an existing user
AdminApi adminGetAllOrgs GET /admin/orgs List all organizations
AdminApi adminGetAllUsers GET /admin/users List all users
AdminApi adminUnadoptedList GET /admin/unadopted List unadopted repositories
IssueApi issueAddLabel POST /repos/{owner}/{repo}/issues/{index}/labels Add a label to an issue
IssueApi issueAddSubscription PUT /repos/{owner}/{repo}/issues/{index}/subscriptions/{user} Subscribe user to issue
IssueApi issueAddTime POST /repos/{owner}/{repo}/issues/{index}/times Add tracked time to a issue
IssueApi issueCheckSubscription GET /repos/{owner}/{repo}/issues/{index}/subscriptions/check Check if user is subscribed to an issue
IssueApi issueClearLabels DELETE /repos/{owner}/{repo}/issues/{index}/labels Remove all labels from an issue
IssueApi issueCreateComment POST /repos/{owner}/{repo}/issues/{index}/comments Add a comment to an issue
IssueApi issueCreateIssue POST /repos/{owner}/{repo}/issues Create an issue. If using deadline only the date will be taken into account, and time of day ignored.
IssueApi issueCreateLabel POST /repos/{owner}/{repo}/labels Create a label
IssueApi issueCreateMilestone POST /repos/{owner}/{repo}/milestones Create a milestone
IssueApi issueDelete DELETE /repos/{owner}/{repo}/issues/{index} Delete an issue
IssueApi issueDeleteComment DELETE /repos/{owner}/{repo}/issues/comments/{id} Delete a comment
IssueApi issueDeleteCommentDeprecated DELETE /repos/{owner}/{repo}/issues/{index}/comments/{id} Delete a comment
IssueApi issueDeleteCommentReaction DELETE /repos/{owner}/{repo}/issues/comments/{id}/reactions Remove a reaction from a comment of an issue
IssueApi issueDeleteIssueReaction DELETE /repos/{owner}/{repo}/issues/{index}/reactions Remove a reaction from an issue
IssueApi issueDeleteLabel DELETE /repos/{owner}/{repo}/labels/{id} Delete a label
IssueApi issueDeleteMilestone DELETE /repos/{owner}/{repo}/milestones/{id} Delete a milestone
IssueApi issueDeleteStopWatch DELETE /repos/{owner}/{repo}/issues/{index}/stopwatch/delete Delete an issue's existing stopwatch.
IssueApi issueDeleteSubscription DELETE /repos/{owner}/{repo}/issues/{index}/subscriptions/{user} Unsubscribe user from issue
IssueApi issueDeleteTime DELETE /repos/{owner}/{repo}/issues/{index}/times/{id} Delete specific tracked time
IssueApi issueEditComment PATCH /repos/{owner}/{repo}/issues/comments/{id} Edit a comment
IssueApi issueEditCommentDeprecated PATCH /repos/{owner}/{repo}/issues/{index}/comments/{id} Edit a comment
IssueApi issueEditIssue PATCH /repos/{owner}/{repo}/issues/{index} Edit an issue. If using deadline only the date will be taken into account, and time of day ignored.
IssueApi issueEditIssueDeadline POST /repos/{owner}/{repo}/issues/{index}/deadline Set an issue deadline. If set to null, the deadline is deleted. If using deadline only the date will be taken into account, and time of day ignored.
IssueApi issueEditLabel PATCH /repos/{owner}/{repo}/labels/{id} Update a label
IssueApi issueEditMilestone PATCH /repos/{owner}/{repo}/milestones/{id} Update a milestone
IssueApi issueGetComment GET /repos/{owner}/{repo}/issues/comments/{id} Get a comment
IssueApi issueGetCommentReactions GET /repos/{owner}/{repo}/issues/comments/{id}/reactions Get a list of reactions from a comment of an issue
IssueApi issueGetComments GET /repos/{owner}/{repo}/issues/{index}/comments List all comments on an issue
IssueApi issueGetCommentsAndTimeline GET /repos/{owner}/{repo}/issues/{index}/timeline List all comments and events on an issue
IssueApi issueGetIssue GET /repos/{owner}/{repo}/issues/{index} Get an issue
IssueApi issueGetIssueReactions GET /repos/{owner}/{repo}/issues/{index}/reactions Get a list reactions of an issue
IssueApi issueGetLabel GET /repos/{owner}/{repo}/labels/{id} Get a single label
IssueApi issueGetLabels GET /repos/{owner}/{repo}/issues/{index}/labels Get an issue's labels
IssueApi issueGetMilestone GET /repos/{owner}/{repo}/milestones/{id} Get a milestone
IssueApi issueGetMilestonesList GET /repos/{owner}/{repo}/milestones Get all of a repository's opened milestones
IssueApi issueGetRepoComments GET /repos/{owner}/{repo}/issues/comments List all comments in a repository
IssueApi issueListIssues GET /repos/{owner}/{repo}/issues List a repository's issues
IssueApi issueListLabels GET /repos/{owner}/{repo}/labels Get all of a repository's labels
IssueApi issuePostCommentReaction POST /repos/{owner}/{repo}/issues/comments/{id}/reactions Add a reaction to a comment of an issue
IssueApi issuePostIssueReaction POST /repos/{owner}/{repo}/issues/{index}/reactions Add a reaction to an issue
IssueApi issueRemoveLabel DELETE /repos/{owner}/{repo}/issues/{index}/labels/{id} Remove a label from an issue
IssueApi issueReplaceLabels PUT /repos/{owner}/{repo}/issues/{index}/labels Replace an issue's labels
IssueApi issueResetTime DELETE /repos/{owner}/{repo}/issues/{index}/times Reset a tracked time of an issue
IssueApi issueSearchIssues GET /repos/issues/search Search for issues across the repositories that the user has access to
IssueApi issueStartStopWatch POST /repos/{owner}/{repo}/issues/{index}/stopwatch/start Start stopwatch on an issue.
IssueApi issueStopStopWatch POST /repos/{owner}/{repo}/issues/{index}/stopwatch/stop Stop an issue's existing stopwatch.
IssueApi issueSubscriptions GET /repos/{owner}/{repo}/issues/{index}/subscriptions Get users who subscribed on an issue.
IssueApi issueTrackedTimes GET /repos/{owner}/{repo}/issues/{index}/times List an issue's tracked times
MiscellaneousApi getNodeInfo GET /nodeinfo Returns the nodeinfo of the Gitea application
MiscellaneousApi getSigningKey GET /signing-key.gpg Get default signing-key.gpg
MiscellaneousApi getVersion GET /version Returns the version of the Gitea application
MiscellaneousApi renderMarkdown POST /markdown Render a markdown document as HTML
MiscellaneousApi renderMarkdownRaw POST /markdown/raw Render raw markdown as HTML
NotificationApi notifyGetList GET /notifications List users's notification threads
NotificationApi notifyGetRepoList GET /repos/{owner}/{repo}/notifications List users's notification threads on a specific repo
NotificationApi notifyGetThread GET /notifications/threads/{id} Get notification thread by ID
NotificationApi notifyNewAvailable GET /notifications/new Check if unread notifications exist
NotificationApi notifyReadList PUT /notifications Mark notification threads as read, pinned or unread
NotificationApi notifyReadRepoList PUT /repos/{owner}/{repo}/notifications Mark notification threads as read, pinned or unread on a specific repo
NotificationApi notifyReadThread PATCH /notifications/threads/{id} Mark notification thread as read by ID
OrganizationApi createOrgRepo POST /orgs/{org}/repos Create a repository in an organization
OrganizationApi createOrgRepoDeprecated POST /org/{org}/repos Create a repository in an organization
OrganizationApi orgAddTeamMember PUT /teams/{id}/members/{username} Add a team member
OrganizationApi orgAddTeamRepository PUT /teams/{id}/repos/{org}/{repo} Add a repository to a team
OrganizationApi orgConcealMember DELETE /orgs/{org}/public_members/{username} Conceal a user's membership
OrganizationApi orgCreate POST /orgs Create an organization
OrganizationApi orgCreateHook POST /orgs/{org}/hooks/ Create a hook
OrganizationApi orgCreateLabel POST /orgs/{org}/labels Create a label for an organization
OrganizationApi orgCreateTeam POST /orgs/{org}/teams Create a team
OrganizationApi orgDelete DELETE /orgs/{org} Delete an organization
OrganizationApi orgDeleteHook DELETE /orgs/{org}/hooks/{id} Delete a hook
OrganizationApi orgDeleteLabel DELETE /orgs/{org}/labels/{id} Delete a label
OrganizationApi orgDeleteMember DELETE /orgs/{org}/members/{username} Remove a member from an organization
OrganizationApi orgDeleteTeam DELETE /teams/{id} Delete a team
OrganizationApi orgEdit PATCH /orgs/{org} Edit an organization
OrganizationApi orgEditHook PATCH /orgs/{org}/hooks/{id} Update a hook
OrganizationApi orgEditLabel PATCH /orgs/{org}/labels/{id} Update a label
OrganizationApi orgEditTeam PATCH /teams/{id} Edit a team
OrganizationApi orgGet GET /orgs/{org} Get an organization
OrganizationApi orgGetAll GET /orgs Get list of organizations
OrganizationApi orgGetHook GET /orgs/{org}/hooks/{id} Get a hook
OrganizationApi orgGetLabel GET /orgs/{org}/labels/{id} Get a single label
OrganizationApi orgGetTeam GET /teams/{id} Get a team
OrganizationApi orgGetUserPermissions GET /users/{username}/orgs/{org}/permissions Get user permissions in organization
OrganizationApi orgIsMember GET /orgs/{org}/members/{username} Check if a user is a member of an organization
OrganizationApi orgIsPublicMember GET /orgs/{org}/public_members/{username} Check if a user is a public member of an organization
OrganizationApi orgListCurrentUserOrgs GET /user/orgs List the current user's organizations
OrganizationApi orgListHooks GET /orgs/{org}/hooks List an organization's webhooks
OrganizationApi orgListLabels GET /orgs/{org}/labels List an organization's labels
OrganizationApi orgListMembers GET /orgs/{org}/members List an organization's members
OrganizationApi orgListPublicMembers GET /orgs/{org}/public_members List an organization's public members
OrganizationApi orgListRepos GET /orgs/{org}/repos List an organization's repos
OrganizationApi orgListTeamMember GET /teams/{id}/members/{username} List a particular member of team
OrganizationApi orgListTeamMembers GET /teams/{id}/members List a team's members
OrganizationApi orgListTeamRepos GET /teams/{id}/repos List a team's repos
OrganizationApi orgListTeams GET /orgs/{org}/teams List an organization's teams
OrganizationApi orgListUserOrgs GET /users/{username}/orgs List a user's organizations
OrganizationApi orgPublicizeMember PUT /orgs/{org}/public_members/{username} Publicize a user's membership
OrganizationApi orgRemoveTeamMember DELETE /teams/{id}/members/{username} Remove a team member
OrganizationApi orgRemoveTeamRepository DELETE /teams/{id}/repos/{org}/{repo} Remove a repository from a team
OrganizationApi teamSearch GET /orgs/{org}/teams/search Search for teams within an organization
RepositoryApi acceptRepoTransfer POST /repos/{owner}/{repo}/transfer/accept Accept a repo transfer
RepositoryApi createCurrentUserRepo POST /user/repos Create a repository
RepositoryApi createFork POST /repos/{owner}/{repo}/forks Fork a repository
RepositoryApi generateRepo POST /repos/{template_owner}/{template_repo}/generate Create a repository using a template
RepositoryApi getAnnotatedTag GET /repos/{owner}/{repo}/git/tags/{sha} Gets the tag object of an annotated tag (not lightweight tags)
RepositoryApi getBlob GET /repos/{owner}/{repo}/git/blobs/{sha} Gets the blob of a repository.
RepositoryApi getTree GET /repos/{owner}/{repo}/git/trees/{sha} Gets the tree of a repository.
RepositoryApi listForks GET /repos/{owner}/{repo}/forks List a repository's forks
RepositoryApi rejectRepoTransfer POST /repos/{owner}/{repo}/transfer/reject Reject a repo transfer
RepositoryApi repoAddCollaborator PUT /repos/{owner}/{repo}/collaborators/{collaborator} Add a collaborator to a repository
RepositoryApi repoAddTeam PUT /repos/{owner}/{repo}/teams/{team} Add a team to a repository
RepositoryApi repoAddTopic PUT /repos/{owner}/{repo}/topics/{topic} Add a topic to a repository
RepositoryApi repoApplyDiffPatch POST /repos/{owner}/{repo}/diffpatch Apply diff patch to repository
RepositoryApi repoCheckCollaborator GET /repos/{owner}/{repo}/collaborators/{collaborator} Check if a user is a collaborator of a repository
RepositoryApi repoCheckTeam GET /repos/{owner}/{repo}/teams/{team} Check if a team is assigned to a repository
RepositoryApi repoCreateBranch POST /repos/{owner}/{repo}/branches Create a branch
RepositoryApi repoCreateBranchProtection POST /repos/{owner}/{repo}/branch_protections Create a branch protections for a repository
RepositoryApi repoCreateFile POST /repos/{owner}/{repo}/contents/{filepath} Create a file in a repository
RepositoryApi repoCreateHook POST /repos/{owner}/{repo}/hooks Create a hook
RepositoryApi repoCreateKey POST /repos/{owner}/{repo}/keys Add a key to a repository
RepositoryApi repoCreatePullRequest POST /repos/{owner}/{repo}/pulls Create a pull request
RepositoryApi repoCreatePullReview POST /repos/{owner}/{repo}/pulls/{index}/reviews Create a review to an pull request
RepositoryApi repoCreatePullReviewRequests POST /repos/{owner}/{repo}/pulls/{index}/requested_reviewers create review requests for a pull request
RepositoryApi repoCreateRelease POST /repos/{owner}/{repo}/releases Create a release
RepositoryApi repoCreateReleaseAttachment POST /repos/{owner}/{repo}/releases/{id}/assets Create a release attachment
RepositoryApi repoCreateStatus POST /repos/{owner}/{repo}/statuses/{sha} Create a commit status
RepositoryApi repoCreateTag POST /repos/{owner}/{repo}/tags Create a new git tag in a repository
RepositoryApi repoCreateWikiPage POST /repos/{owner}/{repo}/wiki/new Create a wiki page
RepositoryApi repoDelete DELETE /repos/{owner}/{repo} Delete a repository
RepositoryApi repoDeleteBranch DELETE /repos/{owner}/{repo}/branches/{branch} Delete a specific branch from a repository
RepositoryApi repoDeleteBranchProtection DELETE /repos/{owner}/{repo}/branch_protections/{name} Delete a specific branch protection for the repository
RepositoryApi repoDeleteCollaborator DELETE /repos/{owner}/{repo}/collaborators/{collaborator} Delete a collaborator from a repository
RepositoryApi repoDeleteFile DELETE /repos/{owner}/{repo}/contents/{filepath} Delete a file in a repository
RepositoryApi repoDeleteGitHook DELETE /repos/{owner}/{repo}/hooks/git/{id} Delete a Git hook in a repository
RepositoryApi repoDeleteHook DELETE /repos/{owner}/{repo}/hooks/{id} Delete a hook in a repository
RepositoryApi repoDeleteKey DELETE /repos/{owner}/{repo}/keys/{id} Delete a key from a repository
RepositoryApi repoDeletePullReview DELETE /repos/{owner}/{repo}/pulls/{index}/reviews/{id} Delete a specific review from a pull request
RepositoryApi repoDeletePullReviewRequests DELETE /repos/{owner}/{repo}/pulls/{index}/requested_reviewers cancel review requests for a pull request
RepositoryApi repoDeleteRelease DELETE /repos/{owner}/{repo}/releases/{id} Delete a release
RepositoryApi repoDeleteReleaseAttachment DELETE /repos/{owner}/{repo}/releases/{id}/assets/{attachment_id} Delete a release attachment
RepositoryApi repoDeleteReleaseByTag DELETE /repos/{owner}/{repo}/releases/tags/{tag} Delete a release by tag name
RepositoryApi repoDeleteTag DELETE /repos/{owner}/{repo}/tags/{tag} Delete a repository's tag by name
RepositoryApi repoDeleteTeam DELETE /repos/{owner}/{repo}/teams/{team} Delete a team from a repository
RepositoryApi repoDeleteTopic DELETE /repos/{owner}/{repo}/topics/{topic} Delete a topic from a repository
RepositoryApi repoDeleteWikiPage DELETE /repos/{owner}/{repo}/wiki/page/{pageName} Delete a wiki page
RepositoryApi repoDismissPullReview POST /repos/{owner}/{repo}/pulls/{index}/reviews/{id}/dismissals Dismiss a review for a pull request
RepositoryApi repoDownloadCommitDiffOrPatch GET /repos/{owner}/{repo}/git/commits/{sha}.{diffType} Get a commit's diff or patch
RepositoryApi repoDownloadPullDiffOrPatch GET /repos/{owner}/{repo}/pulls/{index}.{diffType} Get a pull request diff or patch
RepositoryApi repoEdit PATCH /repos/{owner}/{repo} Edit a repository's properties. Only fields that are set will be changed.
RepositoryApi repoEditBranchProtection PATCH /repos/{owner}/{repo}/branch_protections/{name} Edit a branch protections for a repository. Only fields that are set will be changed
RepositoryApi repoEditGitHook PATCH /repos/{owner}/{repo}/hooks/git/{id} Edit a Git hook in a repository
RepositoryApi repoEditHook PATCH /repos/{owner}/{repo}/hooks/{id} Edit a hook in a repository
RepositoryApi repoEditPullRequest PATCH /repos/{owner}/{repo}/pulls/{index} Update a pull request. If using deadline only the date will be taken into account, and time of day ignored.
RepositoryApi repoEditRelease PATCH /repos/{owner}/{repo}/releases/{id} Update a release
RepositoryApi repoEditReleaseAttachment PATCH /repos/{owner}/{repo}/releases/{id}/assets/{attachment_id} Edit a release attachment
RepositoryApi repoEditWikiPage PATCH /repos/{owner}/{repo}/wiki/page/{pageName} Edit a wiki page
RepositoryApi repoGet GET /repos/{owner}/{repo} Get a repository
RepositoryApi repoGetAllCommits GET /repos/{owner}/{repo}/commits Get a list of all commits from a repository
RepositoryApi repoGetArchive GET /repos/{owner}/{repo}/archive/{archive} Get an archive of a repository
RepositoryApi repoGetAssignees GET /repos/{owner}/{repo}/assignees Return all users that have write access and can be assigned to issues
RepositoryApi repoGetBranch GET /repos/{owner}/{repo}/branches/{branch} Retrieve a specific branch from a repository, including its effective branch protection
RepositoryApi repoGetBranchProtection GET /repos/{owner}/{repo}/branch_protections/{name} Get a specific branch protection for the repository
RepositoryApi repoGetByID GET /repositories/{id} Get a repository by id
RepositoryApi repoGetCombinedStatusByRef GET /repos/{owner}/{repo}/commits/{ref}/status Get a commit's combined status, by branch/tag/commit reference
RepositoryApi repoGetContents GET /repos/{owner}/{repo}/contents/{filepath} Gets the metadata and contents (if a file) of an entry in a repository, or a list of entries if a dir
RepositoryApi repoGetContentsList GET /repos/{owner}/{repo}/contents Gets the metadata of all the entries of the root dir
RepositoryApi repoGetEditorConfig GET /repos/{owner}/{repo}/editorconfig/{filepath} Get the EditorConfig definitions of a file in a repository
RepositoryApi repoGetGitHook GET /repos/{owner}/{repo}/hooks/git/{id} Get a Git hook
RepositoryApi repoGetHook GET /repos/{owner}/{repo}/hooks/{id} Get a hook
RepositoryApi repoGetIssueTemplates GET /repos/{owner}/{repo}/issue_templates Get available issue templates for a repository
RepositoryApi repoGetKey GET /repos/{owner}/{repo}/keys/{id} Get a repository's key by id
RepositoryApi repoGetLanguages GET /repos/{owner}/{repo}/languages Get languages and number of bytes of code written
RepositoryApi repoGetNote GET /repos/{owner}/{repo}/git/notes/{sha} Get a note corresponding to a single commit from a repository
RepositoryApi repoGetPullRequest GET /repos/{owner}/{repo}/pulls/{index} Get a pull request
RepositoryApi repoGetPullRequestCommits GET /repos/{owner}/{repo}/pulls/{index}/commits Get commits for a pull request
RepositoryApi repoGetPullReview GET /repos/{owner}/{repo}/pulls/{index}/reviews/{id} Get a specific review for a pull request
RepositoryApi repoGetPullReviewComments GET /repos/{owner}/{repo}/pulls/{index}/reviews/{id}/comments Get a specific review for a pull request
RepositoryApi repoGetRawFile GET /repos/{owner}/{repo}/raw/{filepath} Get a file from a repository
RepositoryApi repoGetRelease GET /repos/{owner}/{repo}/releases/{id} Get a release
RepositoryApi repoGetReleaseAttachment GET /repos/{owner}/{repo}/releases/{id}/assets/{attachment_id} Get a release attachment
RepositoryApi repoGetReleaseByTag GET /repos/{owner}/{repo}/releases/tags/{tag} Get a release by tag name
RepositoryApi repoGetReviewers GET /repos/{owner}/{repo}/reviewers Return all users that can be requested to review in this repo
RepositoryApi repoGetSingleCommit GET /repos/{owner}/{repo}/git/commits/{sha} Get a single commit from a repository
RepositoryApi repoGetTag GET /repos/{owner}/{repo}/tags/{tag} Get the tag of a repository by tag name
RepositoryApi repoGetWikiPage GET /repos/{owner}/{repo}/wiki/page/{pageName} Get a wiki page
RepositoryApi repoGetWikiPageRevisions GET /repos/{owner}/{repo}/wiki/revisions/{pageName} Get revisions of a wiki page
RepositoryApi repoGetWikiPages GET /repos/{owner}/{repo}/wiki/pages Get all wiki pages
RepositoryApi repoListAllGitRefs GET /repos/{owner}/{repo}/git/refs Get specified ref or filtered repository's refs
RepositoryApi repoListBranchProtection GET /repos/{owner}/{repo}/branch_protections List branch protections for a repository
RepositoryApi repoListBranches GET /repos/{owner}/{repo}/branches List a repository's branches
RepositoryApi repoListCollaborators GET /repos/{owner}/{repo}/collaborators List a repository's collaborators
RepositoryApi repoListGitHooks GET /repos/{owner}/{repo}/hooks/git List the Git hooks in a repository
RepositoryApi repoListGitRefs GET /repos/{owner}/{repo}/git/refs/{ref} Get specified ref or filtered repository's refs
RepositoryApi repoListHooks GET /repos/{owner}/{repo}/hooks List the hooks in a repository
RepositoryApi repoListKeys GET /repos/{owner}/{repo}/keys List a repository's keys
RepositoryApi repoListPullRequests GET /repos/{owner}/{repo}/pulls List a repo's pull requests
RepositoryApi repoListPullReviews GET /repos/{owner}/{repo}/pulls/{index}/reviews List all reviews for a pull request
RepositoryApi repoListReleaseAttachments GET /repos/{owner}/{repo}/releases/{id}/assets List release's attachments
RepositoryApi repoListReleases GET /repos/{owner}/{repo}/releases List a repo's releases
RepositoryApi repoListStargazers GET /repos/{owner}/{repo}/stargazers List a repo's stargazers
RepositoryApi repoListStatuses GET /repos/{owner}/{repo}/statuses/{sha} Get a commit's statuses
RepositoryApi repoListStatusesByRef GET /repos/{owner}/{repo}/commits/{ref}/statuses Get a commit's statuses, by branch/tag/commit reference
RepositoryApi repoListSubscribers GET /repos/{owner}/{repo}/subscribers List a repo's watchers
RepositoryApi repoListTags GET /repos/{owner}/{repo}/tags List a repository's tags
RepositoryApi repoListTeams GET /repos/{owner}/{repo}/teams List a repository's teams
RepositoryApi repoListTopics GET /repos/{owner}/{repo}/topics Get list of topics that a repository has
RepositoryApi repoMergePullRequest POST /repos/{owner}/{repo}/pulls/{index}/merge Merge a pull request
RepositoryApi repoMigrate POST /repos/migrate Migrate a remote git repository
RepositoryApi repoMirrorSync POST /repos/{owner}/{repo}/mirror-sync Sync a mirrored repository
RepositoryApi repoPullRequestIsMerged GET /repos/{owner}/{repo}/pulls/{index}/merge Check if a pull request has been merged
RepositoryApi repoSearch GET /repos/search Search for repositories
RepositoryApi repoSigningKey GET /repos/{owner}/{repo}/signing-key.gpg Get signing-key.gpg for given repository
RepositoryApi repoSubmitPullReview POST /repos/{owner}/{repo}/pulls/{index}/reviews/{id} Submit a pending review to an pull request
RepositoryApi repoTestHook POST /repos/{owner}/{repo}/hooks/{id}/tests Test a push webhook
RepositoryApi repoTrackedTimes GET /repos/{owner}/{repo}/times List a repo's tracked times
RepositoryApi repoTransfer POST /repos/{owner}/{repo}/transfer Transfer a repo ownership
RepositoryApi repoUnDismissPullReview POST /repos/{owner}/{repo}/pulls/{index}/reviews/{id}/undismissals Cancel to dismiss a review for a pull request
RepositoryApi repoUpdateFile PUT /repos/{owner}/{repo}/contents/{filepath} Update a file in a repository
RepositoryApi repoUpdatePullRequest POST /repos/{owner}/{repo}/pulls/{index}/update Merge PR's baseBranch into headBranch
RepositoryApi repoUpdateTopics PUT /repos/{owner}/{repo}/topics Replace list of topics for a repository
RepositoryApi topicSearch GET /topics/search search topics via keyword
RepositoryApi userCurrentCheckSubscription GET /repos/{owner}/{repo}/subscription Check if the current user is watching a repo
RepositoryApi userCurrentDeleteSubscription DELETE /repos/{owner}/{repo}/subscription Unwatch a repo
RepositoryApi userCurrentPutSubscription PUT /repos/{owner}/{repo}/subscription Watch a repo
RepositoryApi userTrackedTimes GET /repos/{owner}/{repo}/times/{user} List a user's tracked times in a repo
SettingsApi getGeneralAPISettings GET /settings/api Get instance's global settings for api
SettingsApi getGeneralAttachmentSettings GET /settings/attachment Get instance's global settings for Attachment
SettingsApi getGeneralRepositorySettings GET /settings/repository Get instance's global settings for repositories
SettingsApi getGeneralUISettings GET /settings/ui Get instance's global settings for ui
UserApi createCurrentUserRepo POST /user/repos Create a repository
UserApi getUserSettings GET /user/settings Get user settings
UserApi getVerificationToken GET /user/gpg_key_token Get a Token to verify
UserApi updateUserSettings PATCH /user/settings Update user settings
UserApi userAddEmail POST /user/emails Add email addresses
UserApi userCheckFollowing GET /users/{follower}/following/{followee} Check if one user is following another user
UserApi userCreateOAuth2Application POST /user/applications/oauth2 creates a new OAuth2 application
UserApi userCreateToken POST /users/{username}/tokens Create an access token
UserApi userCurrentCheckFollowing GET /user/following/{username} Check whether a user is followed by the authenticated user
UserApi userCurrentCheckStarring GET /user/starred/{owner}/{repo} Whether the authenticated is starring the repo
UserApi userCurrentDeleteFollow DELETE /user/following/{username} Unfollow a user
UserApi userCurrentDeleteGPGKey DELETE /user/gpg_keys/{id} Remove a GPG key
UserApi userCurrentDeleteKey DELETE /user/keys/{id} Delete a public key
UserApi userCurrentDeleteStar DELETE /user/starred/{owner}/{repo} Unstar the given repo
UserApi userCurrentGetGPGKey GET /user/gpg_keys/{id} Get a GPG key
UserApi userCurrentGetKey GET /user/keys/{id} Get a public key
UserApi userCurrentListFollowers GET /user/followers List the authenticated user's followers
UserApi userCurrentListFollowing GET /user/following List the users that the authenticated user is following
UserApi userCurrentListGPGKeys GET /user/gpg_keys List the authenticated user's GPG keys
UserApi userCurrentListKeys GET /user/keys List the authenticated user's public keys
UserApi userCurrentListRepos GET /user/repos List the repos that the authenticated user owns
UserApi userCurrentListStarred GET /user/starred The repos that the authenticated user has starred
UserApi userCurrentListSubscriptions GET /user/subscriptions List repositories watched by the authenticated user
UserApi userCurrentPostGPGKey POST /user/gpg_keys Create a GPG key
UserApi userCurrentPostKey POST /user/keys Create a public key
UserApi userCurrentPutFollow PUT /user/following/{username} Follow a user
UserApi userCurrentPutStar PUT /user/starred/{owner}/{repo} Star the given repo
UserApi userCurrentTrackedTimes GET /user/times List the current user's tracked times
UserApi userDeleteAccessToken DELETE /users/{username}/tokens/{token} delete an access token
UserApi userDeleteEmail DELETE /user/emails Delete email addresses
UserApi userDeleteOAuth2Application DELETE /user/applications/oauth2/{id} delete an OAuth2 Application
UserApi userGet GET /users/{username} Get a user
UserApi userGetCurrent GET /user Get the authenticated user
UserApi userGetHeatmapData GET /users/{username}/heatmap Get a user's heatmap
UserApi userGetOAuth2Application GET /user/applications/oauth2/{id} get an OAuth2 Application
UserApi userGetOauth2Application GET /user/applications/oauth2 List the authenticated user's oauth2 applications
UserApi userGetStopWatches GET /user/stopwatches Get list of all existing stopwatches
UserApi userGetTokens GET /users/{username}/tokens List the authenticated user's access tokens
UserApi userListEmails GET /user/emails List the authenticated user's email addresses
UserApi userListFollowers GET /users/{username}/followers List the given user's followers
UserApi userListFollowing GET /users/{username}/following List the users that the given user is following
UserApi userListGPGKeys GET /users/{username}/gpg_keys List the given user's GPG keys
UserApi userListKeys GET /users/{username}/keys List the given user's public keys
UserApi userListRepos GET /users/{username}/repos List the repos owned by the given user
UserApi userListStarred GET /users/{username}/starred The repos that the given user has starred
UserApi userListSubscriptions GET /users/{username}/subscriptions List the repositories watched by a user
UserApi userListTeams GET /user/teams List all the teams a user belongs to
UserApi userSearch GET /users/search Search for users
UserApi userUpdateOAuth2Application PATCH /user/applications/oauth2/{id} update an OAuth2 Application, this includes regenerating the client secret
UserApi userVerifyGPGKey POST /user/gpg_key_verify Verify a GPG key

Models

Authorization

AccessToken

  • Type: API key
  • API key parameter name: access_token
  • Location: URL query string

AuthorizationHeaderToken

  • Type: API key
  • API key parameter name: Authorization
  • Location: HTTP header

BasicAuth

  • Type: HTTP basic authentication

SudoHeader

  • Type: API key
  • API key parameter name: Sudo
  • Location: HTTP header

SudoParam

  • Type: API key
  • API key parameter name: sudo
  • Location: URL query string

TOTPHeader

  • Type: API key
  • API key parameter name: X-GITEA-OTP
  • Location: HTTP header

Token

  • Type: API key
  • API key parameter name: token
  • Location: URL query string

Tests

To run the tests, use:

composer install
vendor/bin/phpunit

Author

About this package

This PHP package is automatically generated by the OpenAPI Generator project:

  • API version: 1.17.0+dev-334-gf36701c70
    • Package version: 1.0.0
  • Build package: org.openapitools.codegen.languages.PhpClientCodegen

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages