View Source Tentacat.Users.Keys (Tentacat v2.5.0)

Summary

Functions

Create a public key on the authorized user.

Get a single public key of the authorized user.

List public keys for a user.

List public keys for the authenticated user.

Delete a public from the authorized user.

Update a public key from the authorized user.

Functions

Link to this function

create(client, title, key)

View Source
@spec create(Tentacat.Client.t(), binary(), binary()) :: Tentacat.response()

Create a public key on the authorized user.

Example

Tentacat.Users.Keys.create(client, "title", "ssh-rsa AAA...")

More info at:http://developer.github.com/v3/users/keys/#create-a-public-key

Get a single public key of the authorized user.

Example

Tentacat.Users.Keys.find 1, client

More info at: http://developer.github.com/v3/users/keys/#get-a-single-public-key

Link to this function

list(client \\ %Client{}, user)

View Source

List public keys for a user.

Example

Tentacat.Users.Keys.list "bastos"
Tentacat.Users.Keys.list client, "bastos"

More info at: http://developer.github.com/v3/users/keys/#list-public-keys-for-a-user and http://developer.github.com/v3/users/keys/#list-your-public-keys

@spec list_mine(Tentacat.Client.t()) :: Tentacat.response()

List public keys for the authenticated user.

Example

Tentacat.Users.Keys.list_mine client

More info at: http://developer.github.com/v3/users/keys/#list-public-keys-for-a-user and http://developer.github.com/v3/users/keys/#list-your-public-keys

@spec remove(Tentacat.Client.t(), integer()) :: any()

Delete a public from the authorized user.

Example

Tentacat.Users.Keys.remove client, 123

More info at: http://developer.github.com/v3/users/keys/#delete-a-public-key

Link to this function

update(client, id, title, key)

View Source
@spec update(Tentacat.Client.t(), integer(), binary(), binary()) ::
  Tentacat.response()

Update a public key from the authorized user.

Example

Tentacat.Users.Keys.update(client, 123, "title", "ssh-rsa ...")

More info at: http://developer.github.com/v3/users/keys/#update-a-public-key