lib/github_api/repos/starring.rb in github_api-0.7.1 vs lib/github_api/repos/starring.rb in github_api-0.7.2

- old
+ new

@@ -11,11 +11,11 @@ # github = Github.new :user => 'user-name', :repo => 'repo-name' # github.repos.starring.list # github.repos.starring.list { |star| ... } # def list(user_name, repo_name, params={}) - _update_user_repo_params(user_name, repo_name) + set :user => user_name, :repo => repo_name assert_presence_of user, repo normalize! params response = get_request("/repos/#{user}/#{repo}/stargazers", params) return response unless block_given? @@ -72,10 +72,11 @@ # = Examples # github = Github.new # github.repos.starring.star 'user-name', 'repo-name' # def star(user_name, repo_name, params={}) + set :user => user_name, :repo => repo_name assert_presence_of user_name, repo_name normalize! params put_request("/user/starred/#{user_name}/#{repo_name}", params) end @@ -86,9 +87,10 @@ # = Examples # github = Github.new # github.repos.starring.unstar 'user-name', 'repo-name' # def unstar(user_name, repo_name, params={}) + set :user => user_name, :repo => repo_name assert_presence_of user_name, repo_name normalize! params delete_request("/user/starred/#{user_name}/#{repo_name}", params) end