public_emails
Creates, updates, deletes, gets or lists a public_emails resource.
Overview
| Name | public_emails |
| Type | Resource |
| Id | github.users.public_emails |
Fields
The following fields are returned by SELECT queries:
- list_public_emails_for_authenticated_user
Response
| Name | Datatype | Description |
|---|---|---|
email | string (email) | (example: octocat@github.com) |
primary | boolean | |
verified | boolean | |
visibility | string | (example: public) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list_public_emails_for_authenticated_user | select | per_page, page | Lists your publicly visible email address, which you can set with the Set primary email visibility for the authenticated user endpoint. OAuth app tokens and personal access tokens (classic) need the user:email scope to use this endpoint. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
page | integer | The page number of the results to fetch. For more information, see "Using pagination in the REST API." |
per_page | integer | The number of results per page (max 100). For more information, see "Using pagination in the REST API." |
SELECT examples
- list_public_emails_for_authenticated_user
Lists your publicly visible email address, which you can set with the
Set primary email visibility for the authenticated user
endpoint.
OAuth app tokens and personal access tokens (classic) need the user:email scope to use this endpoint.
SELECT
email,
primary,
verified,
visibility
FROM github.users.public_emails
WHERE per_page = '{{ per_page }}'
AND page = '{{ page }}'
;