lib/github_api/client/activity/starring.rb in github_api-0.13.0 vs lib/github_api/client/activity/starring.rb in github_api-0.13.1

- old
+ new

@@ -1,10 +1,11 @@ # encoding: utf-8 module Github # Repository Starring is a feature that lets users bookmark repositories. - # Stars are shown next to repositories to show an approximate level of interest. # Stars have no effect on notifications or the activity feed. + # Stars are shown next to repositories to show an approximate level of interest. + # Stars have no effect on notifications or the activity feed. class Client::Activity::Starring < API # List stargazers # # @see https://developer.github.com/v3/activity/starring/#list-stargazers # @@ -19,11 +20,11 @@ response = get_request("/repos/#{arguments.user}/#{arguments.repo}/stargazers", arguments.params) return response unless block_given? response.each { |el| yield el } end - alias :all :list + alias_method :all, :list # List repos being starred by a user # # @see https://developer.github.com/v3/activity/starring/#list-repositories-being-starred # @@ -52,17 +53,16 @@ params = arguments.params response = if (user_name = params.delete('user')) get_request("/users/#{user_name}/starred", params) else - get_request("/user/starred", params) + get_request('/user/starred', params) end return response unless block_given? response.each { |el| yield el } end # Check if you are starring a repository - # # # @see https://developer.github.com/v3/activity/starring/#check-if-you-are-starring-a-repository # # @example # github = Github.new