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é
Référence de la classe JGithubPackageRepositoriesDownloads
+ Graphe d'héritage de JGithubPackageRepositoriesDownloads:

Fonctions membres publiques

 getList ($owner, $repo)
 
 get ($owner, $repo, $id)
 
 create ($owner, $repo, $name, $size, $description='', $contentType='')
 
 upload ($key, $acl, $successActionStatus, $filename, $awsAccessKeyId, $policy, $signature, $contentType, $file)
 
 delete ($owner, $repo, $id)
 
- 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 Downloads class for the Joomla Platform.

The downloads API is for package downloads only. If you want to get source tarballs you should use https://developer.github.com/v3/repos/contents/#get-archive-link instead.

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

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

Documentation des fonctions membres

◆ create()

create (   $owner,
  $repo,
  $name,
  $size,
  $description = '',
  $contentType = '' 
)

Create a new download (Part 1: Create the resource).

Creating a new download is a two step process. You must first create a new download resource.

Paramètres
string$ownerThe name of the owner of the GitHub repository.
string$repoThe name of the GitHub repository.
string$nameThe name.
string$sizeSize of file in bytes.
string$descriptionThe description.
string$contentTypeThe content type.
Depuis
3.3 (CMS)
Renvoie
object

Références $data, $description, $name, et $path.

◆ delete()

delete (   $owner,
  $repo,
  $id 
)

Delete a download.

Paramètres
string$ownerThe name of the owner of the GitHub repository.
string$repoThe name of the GitHub repository.
integer$idThe id of the download.
Depuis
3.3 (CMS)
Renvoie
object

Références $id, et $path.

◆ get()

get (   $owner,
  $repo,
  $id 
)

Get a single download.

Paramètres
string$ownerThe name of the owner of the GitHub repository.
string$repoThe name of the GitHub repository.
integer$idThe id of the download.
Depuis
3.3 (CMS)
Renvoie
object

Références $id, et $path.

◆ getList()

getList (   $owner,
  $repo 
)

List downloads for a repository.

Paramètres
string$ownerThe name of the owner of the GitHub repository.
string$repoThe name of the GitHub repository.
Depuis
3.3 (CMS)
Renvoie
object

Références $path.

◆ upload()

upload (   $key,
  $acl,
  $successActionStatus,
  $filename,
  $awsAccessKeyId,
  $policy,
  $signature,
  $contentType,
  $file 
)

Create a new download (Part 2: Upload file to s3).

Now that you have created the download resource, you can use the information in the response to upload your file to s3. This can be done with a POST to the s3_url you got in the create response. Here is a brief example using curl:

curl \ -F "key=downloads/octocat/Hello-World/new_file.jpg" \ -F "acl=public-read" \ -F "success_action_status=201" \ -F "Filename=new_file.jpg" \ -F "AWSAccessKeyId=1ABCDEF..." \ -F "Policy=ewogIC..." \ -F "Signature=mwnF..." \ -F "Content-Type=image/jpeg" \ -F "file=@new_file.jpg" \ https://github.s3.amazonaws.com/

NOTES The order in which you pass these fields matters! Follow the order shown above exactly. All parameters shown are required and if you excluded or modify them your upload will fail because the values are hashed and signed by the policy.

More information about using the REST API to interact with s3 can be found here: http://docs.amazonwebservices.com/AmazonS3/latest/API/

Paramètres
string$keyValue of path field in the response.
string$aclValue of acl field in the response.
string$successActionStatus201, or whatever you want to get back.
string$filenameValue of name field in the response.
string$awsAccessKeyIdValue of accesskeyid field in the response.
string$policyValue of policy field in the response.
string$signatureValue of signature field in the response.
string$contentTypeValue of mime_type field in the response.
string$fileLocal file. Example assumes the file existing in the directory where you are running the curl command. Yes, the @ matters.
Depuis
3.3 (CMS)
Renvoie
boolean

Références $data, $file, $key, $url, et true.


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