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.
array
buildFileData
(array $files)
-
array
$files: The list of file paths or filenames and content.
Method to create a gist.
object
create
(mixed $files, [boolean $public = false], [string $description = null])
-
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.
Method to create a comment on a gist.
object
createComment
(integer $gistId, string $body)
-
integer
$gistId: The gist number.
-
string
$body: The comment body text.
Method to delete a gist.
void
delete
(integer $gistId)
-
integer
$gistId: The gist number.
Method to delete a comment on a gist.
void
deleteComment
(integer $commentId)
-
integer
$commentId: The id of the comment to delete.
Method to update a gist.
object
edit
(integer $gistId, [mixed $files = null], [boolean $public = null], [string $description = null])
-
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.
Method to update a comment on a gist.
object
editComment
(integer $commentId, string $body)
-
integer
$commentId: The id of the comment to update.
-
string
$body: The new body text for the comment.
Method to fork a gist.
object
fork
(integer $gistId)
-
integer
$gistId: The gist number.
Method to get a single gist.
object
get
(integer $gistId)
-
integer
$gistId: The gist number.
Method to get a specific comment on a gist.
object
getComment
(integer $commentId)
-
integer
$commentId: The comment id to get.
Method to get the list of comments on a gist.
array
getComments
(integer $gistId, [integer $page = 0], [integer $limit = 0])
-
integer
$gistId: The gist number.
-
integer
$page: The page number from which to get items.
-
integer
$limit: The number of items on a page.
Method to list gists. If a user is authenticated it will return the user's gists, otherwise it will return all public gists.
array
getList
([integer $page = 0], [integer $limit = 0])
-
integer
$page: The page number from which to get items.
-
integer
$limit: The number of items on a page.
Method to get a list of gists belonging to a given user.
array
getListByUser
(string $user, [integer $page = 0], [integer $limit = 0])
-
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.
Method to get a list of all public gists.
array
getListPublic
([integer $page = 0], [integer $limit = 0])
-
integer
$page: The page number from which to get items.
-
integer
$limit: The number of items on a page.
Method to get a list of the authenticated users' starred gists.
array
getListStarred
([integer $page = 0], [integer $limit = 0])
-
integer
$page: The page number from which to get items.
-
integer
$limit: The number of items on a page.
Method to check if a gist has been starred.
boolean
isStarred
(integer $gistId)
-
integer
$gistId: The gist number.
Method to star a gist.
void
star
(integer $gistId)
-
integer
$gistId: The gist number.
Method to star a gist.
void
unstar
(integer $gistId)
-
integer
$gistId: The gist number.
Inherited Methods
Inherited From JGithubObject
JGithubObject::__construct()
JGithubObject::fetchUrl()
JGithubObject::processResponse()