Skip to content

Latest commit

 

History

History
75 lines (50 loc) · 1.19 KB

File metadata and controls

75 lines (50 loc) · 1.19 KB
title Users | GitHub API

Users API

  • TOC {:toc}

Many of the resources on the users API provide a shortcut for getting information about the currently authenticated user. If a request URL does not include a :user parameter then the response will be for the logged in user (and you must pass authentication information with your request).

Get a single user

GET /users/:user

Response

<%= headers 200 %> <%= json :full_user %>

Get the authenticated user

GET /user

Response

<%= headers 200 %> <%= json :private_user %>

Update the authenticated user

PATCH /user

Input

name : Optional string

email : Optional string - Publicly visible email address.

blog : Optional string

company : Optional string

location : Optional string

hireable : Optional boolean

bio : Optional string

<%= json
:name => "monalisa octocat", :email => "octocat@github.com", :blog => "https://github.com/blog", :company => "GitHub", :location => "San Francisco", :hireable => true, :bio => "There once..." %>

Response

<%= headers 200 %> <%= json :private_user %>