Skip to content
This repository has been archived by the owner on Nov 1, 2017. It is now read-only.

Latest commit

 

History

History
72 lines (48 loc) · 1.17 KB

users.md

File metadata and controls

72 lines (48 loc) · 1.17 KB
title
Users | GitHub API

Users API

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 than 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 %>