Class Github\Api\User

InheritanceGithub\Api\User » Github\Api\AbstractApi
ImplementsGithub\Api\ApiInterface

Searching users, getting user information.

Public Methods

Hide inherited methods

MethodDescriptionDefined By
__construct() Github\Api\AbstractApi
all() Request all users. Github\Api\User
configure() Github\Api\AbstractApi
find() Search users by username. Github\Api\User
followers() Request the users following a specific user. Github\Api\User
following() Request the users that a specific user is following. Github\Api\User
getPerPage() Github\Api\AbstractApi
gists() Get the public gists for a user. Github\Api\User
keys() Get the public keys for a user. Github\Api\User
organizations() Get extended information about a user by its username. Github\Api\User
publicEvents() List events performed by a user. Github\Api\User
repositories() Get the repositories of a user. Github\Api\User
setPerPage() Github\Api\AbstractApi
show() Get extended information about a user by its username. Github\Api\User
starred() Request starred repositories that a specific user has starred. Github\Api\User
subscriptions() Request the repository that a specific user is watching. Github\Api\User
watched() Request the repository that a specific user is watching. Github\Api\User

Protected Methods

Hide inherited methods

MethodDescriptionDefined By
createJsonBody() Create a JSON encoded version of an array of parameters. Github\Api\AbstractApi
delete() Send a DELETE request with JSON-encoded parameters. Github\Api\AbstractApi
get() Send a GET request with query parameters. Github\Api\AbstractApi
head() Send a HEAD request with query parameters. Github\Api\AbstractApi
patch() Send a PATCH request with JSON-encoded parameters. Github\Api\AbstractApi
post() Send a POST request with JSON-encoded parameters. Github\Api\AbstractApi
postRaw() Send a POST request with raw data. Github\Api\AbstractApi
put() Send a PUT request with JSON-encoded parameters. Github\Api\AbstractApi

Method Details

all() public method

Request all users.

public array all ( $id null )
$id int|null

ID of the last user that you've seen

return array

List of users found

find() public method

Search users by username.

public array find ( $keyword )
$keyword string

The keyword to search

return array

List of users found

followers() public method

Request the users following a specific user.

public array followers ( $username )
$username string

The username

return array

List of following users

following() public method

Request the users that a specific user is following.

public array following ( $username )
$username string

The username

return array

List of followed users

gists() public method

Get the public gists for a user.

public array gists ( $username )
$username string

The username

return array

List of the user gists

keys() public method

Get the public keys for a user.

public array keys ( $username )
$username string

The username

return array

List of the user public keys

organizations() public method

Get extended information about a user by its username.

public array organizations ( $username )
$username string

The username to show

return array

Information about organizations that user belongs to

publicEvents() public method

List events performed by a user.

public array publicEvents ( $username )
$username string
repositories() public method

Get the repositories of a user.

public array repositories ( $username, $type 'owner', $sort 'full_name', $direction 'asc' )
$username string

The username

$type string

Role in the repository

$sort string

Sort by

$direction string

Direction of sort, asc or desc

return array

List of the user repositories

show() public method

Get extended information about a user by its username.

public array show ( $username )
$username string

The username to show

return array

Informations about the user

starred() public method

Request starred repositories that a specific user has starred.

public array starred ( $username, $page 1 )
$username string

The username

$page int

The page number of the paginated result set

return array

List of starred repositories

subscriptions() public method

Request the repository that a specific user is watching.

public array subscriptions ( $username )
$username string

The username

return array

List of watched repositories

watched() public method

Request the repository that a specific user is watching.

public array watched ( $username )
$username string

The username

return array

List of watched repositories