Skip to main content

starring

Creates, updates, deletes, gets or lists a starring resource.

Overview

Namestarring
TypeResource
Idgithub.activity.starring

Fields

The following fields are returned by SELECT queries:

Response

NameDatatypeDescription
repoobjectA repository on GitHub. (title: Repository)
starred_atstring (date-time)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_repos_starred_by_userselectusernamesort, direction, per_page, pageLists repositories a user has starred.

This endpoint supports the following custom media types. For more information, see "Media types."

- application/vnd.github.star+json: Includes a timestamp of when the star was created.
list_repos_starred_by_authenticated_userselectsort, direction, per_page, pageLists repositories the authenticated user has starred.

This endpoint supports the following custom media types. For more information, see "Media types."

- application/vnd.github.star+json: Includes a timestamp of when the star was created.
check_repo_is_starred_by_authenticated_userexecowner, repoWhether the authenticated user has starred the repository.
star_repo_for_authenticated_userexecowner, repoNote that you'll need to set Content-Length to zero when calling out to this endpoint. For more information, see "HTTP method."
unstar_repo_for_authenticated_userexecowner, repoUnstar a repository that the authenticated user has previously starred.

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.

NameDatatypeDescription
ownerstringThe account owner of the repository. The name is not case sensitive.
repostringThe name of the repository without the .git extension. The name is not case sensitive.
usernamestringThe handle for the GitHub user account.
directionstringThe direction to sort the results by.
pageintegerThe page number of the results to fetch. For more information, see "Using pagination in the REST API."
per_pageintegerThe number of results per page (max 100). For more information, see "Using pagination in the REST API."
sortstringThe property to sort the results by. created means when the repository was starred. updated means when the repository was last pushed to.

SELECT examples

Lists repositories a user has starred.

This endpoint supports the following custom media types. For more information, see "Media types."

- application/vnd.github.star+json: Includes a timestamp of when the star was created.

SELECT
repo,
starred_at
FROM github.activity.starring
WHERE username = '{{ username }}' -- required
AND sort = '{{ sort }}'
AND direction = '{{ direction }}'
AND per_page = '{{ per_page }}'
AND page = '{{ page }}'
;

Lifecycle Methods

Whether the authenticated user has starred the repository.

EXEC github.activity.starring.check_repo_is_starred_by_authenticated_user 
@owner='{{ owner }}' --required,
@repo='{{ repo }}' --required
;