Joomla CMS  3.10.11 (avec JPlatform 13.1 inclus)
Documentation des API du CMS Joomla en version 3.10.11 et du framework Joomla Platform intégré
Tout Structures de données Espaces de nommage Fichiers Fonctions Variables Pages
Référence de la classe JGithubPackageRepositoriesContents
+ Graphe d'héritage de JGithubPackageRepositoriesContents:

Fonctions membres publiques

 getReadme ($owner, $repo, $ref='')
 
 get ($owner, $repo, $path, $ref='')
 
 getArchiveLink ($owner, $repo, $archiveFormat='zipball', $ref='')
 
- Fonctions membres publiques hérités de JGithubPackage
 __get ($name)
 
- Fonctions membres publiques hérités de JGithubObject
 __construct (Registry $options=null, JGithubHttp $client=null)
 

Membres hérités additionnels

- Fonctions membres protégées hérités de JGithubObject
 fetchUrl ($path, $page=0, $limit=0)
 
 processResponse (JHttpResponse $response, $expectedCode=200, $decode=true)
 
- Attributs protégés hérités de JGithubPackage
 $name = ''
 
 $packages = array()
 
- Attributs protégés hérités de JGithubObject
 $options
 
 $client
 

Description détaillée

GitHub API Repositories Contents class for the Joomla Platform.

These API methods let you retrieve the contents of files within a repository as Base64 encoded content. See media types for requesting raw or other formats.

https://developer.github.com/v3/repos/contents

Depuis
1.7.3
Obsolète:
4.0 Use the joomla/github package via Composer instead

Documentation des fonctions membres

◆ get()

get (   $owner,
  $repo,
  $path,
  $ref = '' 
)

Get contents

This method returns the contents of any file or directory in a repository.

GET /repos/:owner/:repo/contents/:path

Parameters

path Optional string - The content path. ref Optional string - The String name of the Commit/Branch/Tag. Defaults to master.

Response

Status: 200 OK X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999

{ "type": "file", "encoding": "base64", "_links": { "git": "https://api.github.com/repos/octokit/octokit.rb/git/blobs/3d21ec53a331a6f037a91c368710b99387d012c1", "self": "https://api.github.com/repos/octokit/octokit.rb/contents/README.md", "html": "https://github.com/octokit/octokit.rb/blob/master/README.md" }, "size": 5362, "name": "README.md", "path": "README.md", "content": "encoded content ...", "sha": "3d21ec53a331a6f037a91c368710b99387d012c1" }

Paramètres
string$ownerThe name of the owner of the GitHub repository.
string$repoThe name of the GitHub repository.
string$pathThe content path.
string$refThe String name of the Commit/Branch/Tag. Defaults to master.
Depuis
3.3 (CMS)
Renvoie
object

Références $path.

◆ getArchiveLink()

getArchiveLink (   $owner,
  $repo,
  $archiveFormat = 'zipball',
  $ref = '' 
)

Get archive link

This method will return a 302 to a URL to download a tarball or zipball archive for a repository. Please make sure your HTTP framework is configured to follow redirects or you will need to use the Location header to make a second GET request.

Note: For private repositories, these links are temporary and expire quickly.

GET /repos/:owner/:repo/:archive_format/:ref

Parameters

archive_format Either tarball or zipball ref Optional string - valid Git reference, defaults to master

Response

Status: 302 Found Location: http://github.com/me/myprivate/tarball/master?SSO=thistokenexpires X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999

To follow redirects with curl, use the -L switch:

curl -L https://api.github.com/repos/octokit/octokit.rb/tarball > octokit.tar.gz

Paramètres
string$ownerThe name of the owner of the GitHub repository.
string$repoThe name of the GitHub repository.
string$archiveFormatEither tarball or zipball.
string$refThe String name of the Commit/Branch/Tag. Defaults to master.
Exceptions
UnexpectedValueException
Depuis
3.3 (CMS)
Renvoie
object

Références $path.

◆ getReadme()

getReadme (   $owner,
  $repo,
  $ref = '' 
)

Get the README

This method returns the preferred README for a repository.

GET /repos/:owner/:repo/readme

Parameters

ref Optional string - The String name of the Commit/Branch/Tag. Defaults to master.

Response

Status: 200 OK X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999

{ "type": "file", "encoding": "base64", "_links": { "git": "https://api.github.com/repos/octokit/octokit.rb/git/blobs/3d21ec53a331a6f037a91c368710b99387d012c1", "self": "https://api.github.com/repos/octokit/octokit.rb/contents/README.md", "html": "https://github.com/octokit/octokit.rb/blob/master/README.md" }, "size": 5362, "name": "README.md", "path": "README.md", "content": "encoded content ...", "sha": "3d21ec53a331a6f037a91c368710b99387d012c1" }

Paramètres
string$ownerThe name of the owner of the GitHub repository.
string$repoThe name of the GitHub repository.
string$refThe String name of the Commit/Branch/Tag. Defaults to master.
Depuis
3.3 (CMS)
Renvoie
object

Références $path.


La documentation de cette classe a été générée à partir du fichier suivant :