lib/github_api/events.rb in github_api-0.6.0 vs lib/github_api/events.rb in github_api-0.6.1

- old
+ new

@@ -14,11 +14,11 @@ # github = Github.new # github.events.public # github.events.public { |event| ... } # def public(params={}) - _normalize_params_keys(params) + normalize! params response = get_request("/events", params) return response unless block_given? response.each { |el| yield el } end @@ -34,11 +34,11 @@ # github.events.repository 'user-name', 'repo-name' { |event| ... } # def repository(user_name, repo_name, params={}) _update_user_repo_params(user_name, repo_name) _validate_user_repo_params(user, repo) unless user? && repo? - _normalize_params_keys(params) + normalize! params response = get_request("/repos/#{user}/#{repo}/events", params) return response unless block_given? response.each { |el| yield el } end @@ -55,11 +55,11 @@ # github.events.issue 'user-name', 'repo-name' { |event| ... } # def issue(user_name, repo_name, params={}) _update_user_repo_params(user_name, repo_name) _validate_user_repo_params(user, repo) unless user? && repo? - _normalize_params_keys(params) + normalize! params response = get_request("/repos/#{user}/#{repo}/issues/events", params) return response unless block_given? response.each { |el| yield el } end @@ -75,11 +75,11 @@ # github.events.network 'user-name', 'repo-name' { |event| ... } # def network(user_name, repo_name, params={}) _update_user_repo_params(user_name, repo_name) _validate_user_repo_params(user, repo) unless user? && repo? - _normalize_params_keys(params) + normalize! params response = get_request("/networks/#{user}/#{repo}/events", params) return response unless block_given? response.each { |el| yield el } end @@ -95,11 +95,11 @@ # github.events.org 'org-name' # github.events.org 'org-name' { |event| ... } # def org(org_name, params={}) _validate_presence_of org_name - _normalize_params_keys(params) + normalize! params response = get_request("/orgs/#{org_name}/events", params) return response unless block_given? response.each { |el| yield el } end @@ -126,11 +126,11 @@ # github.events.received 'user-name', :public => true # github.events.received 'user-name', :public => true { |event| ... } # def received(user_name, params={}) _validate_presence_of user_name - _normalize_params_keys(params) + normalize! params public_events = if params['public'] params.delete('public') '/public' end @@ -159,11 +159,11 @@ # github.events.performed 'user-name', :public => true # github.events.performed 'user-name', :public => true { |event| ... } # def performed(user_name, params={}) _validate_presence_of user_name - _normalize_params_keys(params) + normalize! params public_events = if params['public'] params.delete('public') '/public' end @@ -185,10 +185,10 @@ # github.events.user_org 'user-name', 'org-name' # github.events.user_org 'user-name', 'org-name' { |event| ... } # def user_org(user_name, org_name, params={}) _validate_presence_of user_name, org_name - _normalize_params_keys(params) + normalize! params response = get_request("/users/#{user_name}/events/orgs/#{org_name}", params) return response unless block_given? response.each { |el| yield el } end