lib/github_api/users/emails.rb in github_api-0.6.0 vs lib/github_api/users/emails.rb in github_api-0.6.1
- old
+ new
@@ -10,11 +10,11 @@
# github = Github.new :oauth_token => '...'
# github.users.emails.list
# github.users.emails.list { |email| ... }
#
def list(params={})
- _normalize_params_keys(params)
+ normalize! params
response = get_request("/user/emails", params)
return response unless block_given?
response.each { |el| yield el }
end
alias :all :list
@@ -28,11 +28,11 @@
# github = Github.new :oauth_token => '...'
# github.users.emails.add "octocat@github.com", "support@github.com"
#
def add(*args)
params = args.extract_options!
- _normalize_params_keys(params)
+ normalize! params
params['data'] = args if args
post_request("/user/emails", params)
end
alias :<< :add
@@ -45,10 +45,10 @@
# github = Github.new :oauth_token => '...'
# github.users.emails.delete "octocat@github.com", "support@github.com"
#
def delete(*args)
params = args.extract_options!
- _normalize_params_keys(params)
+ normalize! params
params['data'] = args if args
delete_request("/user/emails", params)
end
end # Users::Emails