class Github::Users::Emails
def add(*args)
github.users.emails.add "octocat@github.com", "support@github.com"
github = Github.new :oauth_token => '...'
= Examples
You can include a single email address or an array of addresses
= Inputs
Add email address(es) for the authenticated user
def add(*args) arguments(args) params = arguments.params params['data'] = arguments.remaining unless arguments.remaining.empty? post_request("/user/emails", params) end
def delete(*args)
github.users.emails.delete "octocat@github.com", "support@github.com"
github = Github.new :oauth_token => '...'
= Examples
You can include a single email address or an array of addresses
= Inputs
Delete email address(es) for the authenticated user
def delete(*args) arguments(args) params = arguments.params params['data'] = arguments.remaining unless arguments.remaining.empty? delete_request("/user/emails", params) end
def list(*args)
github.users.emails.list { |email| ... }
github.users.emails.list
github = Github.new :oauth_token => '...'
= Examples
List email addresses for the authenticated user
def list(*args) arguments(args) response = get_request("/user/emails", arguments.params) return response unless block_given? response.each { |el| yield el } end