module Bugsnag::Api::Client::CurrentUser

Methods for theCurrent User API

@see docs.bugsnagapiv2.apiary.io/#reference/current-user

Public Instance Methods

organizations(options = {}) click to toggle source

List the Current User’s Organizations

@option admin [Boolean] If only Organizations the user is an admin of should be returned @option per_page [Number] Number of results to return per-page @return [Array<Sawyer::Resource>] List of Organizations @see docs.bugsnagapiv2.apiary.io/#reference/current-user/organizations/list-the-current-user’s-organizations

# File lib/bugsnag/api/client/currentuser.rb, line 15
def organizations(options = {})
  paginate "user/organizations", options
end
projects(org_id, options = {}) click to toggle source

List the Current User’s Projects

@option sort [String] Which field to sort the results by, one of: created_at @option direction [String] Which direction to sort the results by, on of: asc, desc @option per_page [Number] Number of results to return per-page @return [Array<Sawyer::Resource>] List of Projects @see docs.bugsnagapiv2.apiary.io/#reference/current-user/organizations/list-the-current-user’s-projects

# File lib/bugsnag/api/client/currentuser.rb, line 26
def projects(org_id, options = {})
  paginate "organizations/#{org_id}/projects", options
end