Update 2024-07-20 22:44:12
This commit is contained in:
parent
0d3fe64dfe
commit
247c7d09ef
@ -15,6 +15,7 @@ namespace VDM\Joomla\Gitea\Abstraction;
|
||||
use VDM\Joomla\Gitea\Utilities\Http;
|
||||
use VDM\Joomla\Gitea\Utilities\Uri;
|
||||
use VDM\Joomla\Gitea\Utilities\Response;
|
||||
use VDM\Joomla\Interfaces\Git\ApiInterface;
|
||||
|
||||
|
||||
/**
|
||||
@ -22,7 +23,7 @@ use VDM\Joomla\Gitea\Utilities\Response;
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
abstract class Api
|
||||
abstract class Api implements ApiInterface
|
||||
{
|
||||
/**
|
||||
* The Http class
|
||||
|
@ -3,7 +3,9 @@
|
||||
"add_licensing_template": "2",
|
||||
"extends": "",
|
||||
"guid": "3d7af7a2-dabe-4111-b5fd-c5bfa8755469",
|
||||
"implements": null,
|
||||
"implements": [
|
||||
"17ed2fec-49d6-4731-92c3-f9cd78fb6273"
|
||||
],
|
||||
"load_selection": null,
|
||||
"name": "Api",
|
||||
"power_version": "1.0.0",
|
||||
|
@ -12,6 +12,7 @@
|
||||
namespace VDM\Joomla\Gitea\Repository;
|
||||
|
||||
|
||||
use VDM\Joomla\Interfaces\Git\Repository\ContentsInterface;
|
||||
use VDM\Joomla\Gitea\Abstraction\Api;
|
||||
|
||||
|
||||
@ -20,7 +21,7 @@ use VDM\Joomla\Gitea\Abstraction\Api;
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
class Contents extends Api
|
||||
class Contents extends Api implements ContentsInterface
|
||||
{
|
||||
/**
|
||||
* Get a file from a repository.
|
||||
@ -345,20 +346,20 @@ class Contents extends Api
|
||||
/**
|
||||
* Delete a file in a repository.
|
||||
*
|
||||
* @param string $owner The owner name.
|
||||
* @param string $repo The repository name.
|
||||
* @param string $filepath The file path.
|
||||
* @param string $message The commit message.
|
||||
* @param string $branch The branch name (optional).
|
||||
* @param string $sha The blob SHA of the file.
|
||||
* @param string $authorName The author name (optional).
|
||||
* @param string $authorEmail The author email (optional).
|
||||
* @param string $committerName The committer name (optional).
|
||||
* @param string $committerEmail The committer email (optional).
|
||||
* @param string $authorDate The author date (optional).
|
||||
* @param string $committerDate The committer date (optional).
|
||||
* @param string $newBranch The new branch name (optional).
|
||||
* @param bool $signoff Add a Signed-off-by trailer (optional).
|
||||
* @param string $owner The owner name.
|
||||
* @param string $repo The repository name.
|
||||
* @param string $filepath The file path.
|
||||
* @param string $message The commit message.
|
||||
* @param string $sha The blob SHA of the file.
|
||||
* @param string|null $branch The branch name (optional).
|
||||
* @param string|null $authorName The author name (optional).
|
||||
* @param string|null $authorEmail The author email (optional).
|
||||
* @param string|null $committerName The committer name (optional).
|
||||
* @param string|null $committerEmail The committer email (optional).
|
||||
* @param string|null $authorDate The author date (optional).
|
||||
* @param string|null $committerDate The committer date (optional).
|
||||
* @param string|null $newBranch The new branch name (optional).
|
||||
* @param bool|null $signoff Add a Signed-off-by trailer (optional).
|
||||
*
|
||||
* @return object|null
|
||||
* @since 3.2.0
|
||||
@ -449,7 +450,7 @@ class Contents extends Api
|
||||
// Send the delete request.
|
||||
return $this->response->get(
|
||||
$this->http->delete(
|
||||
$this->uri->get($path),
|
||||
$this->uri->get($path), [], null,
|
||||
json_encode($data)
|
||||
)
|
||||
);
|
||||
@ -458,10 +459,10 @@ class Contents extends Api
|
||||
/**
|
||||
* Get the EditorConfig definitions of a file in a repository.
|
||||
*
|
||||
* @param string $owner The owner name.
|
||||
* @param string $repo The repository name.
|
||||
* @param string $filepath The file path.
|
||||
* @param string $ref The name of the commit/branch/tag.
|
||||
* @param string $owner The owner name.
|
||||
* @param string $repo The repository name.
|
||||
* @param string $filepath The file path.
|
||||
* @param string|null $ref The name of the commit/branch/tag.
|
||||
*
|
||||
* @return string|null
|
||||
* @since 3.2.0
|
||||
|
@ -321,20 +321,20 @@
|
||||
/**
|
||||
* Delete a file in a repository.
|
||||
*
|
||||
* @param string $owner The owner name.
|
||||
* @param string $repo The repository name.
|
||||
* @param string $filepath The file path.
|
||||
* @param string $message The commit message.
|
||||
* @param string $branch The branch name (optional).
|
||||
* @param string $sha The blob SHA of the file.
|
||||
* @param string $authorName The author name (optional).
|
||||
* @param string $authorEmail The author email (optional).
|
||||
* @param string $committerName The committer name (optional).
|
||||
* @param string $committerEmail The committer email (optional).
|
||||
* @param string $authorDate The author date (optional).
|
||||
* @param string $committerDate The committer date (optional).
|
||||
* @param string $newBranch The new branch name (optional).
|
||||
* @param bool $signoff Add a Signed-off-by trailer (optional).
|
||||
* @param string $owner The owner name.
|
||||
* @param string $repo The repository name.
|
||||
* @param string $filepath The file path.
|
||||
* @param string $message The commit message.
|
||||
* @param string $sha The blob SHA of the file.
|
||||
* @param string|null $branch The branch name (optional).
|
||||
* @param string|null $authorName The author name (optional).
|
||||
* @param string|null $authorEmail The author email (optional).
|
||||
* @param string|null $committerName The committer name (optional).
|
||||
* @param string|null $committerEmail The committer email (optional).
|
||||
* @param string|null $authorDate The author date (optional).
|
||||
* @param string|null $committerDate The committer date (optional).
|
||||
* @param string|null $newBranch The new branch name (optional).
|
||||
* @param bool|null $signoff Add a Signed-off-by trailer (optional).
|
||||
*
|
||||
* @return object|null
|
||||
* @since 3.2.0
|
||||
@ -425,7 +425,7 @@
|
||||
// Send the delete request.
|
||||
return $this->response->get(
|
||||
$this->http->delete(
|
||||
$this->uri->get($path),
|
||||
$this->uri->get($path), [], null,
|
||||
json_encode($data)
|
||||
)
|
||||
);
|
||||
@ -434,10 +434,10 @@
|
||||
/**
|
||||
* Get the EditorConfig definitions of a file in a repository.
|
||||
*
|
||||
* @param string $owner The owner name.
|
||||
* @param string $repo The repository name.
|
||||
* @param string $filepath The file path.
|
||||
* @param string $ref The name of the commit/branch/tag.
|
||||
* @param string $owner The owner name.
|
||||
* @param string $repo The repository name.
|
||||
* @param string $filepath The file path.
|
||||
* @param string|null $ref The name of the commit/branch/tag.
|
||||
*
|
||||
* @return string|null
|
||||
* @since 3.2.0
|
||||
|
@ -3,7 +3,9 @@
|
||||
"add_licensing_template": "2",
|
||||
"extends": "3d7af7a2-dabe-4111-b5fd-c5bfa8755469",
|
||||
"guid": "8d1baef6-fcad-49a9-848f-428009cdb989",
|
||||
"implements": null,
|
||||
"implements": [
|
||||
"d1de5d5b-bf29-4031-8094-76c4f6c75900"
|
||||
],
|
||||
"load_selection": null,
|
||||
"name": "Contents",
|
||||
"power_version": "1.0.0",
|
||||
|
@ -13,7 +13,9 @@ namespace VDM\Joomla\Gitea\Utilities;
|
||||
|
||||
|
||||
use Joomla\CMS\Http\Http as JoomlaHttp;
|
||||
use Joomla\Registry\Registry;
|
||||
use Joomla\CMS\Uri\Uri;
|
||||
use Joomla\Registry\Registry;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
|
@ -15,6 +15,6 @@
|
||||
"description": "The Gitea Http\r\n\r\n@since 3.2.0",
|
||||
"extends_custom": "JoomlaHttp",
|
||||
"licensing_template": "\/**\r\n * @package Joomla.Component.Builder\r\n *\r\n * @created 4th September, 2022\r\n * @author Llewellyn van der Merwe <https:\/\/dev.vdm.io>\r\n * @git Joomla Component Builder <https:\/\/git.vdm.dev\/joomla\/Component-Builder>\r\n * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.\r\n * @license GNU General Public License version 2 or later; see LICENSE.txt\r\n *\/\r\n",
|
||||
"head": "use Joomla\\CMS\\Http\\Http as JoomlaHttp;\r\nuse Joomla\\Registry\\Registry;",
|
||||
"head": "use Joomla\\CMS\\Http\\Http as JoomlaHttp;\r\nuse Joomla\\CMS\\Uri\\Uri;\r\nuse Joomla\\Registry\\Registry;\r\n",
|
||||
"composer": ""
|
||||
}
|
Loading…
Reference in New Issue
Block a user