module Github::Users::Emails
def add_email(*args)
@github.users.add_email "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_email(*args) params = _extract_parameters(args) _normalize_params_keys(params) params['data'] = [args].flatten if args post("/user/emails", params) end
def delete_email(*args)
@github.users.delete_email "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_email(*args) params = _extract_parameters(args) _normalize_params_keys(params) params['data'] = [args].flatten delete("/user/emails", params) end
def emails(params={})
@github.users.emails { |email| ... }
@github.users.emails
@github = Github.new :oauth_token => '...'
= Examples
List email addresses for the authenticated user
def emails(params={}) _normalize_params_keys(params) response = get("/user/emails", params) return response unless block_given? response.each { |el| yield el } end