class Github::Client::Activity::Starring
Stars are shown next to repositories to show an approximate level of interest. # Stars have no effect on notifications or the activity feed.
Repository Starring is a feature that lets users bookmark repositories.
def list(*args)
- Api: - public
Other tags:
- See: https://developer.github.com/v3/activity/starring/#list-stargazers -
def list(*args) arguments(args, required: [:user, :repo]) response = get_request("/repos/#{arguments.user}/#{arguments.repo}/stargazers", arguments.params) return response unless block_given? response.each { |el| yield el } end
def star(*args)
- Api: - public
Other tags:
- See: https://developer.github.com/v3/activity/starring/#star-a-repository -
def star(*args) arguments(args, required: [:user, :repo]) put_request("/user/starred/#{arguments.user}/#{arguments.repo}", arguments.params) end
def starred(*args)
- Api: - public
Options Hash:
(**params)
-
:direction
(String
) -- -
:sort
(String
) --
Parameters:
-
params
(Hash
) --
Other tags:
- See: https://developer.github.com/v3/activity/starring/#list-repositories-being-starred -
def starred(*args) arguments(args) params = arguments.params response = if (user_name = params.delete('user')) get_request("/users/#{user_name}/starred", params) else get_request("/user/starred", params) end return response unless block_given? response.each { |el| yield el } end
def starring?(*args)
- Api: - public
Returns:
-
(Boolean)
-
Other tags:
- See: https://developer.github.com/v3/activity/starring/#check-if-you-are-starring-a-repository -
def starring?(*args) arguments(args, required: [:user, :repo]) get_request("/user/starred/#{arguments.user}/#{arguments.repo}", arguments.params) true rescue Github::Error::NotFound false end
def unstar(*args)
- Api: - public
Other tags:
- See: https://developer.github.com/v3/activity/starring/#unstar-a-repository -
def unstar(*args) arguments(args, required: [:user, :repo]) delete_request("/user/starred/#{arguments.user}/#{arguments.repo}", arguments.params) end