|
| create ($files, $public=false, $description=null) |
|
| delete ($gistId) |
|
| edit ($gistId, $files=null, $public=null, $description=null) |
|
| fork ($gistId) |
|
| get ($gistId) |
|
| getList ($page=0, $limit=0) |
|
| getListByUser ($user, $page=0, $limit=0) |
|
| getListPublic ($page=0, $limit=0) |
|
| getListStarred ($page=0, $limit=0) |
|
| isStarred ($gistId) |
|
| star ($gistId) |
|
| unstar ($gistId) |
|
| createComment ($gistId, $body) |
|
| deleteComment ($commentId) |
|
| editComment ($commentId, $body) |
|
| getComment ($commentId) |
|
| getComments ($gistId, $page=0, $limit=0) |
|
| __get ($name) |
|
| __construct (Registry $options=null, JGithubHttp $client=null) |
|
◆ buildFileData()
buildFileData |
( |
array |
$files | ) |
|
|
protected |
Method to fetch a data array for transmitting to the GitHub API for a list of files based on an input array of file paths or filename and content pairs.
- Paramètres
-
array | $files | The list of file paths or filenames and content. |
- Exceptions
-
- Depuis
- 1.7.3
- Renvoie
- array
Références $data, $file, $files, $key, et elseif.
◆ create()
create |
( |
|
$files, |
|
|
|
$public = false , |
|
|
|
$description = null |
|
) |
| |
Method to create a gist.
- Paramètres
-
mixed | $files | Either an array of file paths or a single file path as a string. |
boolean | $public | True if the gist should be public. |
string | $description | The optional description of the gist. |
- Exceptions
-
- Depuis
- 1.7.3
- Renvoie
- object
Références $data, $description, $files, $path, et json_encode.
◆ createComment()
createComment |
( |
|
$gistId, |
|
|
|
$body |
|
) |
| |
Method to create a comment on a gist.
- Paramètres
-
integer | $gistId | The gist number. |
string | $body | The comment body text. |
- Obsolète:
- use gists->comments->create()
- Renvoie
- object
- Depuis
- 1.7.3
◆ delete()
Method to delete a gist.
- Paramètres
-
integer | $gistId | The gist number. |
- Exceptions
-
- Depuis
- 1.7.3
- Renvoie
- void
Références $path.
◆ deleteComment()
deleteComment |
( |
|
$commentId | ) |
|
Method to delete a comment on a gist.
- Paramètres
-
integer | $commentId | The id of the comment to delete. |
- Obsolète:
- use gists->comments->delete()
- Renvoie
- void
- Depuis
- 1.7.3
◆ edit()
edit |
( |
|
$gistId, |
|
|
|
$files = null , |
|
|
|
$public = null , |
|
|
|
$description = null |
|
) |
| |
Method to update a gist.
- Paramètres
-
integer | $gistId | The gist number. |
mixed | $files | Either an array of file paths or a single file path as a string. |
boolean | $public | True if the gist should be public. |
string | $description | The description of the gist. |
- Exceptions
-
- Depuis
- 1.7.3
- Renvoie
- object
Références $data, $description, $files, $path, et json_encode.
◆ editComment()
editComment |
( |
|
$commentId, |
|
|
|
$body |
|
) |
| |
Method to update a comment on a gist.
- Paramètres
-
integer | $commentId | The id of the comment to update. |
string | $body | The new body text for the comment. |
- Obsolète:
- use gists->comments->edit()
- Renvoie
- object
- Depuis
- 1.7.3
◆ fork()
Method to fork a gist.
- Paramètres
-
integer | $gistId | The gist number. |
- Exceptions
-
- Depuis
- 1.7.3
- Renvoie
- object
Références $path.
◆ get()
Method to get a single gist.
- Paramètres
-
integer | $gistId | The gist number. |
- Exceptions
-
- Depuis
- 1.7.3
- Renvoie
- object
Références $path.
◆ getComment()
Method to get a specific comment on a gist.
- Paramètres
-
integer | $commentId | The comment id to get. |
- Obsolète:
- use gists->comments->get()
- Renvoie
- object
- Depuis
- 1.7.3
◆ getComments()
getComments |
( |
|
$gistId, |
|
|
|
$page = 0 , |
|
|
|
$limit = 0 |
|
) |
| |
Method to get the list of comments on a gist.
- Paramètres
-
integer | $gistId | The gist number. |
integer | $page | The page number from which to get items. |
integer | $limit | The number of items on a page. |
- Obsolète:
- use gists->comments->getList()
- Renvoie
- array
- Depuis
- 1.7.3
Références $limit.
◆ getList()
getList |
( |
|
$page = 0 , |
|
|
|
$limit = 0 |
|
) |
| |
Method to list gists. If a user is authenticated it will return the user's gists, otherwise it will return all public gists.
- Paramètres
-
integer | $page | The page number from which to get items. |
integer | $limit | The number of items on a page. |
- Exceptions
-
- Depuis
- 1.7.3
- Renvoie
- array
Références $limit, et $path.
◆ getListByUser()
getListByUser |
( |
|
$user, |
|
|
|
$page = 0 , |
|
|
|
$limit = 0 |
|
) |
| |
Method to get a list of gists belonging to a given user.
- Paramètres
-
string | $user | The name of the GitHub user from which to list gists. |
integer | $page | The page number from which to get items. |
integer | $limit | The number of items on a page. |
- Exceptions
-
- Depuis
- 1.7.3
- Renvoie
- array
Références $limit, $path, et $user.
◆ getListPublic()
getListPublic |
( |
|
$page = 0 , |
|
|
|
$limit = 0 |
|
) |
| |
Method to get a list of all public gists.
- Paramètres
-
integer | $page | The page number from which to get items. |
integer | $limit | The number of items on a page. |
- Exceptions
-
- Depuis
- 1.7.3
- Renvoie
- array
Références $limit, et $path.
◆ getListStarred()
getListStarred |
( |
|
$page = 0 , |
|
|
|
$limit = 0 |
|
) |
| |
Method to get a list of the authenticated users' starred gists.
- Paramètres
-
integer | $page | The page number from which to get items. |
integer | $limit | The number of items on a page. |
- Exceptions
-
- Depuis
- 1.7.3
- Renvoie
- array
Références $limit, et $path.
◆ isStarred()
Method to check if a gist has been starred.
- Paramètres
-
integer | $gistId | The gist number. |
- Exceptions
-
- Depuis
- 1.7.3
- Renvoie
- boolean True if the gist is starred.
Références $path, et elseif.
◆ star()
Method to star a gist.
- Paramètres
-
integer | $gistId | The gist number. |
- Exceptions
-
- Depuis
- 1.7.3
- Renvoie
- void
Références $path.
◆ unstar()
Method to star a gist.
- Paramètres
-
integer | $gistId | The gist number. |
- Exceptions
-
- Depuis
- 1.7.3
- Renvoie
- void
Références $path.
◆ $name
◆ $packages
La documentation de cette classe a été générée à partir du fichier suivant :