update 2023-10-10 10:16:07
This commit is contained in:
parent
7d2702eb8e
commit
71bd39cb1e
@ -8,6 +8,7 @@
|
||||
```
|
||||
# class Organization (Details)
|
||||
> namespace: **VDM\Joomla\Gitea\Admin\Users**
|
||||
> extends: **Api**
|
||||
```uml
|
||||
@startuml
|
||||
class Organization #Gold {
|
||||
|
@ -8,6 +8,7 @@
|
||||
```
|
||||
# class Ui (Details)
|
||||
> namespace: **VDM\Joomla\Gitea\Settings**
|
||||
> extends: **Api**
|
||||
```uml
|
||||
@startuml
|
||||
class Ui #Gold {
|
||||
|
@ -8,6 +8,7 @@
|
||||
```
|
||||
# class Transfer (Details)
|
||||
> namespace: **VDM\Joomla\Gitea\Repository**
|
||||
> extends: **Api**
|
||||
```uml
|
||||
@startuml
|
||||
class Transfer #Gold {
|
||||
|
@ -8,6 +8,7 @@
|
||||
```
|
||||
# class Repository (Details)
|
||||
> namespace: **VDM\Joomla\Gitea\Organization\Teams**
|
||||
> extends: **Api**
|
||||
```uml
|
||||
@startuml
|
||||
class Repository #Gold {
|
||||
|
@ -830,7 +830,6 @@ class Repository implements ServiceProviderInterface
|
||||
$container->get('Gitea.Dynamic.Uri'),
|
||||
$container->get('Gitea.Utilities.Response')
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -767,4 +767,4 @@
|
||||
$container->get('Gitea.Dynamic.Uri'),
|
||||
$container->get('Gitea.Utilities.Response')
|
||||
);
|
||||
}
|
||||
}
|
@ -8,6 +8,7 @@
|
||||
```
|
||||
# class Protection (Details)
|
||||
> namespace: **VDM\Joomla\Gitea\Repository\Branch**
|
||||
> extends: **Api**
|
||||
```uml
|
||||
@startuml
|
||||
class Protection #Gold {
|
||||
|
@ -8,6 +8,7 @@
|
||||
```
|
||||
# class Merge (Details)
|
||||
> namespace: **VDM\Joomla\Gitea\Repository**
|
||||
> extends: **Api**
|
||||
```uml
|
||||
@startuml
|
||||
class Merge #Gold {
|
||||
|
@ -8,6 +8,7 @@
|
||||
```
|
||||
# class Followers (Details)
|
||||
> namespace: **VDM\Joomla\Gitea\User**
|
||||
> extends: **Api**
|
||||
```uml
|
||||
@startuml
|
||||
class Followers #Gold {
|
||||
|
@ -10,7 +10,7 @@
|
||||
> namespace: **VDM\Joomla\Gitea\Utilities**
|
||||
```uml
|
||||
@startuml
|
||||
class Response << (F,LightGreen) >> #Green {
|
||||
class Response << (F,LightGreen) >> #RoyalBlue {
|
||||
+ get(JoomlaResponse $response, int $expectedCode = 200, ...) : mixed
|
||||
+ get_(JoomlaResponse $response, array $validate = [200 => null]) : mixed
|
||||
# body(JoomlaResponse $response, mixed $default = null) : mixed
|
||||
|
@ -44,7 +44,7 @@ final class Response
|
||||
// Decode the error response and throw an exception.
|
||||
$message = $this->error($response);
|
||||
|
||||
throw new \DomainException("Invalid response received from API.$message", $response->code);
|
||||
throw new \DomainException("Invalid response received from API. $message", $response->code);
|
||||
|
||||
}
|
||||
|
||||
@ -70,7 +70,7 @@ final class Response
|
||||
// Decode the error response and throw an exception.
|
||||
$message = $this->error($response);
|
||||
|
||||
throw new \DomainException("Invalid response received from API.$message", $response->code);
|
||||
throw new \DomainException("Invalid response received from API. $message", $response->code);
|
||||
|
||||
}
|
||||
|
||||
@ -134,6 +134,10 @@ final class Response
|
||||
{
|
||||
return $error->error;
|
||||
}
|
||||
elseif (isset($error->message))
|
||||
{
|
||||
return $error->message;
|
||||
}
|
||||
|
||||
return '';
|
||||
}
|
||||
|
@ -18,7 +18,7 @@
|
||||
// Decode the error response and throw an exception.
|
||||
$message = $this->error($response);
|
||||
|
||||
throw new \DomainException("Invalid response received from API.$message", $response->code);
|
||||
throw new \DomainException("Invalid response received from API. $message", $response->code);
|
||||
|
||||
}
|
||||
|
||||
@ -44,7 +44,7 @@
|
||||
// Decode the error response and throw an exception.
|
||||
$message = $this->error($response);
|
||||
|
||||
throw new \DomainException("Invalid response received from API.$message", $response->code);
|
||||
throw new \DomainException("Invalid response received from API. $message", $response->code);
|
||||
|
||||
}
|
||||
|
||||
@ -108,6 +108,10 @@
|
||||
{
|
||||
return $error->error;
|
||||
}
|
||||
elseif (isset($error->message))
|
||||
{
|
||||
return $error->message;
|
||||
}
|
||||
|
||||
return '';
|
||||
}
|
||||
|
@ -8,6 +8,7 @@
|
||||
```
|
||||
# class Patch (Details)
|
||||
> namespace: **VDM\Joomla\Gitea\Repository**
|
||||
> extends: **Api**
|
||||
```uml
|
||||
@startuml
|
||||
class Patch #Gold {
|
||||
|
@ -8,6 +8,7 @@
|
||||
```
|
||||
# class Comments (Details)
|
||||
> namespace: **VDM\Joomla\Gitea\Issue**
|
||||
> extends: **Api**
|
||||
```uml
|
||||
@startuml
|
||||
class Comments #Gold {
|
||||
|
@ -8,6 +8,7 @@
|
||||
```
|
||||
# class PublicMembers (Details)
|
||||
> namespace: **VDM\Joomla\Gitea\Organization**
|
||||
> extends: **Api**
|
||||
```uml
|
||||
@startuml
|
||||
class PublicMembers #Gold {
|
||||
|
@ -8,6 +8,7 @@
|
||||
```
|
||||
# class NodeInfo (Details)
|
||||
> namespace: **VDM\Joomla\Gitea\Miscellaneous**
|
||||
> extends: **Api**
|
||||
```uml
|
||||
@startuml
|
||||
class NodeInfo #Gold {
|
||||
|
@ -8,6 +8,7 @@
|
||||
```
|
||||
# class Times (Details)
|
||||
> namespace: **VDM\Joomla\Gitea\User**
|
||||
> extends: **Api**
|
||||
```uml
|
||||
@startuml
|
||||
class Times #Gold {
|
||||
|
@ -8,6 +8,7 @@
|
||||
```
|
||||
# class Keys (Details)
|
||||
> namespace: **VDM\Joomla\Gitea\Admin\Users**
|
||||
> extends: **Api**
|
||||
```uml
|
||||
@startuml
|
||||
class Keys #Gold {
|
||||
|
@ -8,6 +8,7 @@
|
||||
```
|
||||
# class Repository (Details)
|
||||
> namespace: **VDM\Joomla\Gitea\Notifications**
|
||||
> extends: **Api**
|
||||
```uml
|
||||
@startuml
|
||||
class Repository #Gold {
|
||||
|
@ -8,6 +8,7 @@
|
||||
```
|
||||
# class Unadopted (Details)
|
||||
> namespace: **VDM\Joomla\Gitea\Admin**
|
||||
> extends: **Api**
|
||||
```uml
|
||||
@startuml
|
||||
class Unadopted #Gold {
|
||||
|
@ -8,6 +8,7 @@
|
||||
```
|
||||
# class Attachment (Details)
|
||||
> namespace: **VDM\Joomla\Gitea\Settings**
|
||||
> extends: **Api**
|
||||
```uml
|
||||
@startuml
|
||||
class Attachment #Gold {
|
||||
|
@ -15,7 +15,7 @@ abstract Api #Orange {
|
||||
# Uri $uri
|
||||
# Response $response
|
||||
+ __construct(Http $http, Uri $uri, ...)
|
||||
+ load_(string $url, string $token) : void
|
||||
+ load_(?string $url = null, ?string $token = null) : void
|
||||
}
|
||||
|
||||
note right of Api::__construct
|
||||
|
@ -67,16 +67,23 @@ abstract class Api
|
||||
/**
|
||||
* Load/Reload API.
|
||||
*
|
||||
* @param string $url The url.
|
||||
* @param token $token The token.
|
||||
* @param string|null $url The url.
|
||||
* @param token|null $token The token.
|
||||
*
|
||||
* @return void
|
||||
* @since 3.2.0
|
||||
**/
|
||||
public function load_(string $url, string $token)
|
||||
public function load_(?string $url = null, ?string $token = null)
|
||||
{
|
||||
$this->uri->setUrl($url);
|
||||
$this->http->setToken($token);
|
||||
if ($url !== null)
|
||||
{
|
||||
$this->uri->setUrl($url);
|
||||
}
|
||||
|
||||
if ($token !== null)
|
||||
{
|
||||
$this->http->setToken($token);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -41,14 +41,21 @@
|
||||
/**
|
||||
* Load/Reload API.
|
||||
*
|
||||
* @param string $url The url.
|
||||
* @param token $token The token.
|
||||
* @param string|null $url The url.
|
||||
* @param token|null $token The token.
|
||||
*
|
||||
* @return void
|
||||
* @since 3.2.0
|
||||
**/
|
||||
public function load_(string $url, string $token)
|
||||
public function load_(?string $url = null, ?string $token = null)
|
||||
{
|
||||
$this->uri->setUrl($url);
|
||||
$this->http->setToken($token);
|
||||
if ($url !== null)
|
||||
{
|
||||
$this->uri->setUrl($url);
|
||||
}
|
||||
|
||||
if ($token !== null)
|
||||
{
|
||||
$this->http->setToken($token);
|
||||
}
|
||||
}
|
||||
|
@ -8,6 +8,7 @@
|
||||
```
|
||||
# class Mirrors (Details)
|
||||
> namespace: **VDM\Joomla\Gitea\Repository**
|
||||
> extends: **Api**
|
||||
```uml
|
||||
@startuml
|
||||
class Mirrors #Gold {
|
||||
|
@ -8,6 +8,7 @@
|
||||
```
|
||||
# class Hooks (Details)
|
||||
> namespace: **VDM\Joomla\Gitea\Repository**
|
||||
> extends: **Api**
|
||||
```uml
|
||||
@startuml
|
||||
class Hooks #Gold {
|
||||
|
@ -8,6 +8,7 @@
|
||||
```
|
||||
# class Repository (Details)
|
||||
> namespace: **VDM\Joomla\Gitea\Admin\Users**
|
||||
> extends: **Api**
|
||||
```uml
|
||||
@startuml
|
||||
class Repository #Gold {
|
||||
|
@ -8,6 +8,7 @@
|
||||
```
|
||||
# class Files (Details)
|
||||
> namespace: **VDM\Joomla\Gitea\Package**
|
||||
> extends: **Api**
|
||||
```uml
|
||||
@startuml
|
||||
class Files #Gold {
|
||||
|
@ -8,6 +8,7 @@
|
||||
```
|
||||
# class User (Details)
|
||||
> namespace: **VDM\Joomla\Gitea**
|
||||
> extends: **Api**
|
||||
```uml
|
||||
@startuml
|
||||
class User #Gold {
|
||||
|
@ -8,6 +8,7 @@
|
||||
```
|
||||
# class Applications (Details)
|
||||
> namespace: **VDM\Joomla\Gitea\User**
|
||||
> extends: **Api**
|
||||
```uml
|
||||
@startuml
|
||||
class Applications #Gold {
|
||||
|
@ -8,6 +8,7 @@
|
||||
```
|
||||
# class Stargazers (Details)
|
||||
> namespace: **VDM\Joomla\Gitea\Repository**
|
||||
> extends: **Api**
|
||||
```uml
|
||||
@startuml
|
||||
class Stargazers #Gold {
|
||||
|
@ -8,6 +8,7 @@
|
||||
```
|
||||
# class Keys (Details)
|
||||
> namespace: **VDM\Joomla\Gitea\Repository**
|
||||
> extends: **Api**
|
||||
```uml
|
||||
@startuml
|
||||
class Keys #Gold {
|
||||
|
@ -8,6 +8,7 @@
|
||||
```
|
||||
# class Settings (Details)
|
||||
> namespace: **VDM\Joomla\Gitea\User**
|
||||
> extends: **Api**
|
||||
```uml
|
||||
@startuml
|
||||
class Settings #Gold {
|
||||
|
@ -8,6 +8,7 @@
|
||||
```
|
||||
# class Wiki (Details)
|
||||
> namespace: **VDM\Joomla\Gitea\Repository**
|
||||
> extends: **Api**
|
||||
```uml
|
||||
@startuml
|
||||
class Wiki #Gold {
|
||||
|
@ -8,6 +8,7 @@
|
||||
```
|
||||
# class Gpg (Details)
|
||||
> namespace: **VDM\Joomla\Gitea\Miscellaneous**
|
||||
> extends: **Api**
|
||||
```uml
|
||||
@startuml
|
||||
class Gpg #Gold {
|
||||
|
@ -8,6 +8,7 @@
|
||||
```
|
||||
# class Issue (Details)
|
||||
> namespace: **VDM\Joomla\Gitea**
|
||||
> extends: **Api**
|
||||
```uml
|
||||
@startuml
|
||||
class Issue #Gold {
|
||||
|
@ -8,6 +8,7 @@
|
||||
```
|
||||
# class Api (Details)
|
||||
> namespace: **VDM\Joomla\Gitea\Settings**
|
||||
> extends: **BaseAPI**
|
||||
```uml
|
||||
@startuml
|
||||
class Api #Gold {
|
||||
|
@ -8,6 +8,7 @@
|
||||
```
|
||||
# class Organizations (Details)
|
||||
> namespace: **VDM\Joomla\Gitea\Admin**
|
||||
> extends: **Api**
|
||||
```uml
|
||||
@startuml
|
||||
class Organizations #Gold {
|
||||
|
@ -8,6 +8,7 @@
|
||||
```
|
||||
# class Statuses (Details)
|
||||
> namespace: **VDM\Joomla\Gitea\Repository**
|
||||
> extends: **Api**
|
||||
```uml
|
||||
@startuml
|
||||
class Statuses #Gold {
|
||||
|
@ -8,6 +8,7 @@
|
||||
```
|
||||
# class Hooks (Details)
|
||||
> namespace: **VDM\Joomla\Gitea\Organization**
|
||||
> extends: **Api**
|
||||
```uml
|
||||
@startuml
|
||||
class Hooks #Gold {
|
||||
|
@ -8,6 +8,7 @@
|
||||
```
|
||||
# class Deadline (Details)
|
||||
> namespace: **VDM\Joomla\Gitea\Issue**
|
||||
> extends: **Api**
|
||||
```uml
|
||||
@startuml
|
||||
class Deadline #Gold {
|
||||
|
@ -10,7 +10,7 @@
|
||||
> namespace: **VDM\Joomla\Gitea\Utilities**
|
||||
```uml
|
||||
@startuml
|
||||
class Uri << (F,LightGreen) >> #Green {
|
||||
class Uri << (F,LightGreen) >> #RoyalBlue {
|
||||
- string $endpoint
|
||||
- string $version
|
||||
- string $url
|
||||
|
@ -107,7 +107,7 @@ final class Uri
|
||||
**/
|
||||
public function setUrl(string $url)
|
||||
{
|
||||
return $this->url = $url;
|
||||
$this->url = $url;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -120,7 +120,7 @@ final class Uri
|
||||
**/
|
||||
private function setEndpoint(string $endpoint)
|
||||
{
|
||||
return $this->endpoint = $endpoint;
|
||||
$this->endpoint = $endpoint;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -133,7 +133,7 @@ final class Uri
|
||||
**/
|
||||
private function setVersion($version)
|
||||
{
|
||||
return $this->version = $version;
|
||||
$this->version = $version;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -83,7 +83,7 @@
|
||||
**/
|
||||
public function setUrl(string $url)
|
||||
{
|
||||
return $this->url = $url;
|
||||
$this->url = $url;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -96,7 +96,7 @@
|
||||
**/
|
||||
private function setEndpoint(string $endpoint)
|
||||
{
|
||||
return $this->endpoint = $endpoint;
|
||||
$this->endpoint = $endpoint;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -109,5 +109,5 @@
|
||||
**/
|
||||
private function setVersion($version)
|
||||
{
|
||||
return $this->version = $version;
|
||||
$this->version = $version;
|
||||
}
|
||||
|
@ -8,6 +8,7 @@
|
||||
```
|
||||
# class Comments (Details)
|
||||
> namespace: **VDM\Joomla\Gitea\Issue\Repository**
|
||||
> extends: **Api**
|
||||
```uml
|
||||
@startuml
|
||||
class Comments #Gold {
|
||||
|
@ -8,6 +8,7 @@
|
||||
```
|
||||
# class Reviewers (Details)
|
||||
> namespace: **VDM\Joomla\Gitea\Repository**
|
||||
> extends: **Api**
|
||||
```uml
|
||||
@startuml
|
||||
class Reviewers #Gold {
|
||||
|
@ -8,6 +8,7 @@
|
||||
```
|
||||
# class Assignees (Details)
|
||||
> namespace: **VDM\Joomla\Gitea\Repository**
|
||||
> extends: **Api**
|
||||
```uml
|
||||
@startuml
|
||||
class Assignees #Gold {
|
||||
|
@ -8,6 +8,7 @@
|
||||
```
|
||||
# class Attachments (Details)
|
||||
> namespace: **VDM\Joomla\Gitea\Repository**
|
||||
> extends: **Api**
|
||||
```uml
|
||||
@startuml
|
||||
class Attachments #Gold {
|
||||
|
@ -8,6 +8,7 @@
|
||||
```
|
||||
# class Reviews (Details)
|
||||
> namespace: **VDM\Joomla\Gitea\Repository**
|
||||
> extends: **Api**
|
||||
```uml
|
||||
@startuml
|
||||
class Reviews #Gold {
|
||||
|
@ -8,6 +8,7 @@
|
||||
```
|
||||
# class Cron (Details)
|
||||
> namespace: **VDM\Joomla\Gitea\Admin**
|
||||
> extends: **Api**
|
||||
```uml
|
||||
@startuml
|
||||
class Cron #Gold {
|
||||
|
@ -66,7 +66,6 @@ class Utilities implements ServiceProviderInterface
|
||||
public function getResponse(Container $container): Response
|
||||
{
|
||||
return new Response();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -39,4 +39,4 @@
|
||||
public function getResponse(Container $container): Response
|
||||
{
|
||||
return new Response();
|
||||
}
|
||||
}
|
@ -78,7 +78,6 @@ class Gitea implements ServiceProviderInterface
|
||||
return new Http(
|
||||
$container->get('Config')->get('gitea_token')
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -51,4 +51,4 @@
|
||||
return new Http(
|
||||
$container->get('Config')->get('gitea_token')
|
||||
);
|
||||
}
|
||||
}
|
@ -8,6 +8,7 @@
|
||||
```
|
||||
# class Comment (Details)
|
||||
> namespace: **VDM\Joomla\Gitea\Issue\Reactions**
|
||||
> extends: **Api**
|
||||
```uml
|
||||
@startuml
|
||||
class Comment #Gold {
|
||||
|
@ -8,6 +8,7 @@
|
||||
```
|
||||
# class Releases (Details)
|
||||
> namespace: **VDM\Joomla\Gitea\Repository**
|
||||
> extends: **Api**
|
||||
```uml
|
||||
@startuml
|
||||
class Releases #Gold {
|
||||
|
@ -8,6 +8,7 @@
|
||||
```
|
||||
# class Trees (Details)
|
||||
> namespace: **VDM\Joomla\Gitea\Repository**
|
||||
> extends: **Api**
|
||||
```uml
|
||||
@startuml
|
||||
class Trees #Gold {
|
||||
|
@ -8,6 +8,7 @@
|
||||
```
|
||||
# class Topics (Details)
|
||||
> namespace: **VDM\Joomla\Gitea\Repository**
|
||||
> extends: **Api**
|
||||
```uml
|
||||
@startuml
|
||||
class Topics #Gold {
|
||||
|
@ -8,6 +8,7 @@
|
||||
```
|
||||
# class Version (Details)
|
||||
> namespace: **VDM\Joomla\Gitea\Miscellaneous**
|
||||
> extends: **Api**
|
||||
```uml
|
||||
@startuml
|
||||
class Version #Gold {
|
||||
|
@ -8,6 +8,7 @@
|
||||
```
|
||||
# class Forks (Details)
|
||||
> namespace: **VDM\Joomla\Gitea\Repository**
|
||||
> extends: **Api**
|
||||
```uml
|
||||
@startuml
|
||||
class Forks #Gold {
|
||||
|
@ -8,6 +8,7 @@
|
||||
```
|
||||
# class Timeline (Details)
|
||||
> namespace: **VDM\Joomla\Gitea\Issue**
|
||||
> extends: **Api**
|
||||
```uml
|
||||
@startuml
|
||||
class Timeline #Gold {
|
||||
|
@ -8,6 +8,7 @@
|
||||
```
|
||||
# class Starred (Details)
|
||||
> namespace: **VDM\Joomla\Gitea\User**
|
||||
> extends: **Api**
|
||||
```uml
|
||||
@startuml
|
||||
class Starred #Gold {
|
||||
|
@ -8,6 +8,7 @@
|
||||
```
|
||||
# class Archive (Details)
|
||||
> namespace: **VDM\Joomla\Gitea\Repository**
|
||||
> extends: **Api**
|
||||
```uml
|
||||
@startuml
|
||||
class Archive #Gold {
|
||||
|
@ -8,6 +8,7 @@
|
||||
```
|
||||
# class Templates (Details)
|
||||
> namespace: **VDM\Joomla\Gitea\Repository**
|
||||
> extends: **Api**
|
||||
```uml
|
||||
@startuml
|
||||
class Templates #Gold {
|
||||
|
@ -8,6 +8,7 @@
|
||||
```
|
||||
# class Contents (Details)
|
||||
> namespace: **VDM\Joomla\Gitea\Repository**
|
||||
> extends: **Api**
|
||||
```uml
|
||||
@startuml
|
||||
class Contents #Gold {
|
||||
@ -97,8 +98,8 @@ note right of Contents::update
|
||||
string $filepath
|
||||
string $content
|
||||
string $message
|
||||
string $branch = 'master'
|
||||
string $sha
|
||||
string $branch = 'master'
|
||||
?string $authorName = null
|
||||
?string $authorEmail = null
|
||||
?string $committerName = null
|
||||
|
@ -205,16 +205,19 @@ class Contents extends Api
|
||||
// Build the request path.
|
||||
$path = "/repos/{$owner}/{$repo}/contents";
|
||||
|
||||
// Get the URI with the specified path.
|
||||
$uri = $this->uri->get($path);
|
||||
|
||||
// Add the 'ref' parameter if it's provided.
|
||||
if ($ref !== null)
|
||||
{
|
||||
$this->uri->setVar('ref', $ref);
|
||||
$uri->setVar('ref', $ref);
|
||||
}
|
||||
|
||||
// Send the get request.
|
||||
return $this->response->get(
|
||||
$this->http->get(
|
||||
$this->uri->get($path)
|
||||
$uri
|
||||
)
|
||||
);
|
||||
}
|
||||
@ -227,8 +230,8 @@ class Contents extends Api
|
||||
* @param string $filepath The file path.
|
||||
* @param string $content The file content.
|
||||
* @param string $message The commit message.
|
||||
* @param string $branch The branch name. Defaults to the repository's default branch.
|
||||
* @param string $sha The blob SHA of the file.
|
||||
* @param string $branch The branch name. Defaults to the repository's default branch.
|
||||
* @param string|null $authorName The author name. Defaults to the authenticated user.
|
||||
* @param string|null $authorEmail The author email. Defaults to the authenticated user.
|
||||
* @param string|null $committerName The committer name. Defaults to the authenticated user.
|
||||
@ -248,8 +251,8 @@ class Contents extends Api
|
||||
string $filepath,
|
||||
string $content,
|
||||
string $message,
|
||||
string $branch = 'master',
|
||||
string $sha,
|
||||
string $branch = 'master',
|
||||
?string $authorName = null,
|
||||
?string $authorEmail = null,
|
||||
?string $committerName = null,
|
||||
@ -503,7 +506,6 @@ class Contents extends Api
|
||||
$this->uri->get($path)
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -181,16 +181,19 @@
|
||||
// Build the request path.
|
||||
$path = "/repos/{$owner}/{$repo}/contents";
|
||||
|
||||
// Get the URI with the specified path.
|
||||
$uri = $this->uri->get($path);
|
||||
|
||||
// Add the 'ref' parameter if it's provided.
|
||||
if ($ref !== null)
|
||||
{
|
||||
$this->uri->setVar('ref', $ref);
|
||||
$uri->setVar('ref', $ref);
|
||||
}
|
||||
|
||||
// Send the get request.
|
||||
return $this->response->get(
|
||||
$this->http->get(
|
||||
$this->uri->get($path)
|
||||
$uri
|
||||
)
|
||||
);
|
||||
}
|
||||
@ -203,8 +206,8 @@
|
||||
* @param string $filepath The file path.
|
||||
* @param string $content The file content.
|
||||
* @param string $message The commit message.
|
||||
* @param string $branch The branch name. Defaults to the repository's default branch.
|
||||
* @param string $sha The blob SHA of the file.
|
||||
* @param string $branch The branch name. Defaults to the repository's default branch.
|
||||
* @param string|null $authorName The author name. Defaults to the authenticated user.
|
||||
* @param string|null $authorEmail The author email. Defaults to the authenticated user.
|
||||
* @param string|null $committerName The committer name. Defaults to the authenticated user.
|
||||
@ -224,8 +227,8 @@
|
||||
string $filepath,
|
||||
string $content,
|
||||
string $message,
|
||||
string $branch = 'master',
|
||||
string $sha,
|
||||
string $branch = 'master',
|
||||
?string $authorName = null,
|
||||
?string $authorEmail = null,
|
||||
?string $committerName = null,
|
||||
@ -479,4 +482,4 @@
|
||||
$this->uri->get($path)
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
@ -8,6 +8,7 @@
|
||||
```
|
||||
# class Organization (Details)
|
||||
> namespace: **VDM\Joomla\Gitea**
|
||||
> extends: **Api**
|
||||
```uml
|
||||
@startuml
|
||||
class Organization #Gold {
|
||||
|
@ -8,6 +8,7 @@
|
||||
```
|
||||
# class Markdown (Details)
|
||||
> namespace: **VDM\Joomla\Gitea\Miscellaneous**
|
||||
> extends: **Api**
|
||||
```uml
|
||||
@startuml
|
||||
class Markdown #Gold {
|
||||
|
@ -8,6 +8,7 @@
|
||||
```
|
||||
# class Branch (Details)
|
||||
> namespace: **VDM\Joomla\Gitea\Repository**
|
||||
> extends: **Api**
|
||||
```uml
|
||||
@startuml
|
||||
class Branch #Gold {
|
||||
|
@ -8,6 +8,7 @@
|
||||
```
|
||||
# class Watchers (Details)
|
||||
> namespace: **VDM\Joomla\Gitea\Repository**
|
||||
> extends: **Api**
|
||||
```uml
|
||||
@startuml
|
||||
class Watchers #Gold {
|
||||
|
@ -8,6 +8,7 @@
|
||||
```
|
||||
# class Gpg (Details)
|
||||
> namespace: **VDM\Joomla\Gitea\Repository**
|
||||
> extends: **Api**
|
||||
```uml
|
||||
@startuml
|
||||
class Gpg #Gold {
|
||||
|
@ -8,6 +8,7 @@
|
||||
```
|
||||
# class Refs (Details)
|
||||
> namespace: **VDM\Joomla\Gitea\Repository**
|
||||
> extends: **Api**
|
||||
```uml
|
||||
@startuml
|
||||
class Refs #Gold {
|
||||
|
@ -8,6 +8,7 @@
|
||||
```
|
||||
# class Remote (Details)
|
||||
> namespace: **VDM\Joomla\Gitea\Repository**
|
||||
> extends: **Api**
|
||||
```uml
|
||||
@startuml
|
||||
class Remote #Gold {
|
||||
|
@ -8,6 +8,7 @@
|
||||
```
|
||||
# class Activitypub (Details)
|
||||
> namespace: **VDM\Joomla\Gitea\Miscellaneous**
|
||||
> extends: **Api**
|
||||
```uml
|
||||
@startuml
|
||||
class Activitypub #Gold {
|
||||
|
@ -8,6 +8,7 @@
|
||||
```
|
||||
# class Teams (Details)
|
||||
> namespace: **VDM\Joomla\Gitea\Organization**
|
||||
> extends: **Api**
|
||||
```uml
|
||||
@startuml
|
||||
class Teams #Gold {
|
||||
|
@ -8,6 +8,7 @@
|
||||
```
|
||||
# class Labels (Details)
|
||||
> namespace: **VDM\Joomla\Gitea\Organization**
|
||||
> extends: **Api**
|
||||
```uml
|
||||
@startuml
|
||||
class Labels #Gold {
|
||||
|
@ -8,6 +8,7 @@
|
||||
```
|
||||
# class Git (Details)
|
||||
> namespace: **VDM\Joomla\Gitea\Repository\Hooks**
|
||||
> extends: **Api**
|
||||
```uml
|
||||
@startuml
|
||||
class Git #Gold {
|
||||
|
@ -8,6 +8,7 @@
|
||||
```
|
||||
# class Stopwatch (Details)
|
||||
> namespace: **VDM\Joomla\Gitea\Issue**
|
||||
> extends: **Api**
|
||||
```uml
|
||||
@startuml
|
||||
class Stopwatch #Gold {
|
||||
|
@ -8,6 +8,7 @@
|
||||
```
|
||||
# class Subscriptions (Details)
|
||||
> namespace: **VDM\Joomla\Gitea\Issue**
|
||||
> extends: **Api**
|
||||
```uml
|
||||
@startuml
|
||||
class Subscriptions #Gold {
|
||||
|
@ -8,6 +8,7 @@
|
||||
```
|
||||
# class Repository (Details)
|
||||
> namespace: **VDM\Joomla\Gitea\Organization**
|
||||
> extends: **Api**
|
||||
```uml
|
||||
@startuml
|
||||
class Repository #Gold {
|
||||
|
@ -8,6 +8,7 @@
|
||||
```
|
||||
# class Tokens (Details)
|
||||
> namespace: **VDM\Joomla\Gitea\User**
|
||||
> extends: **Api**
|
||||
```uml
|
||||
@startuml
|
||||
class Tokens #Gold {
|
||||
|
@ -8,6 +8,7 @@
|
||||
```
|
||||
# class Emails (Details)
|
||||
> namespace: **VDM\Joomla\Gitea\User**
|
||||
> extends: **Api**
|
||||
```uml
|
||||
@startuml
|
||||
class Emails #Gold {
|
||||
|
@ -8,6 +8,7 @@
|
||||
```
|
||||
# class Following (Details)
|
||||
> namespace: **VDM\Joomla\Gitea\User**
|
||||
> extends: **Api**
|
||||
```uml
|
||||
@startuml
|
||||
class Following #Gold {
|
||||
|
@ -8,6 +8,7 @@
|
||||
```
|
||||
# class User (Details)
|
||||
> namespace: **VDM\Joomla\Gitea\Organization**
|
||||
> extends: **Api**
|
||||
```uml
|
||||
@startuml
|
||||
class User #Gold {
|
||||
|
@ -8,6 +8,7 @@
|
||||
```
|
||||
# class Owner (Details)
|
||||
> namespace: **VDM\Joomla\Gitea\Package**
|
||||
> extends: **Api**
|
||||
```uml
|
||||
@startuml
|
||||
class Owner #Gold {
|
||||
|
@ -8,6 +8,7 @@
|
||||
```
|
||||
# class Subscriptions (Details)
|
||||
> namespace: **VDM\Joomla\Gitea\User**
|
||||
> extends: **Api**
|
||||
```uml
|
||||
@startuml
|
||||
class Subscriptions #Gold {
|
||||
|
@ -8,6 +8,7 @@
|
||||
```
|
||||
# class Package (Details)
|
||||
> namespace: **VDM\Joomla\Gitea**
|
||||
> extends: **Api**
|
||||
```uml
|
||||
@startuml
|
||||
class Package #Gold {
|
||||
|
@ -8,6 +8,7 @@
|
||||
```
|
||||
# class Media (Details)
|
||||
> namespace: **VDM\Joomla\Gitea\Repository**
|
||||
> extends: **Api**
|
||||
```uml
|
||||
@startuml
|
||||
class Media #Gold {
|
||||
|
@ -8,6 +8,7 @@
|
||||
```
|
||||
# class Languages (Details)
|
||||
> namespace: **VDM\Joomla\Gitea\Repository**
|
||||
> extends: **Api**
|
||||
```uml
|
||||
@startuml
|
||||
class Languages #Gold {
|
||||
|
@ -8,6 +8,7 @@
|
||||
```
|
||||
# class Members (Details)
|
||||
> namespace: **VDM\Joomla\Gitea\Organization**
|
||||
> extends: **Api**
|
||||
```uml
|
||||
@startuml
|
||||
class Members #Gold {
|
||||
|
@ -8,6 +8,7 @@
|
||||
```
|
||||
# class Teams (Details)
|
||||
> namespace: **VDM\Joomla\Gitea\User**
|
||||
> extends: **Api**
|
||||
```uml
|
||||
@startuml
|
||||
class Teams #Gold {
|
||||
|
@ -8,6 +8,7 @@
|
||||
```
|
||||
# class Keys (Details)
|
||||
> namespace: **VDM\Joomla\Gitea\User**
|
||||
> extends: **Api**
|
||||
```uml
|
||||
@startuml
|
||||
class Keys #Gold {
|
||||
|
@ -8,6 +8,7 @@
|
||||
```
|
||||
# class Teams (Details)
|
||||
> namespace: **VDM\Joomla\Gitea\Repository**
|
||||
> extends: **Api**
|
||||
```uml
|
||||
@startuml
|
||||
class Teams #Gold {
|
||||
|
@ -8,6 +8,7 @@
|
||||
```
|
||||
# class Notifications (Details)
|
||||
> namespace: **VDM\Joomla\Gitea**
|
||||
> extends: **Api**
|
||||
```uml
|
||||
@startuml
|
||||
class Notifications #Gold {
|
||||
|
@ -8,6 +8,7 @@
|
||||
```
|
||||
# class Labels (Details)
|
||||
> namespace: **VDM\Joomla\Gitea**
|
||||
> extends: **Api**
|
||||
```uml
|
||||
@startuml
|
||||
class Labels #Gold {
|
||||
|
@ -8,6 +8,7 @@
|
||||
```
|
||||
# class Tags (Details)
|
||||
> namespace: **VDM\Joomla\Gitea\Repository**
|
||||
> extends: **Api**
|
||||
```uml
|
||||
@startuml
|
||||
class Tags #Gold {
|
||||
|
@ -8,9 +8,10 @@
|
||||
```
|
||||
# final class Http (Details)
|
||||
> namespace: **VDM\Joomla\Gitea\Utilities**
|
||||
> extends: **JoomlaHttp**
|
||||
```uml
|
||||
@startuml
|
||||
class Http << (F,LightGreen) >> #Green {
|
||||
class Http << (F,LightGreen) >> #RoyalBlue {
|
||||
+ __construct(?string $token)
|
||||
+ setToken(string $token)
|
||||
}
|
||||
|
@ -8,6 +8,7 @@
|
||||
```
|
||||
# class Notes (Details)
|
||||
> namespace: **VDM\Joomla\Gitea\Repository**
|
||||
> extends: **Api**
|
||||
```uml
|
||||
@startuml
|
||||
class Notes #Gold {
|
||||
|
@ -8,6 +8,7 @@
|
||||
```
|
||||
# class Times (Details)
|
||||
> namespace: **VDM\Joomla\Gitea\Issue**
|
||||
> extends: **Api**
|
||||
```uml
|
||||
@startuml
|
||||
class Times #Gold {
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user