class Github::Client::Activity::Starring

Stars have no effect on notifications or the activity feed.
Stars are shown next to repositories to show an approximate level of interest.
Repository Starring is a feature that lets users bookmark repositories.

def list(*args)

Other tags:
    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)

Other tags:
    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)

Other tags:
    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)

Other tags:
    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)

Other tags:
    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