update 2023-10-10 10:16:07

This commit is contained in:
Robot 2023-10-10 11:39:23 +02:00
parent 7d2702eb8e
commit 71bd39cb1e
Signed by: Robot
GPG Key ID: 14DECD44E7E1BB95
120 changed files with 198 additions and 57 deletions

View File

@ -8,6 +8,7 @@
``` ```
# class Organization (Details) # class Organization (Details)
> namespace: **VDM\Joomla\Gitea\Admin\Users** > namespace: **VDM\Joomla\Gitea\Admin\Users**
> extends: **Api**
```uml ```uml
@startuml @startuml
class Organization #Gold { class Organization #Gold {

View File

@ -8,6 +8,7 @@
``` ```
# class Ui (Details) # class Ui (Details)
> namespace: **VDM\Joomla\Gitea\Settings** > namespace: **VDM\Joomla\Gitea\Settings**
> extends: **Api**
```uml ```uml
@startuml @startuml
class Ui #Gold { class Ui #Gold {

View File

@ -8,6 +8,7 @@
``` ```
# class Transfer (Details) # class Transfer (Details)
> namespace: **VDM\Joomla\Gitea\Repository** > namespace: **VDM\Joomla\Gitea\Repository**
> extends: **Api**
```uml ```uml
@startuml @startuml
class Transfer #Gold { class Transfer #Gold {

View File

@ -8,6 +8,7 @@
``` ```
# class Repository (Details) # class Repository (Details)
> namespace: **VDM\Joomla\Gitea\Organization\Teams** > namespace: **VDM\Joomla\Gitea\Organization\Teams**
> extends: **Api**
```uml ```uml
@startuml @startuml
class Repository #Gold { class Repository #Gold {

View File

@ -830,7 +830,6 @@ class Repository implements ServiceProviderInterface
$container->get('Gitea.Dynamic.Uri'), $container->get('Gitea.Dynamic.Uri'),
$container->get('Gitea.Utilities.Response') $container->get('Gitea.Utilities.Response')
); );
} }
} }

View File

@ -767,4 +767,4 @@
$container->get('Gitea.Dynamic.Uri'), $container->get('Gitea.Dynamic.Uri'),
$container->get('Gitea.Utilities.Response') $container->get('Gitea.Utilities.Response')
); );
} }

View File

@ -8,6 +8,7 @@
``` ```
# class Protection (Details) # class Protection (Details)
> namespace: **VDM\Joomla\Gitea\Repository\Branch** > namespace: **VDM\Joomla\Gitea\Repository\Branch**
> extends: **Api**
```uml ```uml
@startuml @startuml
class Protection #Gold { class Protection #Gold {

View File

@ -8,6 +8,7 @@
``` ```
# class Merge (Details) # class Merge (Details)
> namespace: **VDM\Joomla\Gitea\Repository** > namespace: **VDM\Joomla\Gitea\Repository**
> extends: **Api**
```uml ```uml
@startuml @startuml
class Merge #Gold { class Merge #Gold {

View File

@ -8,6 +8,7 @@
``` ```
# class Followers (Details) # class Followers (Details)
> namespace: **VDM\Joomla\Gitea\User** > namespace: **VDM\Joomla\Gitea\User**
> extends: **Api**
```uml ```uml
@startuml @startuml
class Followers #Gold { class Followers #Gold {

View File

@ -10,7 +10,7 @@
> namespace: **VDM\Joomla\Gitea\Utilities** > namespace: **VDM\Joomla\Gitea\Utilities**
```uml ```uml
@startuml @startuml
class Response << (F,LightGreen) >> #Green { class Response << (F,LightGreen) >> #RoyalBlue {
+ get(JoomlaResponse $response, int $expectedCode = 200, ...) : mixed + get(JoomlaResponse $response, int $expectedCode = 200, ...) : mixed
+ get_(JoomlaResponse $response, array $validate = [200 => null]) : mixed + get_(JoomlaResponse $response, array $validate = [200 => null]) : mixed
# body(JoomlaResponse $response, mixed $default = null) : mixed # body(JoomlaResponse $response, mixed $default = null) : mixed

View File

@ -44,7 +44,7 @@ final class Response
// Decode the error response and throw an exception. // Decode the error response and throw an exception.
$message = $this->error($response); $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. // Decode the error response and throw an exception.
$message = $this->error($response); $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; return $error->error;
} }
elseif (isset($error->message))
{
return $error->message;
}
return ''; return '';
} }

View File

@ -18,7 +18,7 @@
// Decode the error response and throw an exception. // Decode the error response and throw an exception.
$message = $this->error($response); $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. // Decode the error response and throw an exception.
$message = $this->error($response); $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; return $error->error;
} }
elseif (isset($error->message))
{
return $error->message;
}
return ''; return '';
} }

View File

@ -8,6 +8,7 @@
``` ```
# class Patch (Details) # class Patch (Details)
> namespace: **VDM\Joomla\Gitea\Repository** > namespace: **VDM\Joomla\Gitea\Repository**
> extends: **Api**
```uml ```uml
@startuml @startuml
class Patch #Gold { class Patch #Gold {

View File

@ -8,6 +8,7 @@
``` ```
# class Comments (Details) # class Comments (Details)
> namespace: **VDM\Joomla\Gitea\Issue** > namespace: **VDM\Joomla\Gitea\Issue**
> extends: **Api**
```uml ```uml
@startuml @startuml
class Comments #Gold { class Comments #Gold {

View File

@ -8,6 +8,7 @@
``` ```
# class PublicMembers (Details) # class PublicMembers (Details)
> namespace: **VDM\Joomla\Gitea\Organization** > namespace: **VDM\Joomla\Gitea\Organization**
> extends: **Api**
```uml ```uml
@startuml @startuml
class PublicMembers #Gold { class PublicMembers #Gold {

View File

@ -8,6 +8,7 @@
``` ```
# class NodeInfo (Details) # class NodeInfo (Details)
> namespace: **VDM\Joomla\Gitea\Miscellaneous** > namespace: **VDM\Joomla\Gitea\Miscellaneous**
> extends: **Api**
```uml ```uml
@startuml @startuml
class NodeInfo #Gold { class NodeInfo #Gold {

View File

@ -8,6 +8,7 @@
``` ```
# class Times (Details) # class Times (Details)
> namespace: **VDM\Joomla\Gitea\User** > namespace: **VDM\Joomla\Gitea\User**
> extends: **Api**
```uml ```uml
@startuml @startuml
class Times #Gold { class Times #Gold {

View File

@ -8,6 +8,7 @@
``` ```
# class Keys (Details) # class Keys (Details)
> namespace: **VDM\Joomla\Gitea\Admin\Users** > namespace: **VDM\Joomla\Gitea\Admin\Users**
> extends: **Api**
```uml ```uml
@startuml @startuml
class Keys #Gold { class Keys #Gold {

View File

@ -8,6 +8,7 @@
``` ```
# class Repository (Details) # class Repository (Details)
> namespace: **VDM\Joomla\Gitea\Notifications** > namespace: **VDM\Joomla\Gitea\Notifications**
> extends: **Api**
```uml ```uml
@startuml @startuml
class Repository #Gold { class Repository #Gold {

View File

@ -8,6 +8,7 @@
``` ```
# class Unadopted (Details) # class Unadopted (Details)
> namespace: **VDM\Joomla\Gitea\Admin** > namespace: **VDM\Joomla\Gitea\Admin**
> extends: **Api**
```uml ```uml
@startuml @startuml
class Unadopted #Gold { class Unadopted #Gold {

View File

@ -8,6 +8,7 @@
``` ```
# class Attachment (Details) # class Attachment (Details)
> namespace: **VDM\Joomla\Gitea\Settings** > namespace: **VDM\Joomla\Gitea\Settings**
> extends: **Api**
```uml ```uml
@startuml @startuml
class Attachment #Gold { class Attachment #Gold {

View File

@ -15,7 +15,7 @@ abstract Api #Orange {
# Uri $uri # Uri $uri
# Response $response # Response $response
+ __construct(Http $http, Uri $uri, ...) + __construct(Http $http, Uri $uri, ...)
+ load_(string $url, string $token) : void + load_(?string $url = null, ?string $token = null) : void
} }
note right of Api::__construct note right of Api::__construct

View File

@ -67,16 +67,23 @@ abstract class Api
/** /**
* Load/Reload API. * Load/Reload API.
* *
* @param string $url The url. * @param string|null $url The url.
* @param token $token The token. * @param token|null $token The token.
* *
* @return void * @return void
* @since 3.2.0 * @since 3.2.0
**/ **/
public function load_(string $url, string $token) public function load_(?string $url = null, ?string $token = null)
{ {
$this->uri->setUrl($url); if ($url !== null)
$this->http->setToken($token); {
$this->uri->setUrl($url);
}
if ($token !== null)
{
$this->http->setToken($token);
}
} }
} }

View File

@ -41,14 +41,21 @@
/** /**
* Load/Reload API. * Load/Reload API.
* *
* @param string $url The url. * @param string|null $url The url.
* @param token $token The token. * @param token|null $token The token.
* *
* @return void * @return void
* @since 3.2.0 * @since 3.2.0
**/ **/
public function load_(string $url, string $token) public function load_(?string $url = null, ?string $token = null)
{ {
$this->uri->setUrl($url); if ($url !== null)
$this->http->setToken($token); {
$this->uri->setUrl($url);
}
if ($token !== null)
{
$this->http->setToken($token);
}
} }

View File

@ -8,6 +8,7 @@
``` ```
# class Mirrors (Details) # class Mirrors (Details)
> namespace: **VDM\Joomla\Gitea\Repository** > namespace: **VDM\Joomla\Gitea\Repository**
> extends: **Api**
```uml ```uml
@startuml @startuml
class Mirrors #Gold { class Mirrors #Gold {

View File

@ -8,6 +8,7 @@
``` ```
# class Hooks (Details) # class Hooks (Details)
> namespace: **VDM\Joomla\Gitea\Repository** > namespace: **VDM\Joomla\Gitea\Repository**
> extends: **Api**
```uml ```uml
@startuml @startuml
class Hooks #Gold { class Hooks #Gold {

View File

@ -8,6 +8,7 @@
``` ```
# class Repository (Details) # class Repository (Details)
> namespace: **VDM\Joomla\Gitea\Admin\Users** > namespace: **VDM\Joomla\Gitea\Admin\Users**
> extends: **Api**
```uml ```uml
@startuml @startuml
class Repository #Gold { class Repository #Gold {

View File

@ -8,6 +8,7 @@
``` ```
# class Files (Details) # class Files (Details)
> namespace: **VDM\Joomla\Gitea\Package** > namespace: **VDM\Joomla\Gitea\Package**
> extends: **Api**
```uml ```uml
@startuml @startuml
class Files #Gold { class Files #Gold {

View File

@ -8,6 +8,7 @@
``` ```
# class User (Details) # class User (Details)
> namespace: **VDM\Joomla\Gitea** > namespace: **VDM\Joomla\Gitea**
> extends: **Api**
```uml ```uml
@startuml @startuml
class User #Gold { class User #Gold {

View File

@ -8,6 +8,7 @@
``` ```
# class Applications (Details) # class Applications (Details)
> namespace: **VDM\Joomla\Gitea\User** > namespace: **VDM\Joomla\Gitea\User**
> extends: **Api**
```uml ```uml
@startuml @startuml
class Applications #Gold { class Applications #Gold {

View File

@ -8,6 +8,7 @@
``` ```
# class Stargazers (Details) # class Stargazers (Details)
> namespace: **VDM\Joomla\Gitea\Repository** > namespace: **VDM\Joomla\Gitea\Repository**
> extends: **Api**
```uml ```uml
@startuml @startuml
class Stargazers #Gold { class Stargazers #Gold {

View File

@ -8,6 +8,7 @@
``` ```
# class Keys (Details) # class Keys (Details)
> namespace: **VDM\Joomla\Gitea\Repository** > namespace: **VDM\Joomla\Gitea\Repository**
> extends: **Api**
```uml ```uml
@startuml @startuml
class Keys #Gold { class Keys #Gold {

View File

@ -8,6 +8,7 @@
``` ```
# class Settings (Details) # class Settings (Details)
> namespace: **VDM\Joomla\Gitea\User** > namespace: **VDM\Joomla\Gitea\User**
> extends: **Api**
```uml ```uml
@startuml @startuml
class Settings #Gold { class Settings #Gold {

View File

@ -8,6 +8,7 @@
``` ```
# class Wiki (Details) # class Wiki (Details)
> namespace: **VDM\Joomla\Gitea\Repository** > namespace: **VDM\Joomla\Gitea\Repository**
> extends: **Api**
```uml ```uml
@startuml @startuml
class Wiki #Gold { class Wiki #Gold {

View File

@ -8,6 +8,7 @@
``` ```
# class Gpg (Details) # class Gpg (Details)
> namespace: **VDM\Joomla\Gitea\Miscellaneous** > namespace: **VDM\Joomla\Gitea\Miscellaneous**
> extends: **Api**
```uml ```uml
@startuml @startuml
class Gpg #Gold { class Gpg #Gold {

View File

@ -8,6 +8,7 @@
``` ```
# class Issue (Details) # class Issue (Details)
> namespace: **VDM\Joomla\Gitea** > namespace: **VDM\Joomla\Gitea**
> extends: **Api**
```uml ```uml
@startuml @startuml
class Issue #Gold { class Issue #Gold {

View File

@ -8,6 +8,7 @@
``` ```
# class Api (Details) # class Api (Details)
> namespace: **VDM\Joomla\Gitea\Settings** > namespace: **VDM\Joomla\Gitea\Settings**
> extends: **BaseAPI**
```uml ```uml
@startuml @startuml
class Api #Gold { class Api #Gold {

View File

@ -8,6 +8,7 @@
``` ```
# class Organizations (Details) # class Organizations (Details)
> namespace: **VDM\Joomla\Gitea\Admin** > namespace: **VDM\Joomla\Gitea\Admin**
> extends: **Api**
```uml ```uml
@startuml @startuml
class Organizations #Gold { class Organizations #Gold {

View File

@ -8,6 +8,7 @@
``` ```
# class Statuses (Details) # class Statuses (Details)
> namespace: **VDM\Joomla\Gitea\Repository** > namespace: **VDM\Joomla\Gitea\Repository**
> extends: **Api**
```uml ```uml
@startuml @startuml
class Statuses #Gold { class Statuses #Gold {

View File

@ -8,6 +8,7 @@
``` ```
# class Hooks (Details) # class Hooks (Details)
> namespace: **VDM\Joomla\Gitea\Organization** > namespace: **VDM\Joomla\Gitea\Organization**
> extends: **Api**
```uml ```uml
@startuml @startuml
class Hooks #Gold { class Hooks #Gold {

View File

@ -8,6 +8,7 @@
``` ```
# class Deadline (Details) # class Deadline (Details)
> namespace: **VDM\Joomla\Gitea\Issue** > namespace: **VDM\Joomla\Gitea\Issue**
> extends: **Api**
```uml ```uml
@startuml @startuml
class Deadline #Gold { class Deadline #Gold {

View File

@ -10,7 +10,7 @@
> namespace: **VDM\Joomla\Gitea\Utilities** > namespace: **VDM\Joomla\Gitea\Utilities**
```uml ```uml
@startuml @startuml
class Uri << (F,LightGreen) >> #Green { class Uri << (F,LightGreen) >> #RoyalBlue {
- string $endpoint - string $endpoint
- string $version - string $version
- string $url - string $url

View File

@ -107,7 +107,7 @@ final class Uri
**/ **/
public function setUrl(string $url) public function setUrl(string $url)
{ {
return $this->url = $url; $this->url = $url;
} }
/** /**
@ -120,7 +120,7 @@ final class Uri
**/ **/
private function setEndpoint(string $endpoint) private function setEndpoint(string $endpoint)
{ {
return $this->endpoint = $endpoint; $this->endpoint = $endpoint;
} }
/** /**
@ -133,7 +133,7 @@ final class Uri
**/ **/
private function setVersion($version) private function setVersion($version)
{ {
return $this->version = $version; $this->version = $version;
} }
} }

View File

@ -83,7 +83,7 @@
**/ **/
public function setUrl(string $url) public function setUrl(string $url)
{ {
return $this->url = $url; $this->url = $url;
} }
/** /**
@ -96,7 +96,7 @@
**/ **/
private function setEndpoint(string $endpoint) private function setEndpoint(string $endpoint)
{ {
return $this->endpoint = $endpoint; $this->endpoint = $endpoint;
} }
/** /**
@ -109,5 +109,5 @@
**/ **/
private function setVersion($version) private function setVersion($version)
{ {
return $this->version = $version; $this->version = $version;
} }

View File

@ -8,6 +8,7 @@
``` ```
# class Comments (Details) # class Comments (Details)
> namespace: **VDM\Joomla\Gitea\Issue\Repository** > namespace: **VDM\Joomla\Gitea\Issue\Repository**
> extends: **Api**
```uml ```uml
@startuml @startuml
class Comments #Gold { class Comments #Gold {

View File

@ -8,6 +8,7 @@
``` ```
# class Reviewers (Details) # class Reviewers (Details)
> namespace: **VDM\Joomla\Gitea\Repository** > namespace: **VDM\Joomla\Gitea\Repository**
> extends: **Api**
```uml ```uml
@startuml @startuml
class Reviewers #Gold { class Reviewers #Gold {

View File

@ -8,6 +8,7 @@
``` ```
# class Assignees (Details) # class Assignees (Details)
> namespace: **VDM\Joomla\Gitea\Repository** > namespace: **VDM\Joomla\Gitea\Repository**
> extends: **Api**
```uml ```uml
@startuml @startuml
class Assignees #Gold { class Assignees #Gold {

View File

@ -8,6 +8,7 @@
``` ```
# class Attachments (Details) # class Attachments (Details)
> namespace: **VDM\Joomla\Gitea\Repository** > namespace: **VDM\Joomla\Gitea\Repository**
> extends: **Api**
```uml ```uml
@startuml @startuml
class Attachments #Gold { class Attachments #Gold {

View File

@ -8,6 +8,7 @@
``` ```
# class Reviews (Details) # class Reviews (Details)
> namespace: **VDM\Joomla\Gitea\Repository** > namespace: **VDM\Joomla\Gitea\Repository**
> extends: **Api**
```uml ```uml
@startuml @startuml
class Reviews #Gold { class Reviews #Gold {

View File

@ -8,6 +8,7 @@
``` ```
# class Cron (Details) # class Cron (Details)
> namespace: **VDM\Joomla\Gitea\Admin** > namespace: **VDM\Joomla\Gitea\Admin**
> extends: **Api**
```uml ```uml
@startuml @startuml
class Cron #Gold { class Cron #Gold {

View File

@ -66,7 +66,6 @@ class Utilities implements ServiceProviderInterface
public function getResponse(Container $container): Response public function getResponse(Container $container): Response
{ {
return new Response(); return new Response();
} }
} }

View File

@ -39,4 +39,4 @@
public function getResponse(Container $container): Response public function getResponse(Container $container): Response
{ {
return new Response(); return new Response();
} }

View File

@ -78,7 +78,6 @@ class Gitea implements ServiceProviderInterface
return new Http( return new Http(
$container->get('Config')->get('gitea_token') $container->get('Config')->get('gitea_token')
); );
} }
} }

View File

@ -51,4 +51,4 @@
return new Http( return new Http(
$container->get('Config')->get('gitea_token') $container->get('Config')->get('gitea_token')
); );
} }

View File

@ -8,6 +8,7 @@
``` ```
# class Comment (Details) # class Comment (Details)
> namespace: **VDM\Joomla\Gitea\Issue\Reactions** > namespace: **VDM\Joomla\Gitea\Issue\Reactions**
> extends: **Api**
```uml ```uml
@startuml @startuml
class Comment #Gold { class Comment #Gold {

View File

@ -8,6 +8,7 @@
``` ```
# class Releases (Details) # class Releases (Details)
> namespace: **VDM\Joomla\Gitea\Repository** > namespace: **VDM\Joomla\Gitea\Repository**
> extends: **Api**
```uml ```uml
@startuml @startuml
class Releases #Gold { class Releases #Gold {

View File

@ -8,6 +8,7 @@
``` ```
# class Trees (Details) # class Trees (Details)
> namespace: **VDM\Joomla\Gitea\Repository** > namespace: **VDM\Joomla\Gitea\Repository**
> extends: **Api**
```uml ```uml
@startuml @startuml
class Trees #Gold { class Trees #Gold {

View File

@ -8,6 +8,7 @@
``` ```
# class Topics (Details) # class Topics (Details)
> namespace: **VDM\Joomla\Gitea\Repository** > namespace: **VDM\Joomla\Gitea\Repository**
> extends: **Api**
```uml ```uml
@startuml @startuml
class Topics #Gold { class Topics #Gold {

View File

@ -8,6 +8,7 @@
``` ```
# class Version (Details) # class Version (Details)
> namespace: **VDM\Joomla\Gitea\Miscellaneous** > namespace: **VDM\Joomla\Gitea\Miscellaneous**
> extends: **Api**
```uml ```uml
@startuml @startuml
class Version #Gold { class Version #Gold {

View File

@ -8,6 +8,7 @@
``` ```
# class Forks (Details) # class Forks (Details)
> namespace: **VDM\Joomla\Gitea\Repository** > namespace: **VDM\Joomla\Gitea\Repository**
> extends: **Api**
```uml ```uml
@startuml @startuml
class Forks #Gold { class Forks #Gold {

View File

@ -8,6 +8,7 @@
``` ```
# class Timeline (Details) # class Timeline (Details)
> namespace: **VDM\Joomla\Gitea\Issue** > namespace: **VDM\Joomla\Gitea\Issue**
> extends: **Api**
```uml ```uml
@startuml @startuml
class Timeline #Gold { class Timeline #Gold {

View File

@ -8,6 +8,7 @@
``` ```
# class Starred (Details) # class Starred (Details)
> namespace: **VDM\Joomla\Gitea\User** > namespace: **VDM\Joomla\Gitea\User**
> extends: **Api**
```uml ```uml
@startuml @startuml
class Starred #Gold { class Starred #Gold {

View File

@ -8,6 +8,7 @@
``` ```
# class Archive (Details) # class Archive (Details)
> namespace: **VDM\Joomla\Gitea\Repository** > namespace: **VDM\Joomla\Gitea\Repository**
> extends: **Api**
```uml ```uml
@startuml @startuml
class Archive #Gold { class Archive #Gold {

View File

@ -8,6 +8,7 @@
``` ```
# class Templates (Details) # class Templates (Details)
> namespace: **VDM\Joomla\Gitea\Repository** > namespace: **VDM\Joomla\Gitea\Repository**
> extends: **Api**
```uml ```uml
@startuml @startuml
class Templates #Gold { class Templates #Gold {

View File

@ -8,6 +8,7 @@
``` ```
# class Contents (Details) # class Contents (Details)
> namespace: **VDM\Joomla\Gitea\Repository** > namespace: **VDM\Joomla\Gitea\Repository**
> extends: **Api**
```uml ```uml
@startuml @startuml
class Contents #Gold { class Contents #Gold {
@ -97,8 +98,8 @@ note right of Contents::update
string $filepath string $filepath
string $content string $content
string $message string $message
string $branch = 'master'
string $sha string $sha
string $branch = 'master'
?string $authorName = null ?string $authorName = null
?string $authorEmail = null ?string $authorEmail = null
?string $committerName = null ?string $committerName = null

View File

@ -205,16 +205,19 @@ class Contents extends Api
// Build the request path. // Build the request path.
$path = "/repos/{$owner}/{$repo}/contents"; $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. // Add the 'ref' parameter if it's provided.
if ($ref !== null) if ($ref !== null)
{ {
$this->uri->setVar('ref', $ref); $uri->setVar('ref', $ref);
} }
// Send the get request. // Send the get request.
return $this->response->get( return $this->response->get(
$this->http->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 $filepath The file path.
* @param string $content The file content. * @param string $content The file content.
* @param string $message The commit message. * @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 $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 $authorName The author name. Defaults to the authenticated user.
* @param string|null $authorEmail The author email. 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. * @param string|null $committerName The committer name. Defaults to the authenticated user.
@ -248,8 +251,8 @@ class Contents extends Api
string $filepath, string $filepath,
string $content, string $content,
string $message, string $message,
string $branch = 'master',
string $sha, string $sha,
string $branch = 'master',
?string $authorName = null, ?string $authorName = null,
?string $authorEmail = null, ?string $authorEmail = null,
?string $committerName = null, ?string $committerName = null,
@ -503,7 +506,6 @@ class Contents extends Api
$this->uri->get($path) $this->uri->get($path)
) )
); );
} }
} }

View File

@ -181,16 +181,19 @@
// Build the request path. // Build the request path.
$path = "/repos/{$owner}/{$repo}/contents"; $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. // Add the 'ref' parameter if it's provided.
if ($ref !== null) if ($ref !== null)
{ {
$this->uri->setVar('ref', $ref); $uri->setVar('ref', $ref);
} }
// Send the get request. // Send the get request.
return $this->response->get( return $this->response->get(
$this->http->get( $this->http->get(
$this->uri->get($path) $uri
) )
); );
} }
@ -203,8 +206,8 @@
* @param string $filepath The file path. * @param string $filepath The file path.
* @param string $content The file content. * @param string $content The file content.
* @param string $message The commit message. * @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 $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 $authorName The author name. Defaults to the authenticated user.
* @param string|null $authorEmail The author email. 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. * @param string|null $committerName The committer name. Defaults to the authenticated user.
@ -224,8 +227,8 @@
string $filepath, string $filepath,
string $content, string $content,
string $message, string $message,
string $branch = 'master',
string $sha, string $sha,
string $branch = 'master',
?string $authorName = null, ?string $authorName = null,
?string $authorEmail = null, ?string $authorEmail = null,
?string $committerName = null, ?string $committerName = null,
@ -479,4 +482,4 @@
$this->uri->get($path) $this->uri->get($path)
) )
); );
} }

View File

@ -8,6 +8,7 @@
``` ```
# class Organization (Details) # class Organization (Details)
> namespace: **VDM\Joomla\Gitea** > namespace: **VDM\Joomla\Gitea**
> extends: **Api**
```uml ```uml
@startuml @startuml
class Organization #Gold { class Organization #Gold {

View File

@ -8,6 +8,7 @@
``` ```
# class Markdown (Details) # class Markdown (Details)
> namespace: **VDM\Joomla\Gitea\Miscellaneous** > namespace: **VDM\Joomla\Gitea\Miscellaneous**
> extends: **Api**
```uml ```uml
@startuml @startuml
class Markdown #Gold { class Markdown #Gold {

View File

@ -8,6 +8,7 @@
``` ```
# class Branch (Details) # class Branch (Details)
> namespace: **VDM\Joomla\Gitea\Repository** > namespace: **VDM\Joomla\Gitea\Repository**
> extends: **Api**
```uml ```uml
@startuml @startuml
class Branch #Gold { class Branch #Gold {

View File

@ -8,6 +8,7 @@
``` ```
# class Watchers (Details) # class Watchers (Details)
> namespace: **VDM\Joomla\Gitea\Repository** > namespace: **VDM\Joomla\Gitea\Repository**
> extends: **Api**
```uml ```uml
@startuml @startuml
class Watchers #Gold { class Watchers #Gold {

View File

@ -8,6 +8,7 @@
``` ```
# class Gpg (Details) # class Gpg (Details)
> namespace: **VDM\Joomla\Gitea\Repository** > namespace: **VDM\Joomla\Gitea\Repository**
> extends: **Api**
```uml ```uml
@startuml @startuml
class Gpg #Gold { class Gpg #Gold {

View File

@ -8,6 +8,7 @@
``` ```
# class Refs (Details) # class Refs (Details)
> namespace: **VDM\Joomla\Gitea\Repository** > namespace: **VDM\Joomla\Gitea\Repository**
> extends: **Api**
```uml ```uml
@startuml @startuml
class Refs #Gold { class Refs #Gold {

View File

@ -8,6 +8,7 @@
``` ```
# class Remote (Details) # class Remote (Details)
> namespace: **VDM\Joomla\Gitea\Repository** > namespace: **VDM\Joomla\Gitea\Repository**
> extends: **Api**
```uml ```uml
@startuml @startuml
class Remote #Gold { class Remote #Gold {

View File

@ -8,6 +8,7 @@
``` ```
# class Activitypub (Details) # class Activitypub (Details)
> namespace: **VDM\Joomla\Gitea\Miscellaneous** > namespace: **VDM\Joomla\Gitea\Miscellaneous**
> extends: **Api**
```uml ```uml
@startuml @startuml
class Activitypub #Gold { class Activitypub #Gold {

View File

@ -8,6 +8,7 @@
``` ```
# class Teams (Details) # class Teams (Details)
> namespace: **VDM\Joomla\Gitea\Organization** > namespace: **VDM\Joomla\Gitea\Organization**
> extends: **Api**
```uml ```uml
@startuml @startuml
class Teams #Gold { class Teams #Gold {

View File

@ -8,6 +8,7 @@
``` ```
# class Labels (Details) # class Labels (Details)
> namespace: **VDM\Joomla\Gitea\Organization** > namespace: **VDM\Joomla\Gitea\Organization**
> extends: **Api**
```uml ```uml
@startuml @startuml
class Labels #Gold { class Labels #Gold {

View File

@ -8,6 +8,7 @@
``` ```
# class Git (Details) # class Git (Details)
> namespace: **VDM\Joomla\Gitea\Repository\Hooks** > namespace: **VDM\Joomla\Gitea\Repository\Hooks**
> extends: **Api**
```uml ```uml
@startuml @startuml
class Git #Gold { class Git #Gold {

View File

@ -8,6 +8,7 @@
``` ```
# class Stopwatch (Details) # class Stopwatch (Details)
> namespace: **VDM\Joomla\Gitea\Issue** > namespace: **VDM\Joomla\Gitea\Issue**
> extends: **Api**
```uml ```uml
@startuml @startuml
class Stopwatch #Gold { class Stopwatch #Gold {

View File

@ -8,6 +8,7 @@
``` ```
# class Subscriptions (Details) # class Subscriptions (Details)
> namespace: **VDM\Joomla\Gitea\Issue** > namespace: **VDM\Joomla\Gitea\Issue**
> extends: **Api**
```uml ```uml
@startuml @startuml
class Subscriptions #Gold { class Subscriptions #Gold {

View File

@ -8,6 +8,7 @@
``` ```
# class Repository (Details) # class Repository (Details)
> namespace: **VDM\Joomla\Gitea\Organization** > namespace: **VDM\Joomla\Gitea\Organization**
> extends: **Api**
```uml ```uml
@startuml @startuml
class Repository #Gold { class Repository #Gold {

View File

@ -8,6 +8,7 @@
``` ```
# class Tokens (Details) # class Tokens (Details)
> namespace: **VDM\Joomla\Gitea\User** > namespace: **VDM\Joomla\Gitea\User**
> extends: **Api**
```uml ```uml
@startuml @startuml
class Tokens #Gold { class Tokens #Gold {

View File

@ -8,6 +8,7 @@
``` ```
# class Emails (Details) # class Emails (Details)
> namespace: **VDM\Joomla\Gitea\User** > namespace: **VDM\Joomla\Gitea\User**
> extends: **Api**
```uml ```uml
@startuml @startuml
class Emails #Gold { class Emails #Gold {

View File

@ -8,6 +8,7 @@
``` ```
# class Following (Details) # class Following (Details)
> namespace: **VDM\Joomla\Gitea\User** > namespace: **VDM\Joomla\Gitea\User**
> extends: **Api**
```uml ```uml
@startuml @startuml
class Following #Gold { class Following #Gold {

View File

@ -8,6 +8,7 @@
``` ```
# class User (Details) # class User (Details)
> namespace: **VDM\Joomla\Gitea\Organization** > namespace: **VDM\Joomla\Gitea\Organization**
> extends: **Api**
```uml ```uml
@startuml @startuml
class User #Gold { class User #Gold {

View File

@ -8,6 +8,7 @@
``` ```
# class Owner (Details) # class Owner (Details)
> namespace: **VDM\Joomla\Gitea\Package** > namespace: **VDM\Joomla\Gitea\Package**
> extends: **Api**
```uml ```uml
@startuml @startuml
class Owner #Gold { class Owner #Gold {

View File

@ -8,6 +8,7 @@
``` ```
# class Subscriptions (Details) # class Subscriptions (Details)
> namespace: **VDM\Joomla\Gitea\User** > namespace: **VDM\Joomla\Gitea\User**
> extends: **Api**
```uml ```uml
@startuml @startuml
class Subscriptions #Gold { class Subscriptions #Gold {

View File

@ -8,6 +8,7 @@
``` ```
# class Package (Details) # class Package (Details)
> namespace: **VDM\Joomla\Gitea** > namespace: **VDM\Joomla\Gitea**
> extends: **Api**
```uml ```uml
@startuml @startuml
class Package #Gold { class Package #Gold {

View File

@ -8,6 +8,7 @@
``` ```
# class Media (Details) # class Media (Details)
> namespace: **VDM\Joomla\Gitea\Repository** > namespace: **VDM\Joomla\Gitea\Repository**
> extends: **Api**
```uml ```uml
@startuml @startuml
class Media #Gold { class Media #Gold {

View File

@ -8,6 +8,7 @@
``` ```
# class Languages (Details) # class Languages (Details)
> namespace: **VDM\Joomla\Gitea\Repository** > namespace: **VDM\Joomla\Gitea\Repository**
> extends: **Api**
```uml ```uml
@startuml @startuml
class Languages #Gold { class Languages #Gold {

View File

@ -8,6 +8,7 @@
``` ```
# class Members (Details) # class Members (Details)
> namespace: **VDM\Joomla\Gitea\Organization** > namespace: **VDM\Joomla\Gitea\Organization**
> extends: **Api**
```uml ```uml
@startuml @startuml
class Members #Gold { class Members #Gold {

View File

@ -8,6 +8,7 @@
``` ```
# class Teams (Details) # class Teams (Details)
> namespace: **VDM\Joomla\Gitea\User** > namespace: **VDM\Joomla\Gitea\User**
> extends: **Api**
```uml ```uml
@startuml @startuml
class Teams #Gold { class Teams #Gold {

View File

@ -8,6 +8,7 @@
``` ```
# class Keys (Details) # class Keys (Details)
> namespace: **VDM\Joomla\Gitea\User** > namespace: **VDM\Joomla\Gitea\User**
> extends: **Api**
```uml ```uml
@startuml @startuml
class Keys #Gold { class Keys #Gold {

View File

@ -8,6 +8,7 @@
``` ```
# class Teams (Details) # class Teams (Details)
> namespace: **VDM\Joomla\Gitea\Repository** > namespace: **VDM\Joomla\Gitea\Repository**
> extends: **Api**
```uml ```uml
@startuml @startuml
class Teams #Gold { class Teams #Gold {

View File

@ -8,6 +8,7 @@
``` ```
# class Notifications (Details) # class Notifications (Details)
> namespace: **VDM\Joomla\Gitea** > namespace: **VDM\Joomla\Gitea**
> extends: **Api**
```uml ```uml
@startuml @startuml
class Notifications #Gold { class Notifications #Gold {

View File

@ -8,6 +8,7 @@
``` ```
# class Labels (Details) # class Labels (Details)
> namespace: **VDM\Joomla\Gitea** > namespace: **VDM\Joomla\Gitea**
> extends: **Api**
```uml ```uml
@startuml @startuml
class Labels #Gold { class Labels #Gold {

View File

@ -8,6 +8,7 @@
``` ```
# class Tags (Details) # class Tags (Details)
> namespace: **VDM\Joomla\Gitea\Repository** > namespace: **VDM\Joomla\Gitea\Repository**
> extends: **Api**
```uml ```uml
@startuml @startuml
class Tags #Gold { class Tags #Gold {

View File

@ -8,9 +8,10 @@
``` ```
# final class Http (Details) # final class Http (Details)
> namespace: **VDM\Joomla\Gitea\Utilities** > namespace: **VDM\Joomla\Gitea\Utilities**
> extends: **JoomlaHttp**
```uml ```uml
@startuml @startuml
class Http << (F,LightGreen) >> #Green { class Http << (F,LightGreen) >> #RoyalBlue {
+ __construct(?string $token) + __construct(?string $token)
+ setToken(string $token) + setToken(string $token)
} }

View File

@ -8,6 +8,7 @@
``` ```
# class Notes (Details) # class Notes (Details)
> namespace: **VDM\Joomla\Gitea\Repository** > namespace: **VDM\Joomla\Gitea\Repository**
> extends: **Api**
```uml ```uml
@startuml @startuml
class Notes #Gold { class Notes #Gold {

View File

@ -8,6 +8,7 @@
``` ```
# class Times (Details) # class Times (Details)
> namespace: **VDM\Joomla\Gitea\Issue** > namespace: **VDM\Joomla\Gitea\Issue**
> extends: **Api**
```uml ```uml
@startuml @startuml
class Times #Gold { class Times #Gold {

Some files were not shown because too many files have changed in this diff Show More