Skip to content

Latest commit

 

History

History
70 lines (47 loc) · 1.29 KB

authorizations.md

File metadata and controls

70 lines (47 loc) · 1.29 KB

Authorizations API

Back to the navigation

Creating, deleting and listing authorizations. Wraps GitHub Authorizations API.

List all authorizations.

$authorizations = $github->api('authorizations')->all();

Get a single authorization

$authorization = $github->api('authorizations')->show(1);

Create an authorization

$data = array(
    'note' => 'This is an optional description'
);

$authorization = $github->api('authorizations')->create($data);

Creates and returns an authorization.

Update an authorization

You can update note.

$data = array(
    'note' => 'This is new note'
);

$authorization = $github->api('authorizations')->update(1234, $data);

Delete an authorization

$authorization = $github->api('authorizations')->remove(1234);

Check an authorization

$authorization = $github->api('authorizations')->check(1234, 'token');

Reset an authorization

$authorization = $github->api('authorizations')->reset(1234, 'token');

Revoke an authorization

$github->api('authorizations')->revoke(1234, 'token');

Revoke all authorizations

$github->api('authorizations')->revokeAll(1234);