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é
|
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 | |
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
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" }
string | $owner | The name of the owner of the GitHub repository. |
string | $repo | The name of the GitHub repository. |
string | $path | The content path. |
string | $ref | The String name of the Commit/Branch/Tag. Defaults to master. |
Références $path.
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
string | $owner | The name of the owner of the GitHub repository. |
string | $repo | The name of the GitHub repository. |
string | $archiveFormat | Either tarball or zipball. |
string | $ref | The String name of the Commit/Branch/Tag. Defaults to master. |
UnexpectedValueException |
Références $path.
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" }
string | $owner | The name of the owner of the GitHub repository. |
string | $repo | The name of the GitHub repository. |
string | $ref | The String name of the Commit/Branch/Tag. Defaults to master. |
Références $path.