Moves the Pro features into the Public version of JCB.
This commit is contained in:
50
libraries/jcb_powers/VDM.Gitea/src/Package/Repo/File.php
Normal file
50
libraries/jcb_powers/VDM.Gitea/src/Package/Repo/File.php
Normal file
@@ -0,0 +1,50 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Component.Builder
|
||||
*
|
||||
* @created 30th April, 2015
|
||||
* @author Llewellyn van der Merwe <http://www.joomlacomponentbuilder.com>
|
||||
* @gitea Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
|
||||
* @github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder>
|
||||
* @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
namespace VDM\Gitea\Package\Repo;
|
||||
|
||||
|
||||
use Joomla\CMS\Http\Http;
|
||||
use Joomla\Registry\Registry;
|
||||
use VDM\Gitea\AbstractPackage;
|
||||
|
||||
|
||||
/**
|
||||
* Start looking here:
|
||||
* https://git.vdm.dev/api/swagger#/repository/repoGetContents
|
||||
*/
|
||||
class File extends AbstractPackage
|
||||
{
|
||||
/**
|
||||
* Gets the metadata and contents (if a file) of an entry in a repository, or a list of entries if a dir
|
||||
*
|
||||
* @param string $owner Repository owner.
|
||||
* @param string $repo Repository name.
|
||||
* @param string $filepath Repository file path.
|
||||
*
|
||||
* @return object
|
||||
*
|
||||
* @since 1.0
|
||||
*/
|
||||
public function get($owner, $repo, $filepath)
|
||||
{
|
||||
// Build the request path.
|
||||
$path = '/repos/' . $owner . '/' . $repo . '/contents/' . $filepath;
|
||||
|
||||
// Send the request.
|
||||
return $this->processResponse(
|
||||
$this->client->get($this->fetchUrl($path))
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user