Class: Bearcat::Client

Inherits:
Footrest::Client
  • Object
show all
Defined in:
lib/bearcat/client.rb,
lib/bearcat/client/tabs.rb,
lib/bearcat/client/files.rb,
lib/bearcat/client/pages.rb,
lib/bearcat/client/roles.rb,
lib/bearcat/client/users.rb,
lib/bearcat/client/groups.rb,
lib/bearcat/client/logins.rb,
lib/bearcat/client/rubric.rb,
lib/bearcat/client/search.rb,
lib/bearcat/client_module.rb,
lib/bearcat/client/courses.rb,
lib/bearcat/client/folders.rb,
lib/bearcat/client/modules.rb,
lib/bearcat/client/o_auth2.rb,
lib/bearcat/client/quizzes.rb,
lib/bearcat/client/reports.rb,
lib/bearcat/client/accounts.rb,
lib/bearcat/client/graph_ql.rb,
lib/bearcat/client/outcomes.rb,
lib/bearcat/client/sections.rb,
lib/bearcat/client/analytics.rb,
lib/bearcat/client/progresses.rb,
lib/bearcat/client/assignments.rb,
lib/bearcat/client/conferences.rb,
lib/bearcat/client/discussions.rb,
lib/bearcat/client/enrollments.rb,
lib/bearcat/client/file_helper.rb,
lib/bearcat/client/sis_imports.rb,
lib/bearcat/client/submissions.rb,
lib/bearcat/client/canvas_files.rb,
lib/bearcat/client/module_items.rb,
lib/bearcat/client/conversations.rb,
lib/bearcat/client/external_tools.rb,
lib/bearcat/client/outcome_groups.rb,
lib/bearcat/client/account_reports.rb,
lib/bearcat/client/calendar_events.rb,
lib/bearcat/client/content_exports.rb,
lib/bearcat/client/outcome_imports.rb,
lib/bearcat/client/group_categories.rb,
lib/bearcat/client/assignment_groups.rb,
lib/bearcat/client/blueprint_courses.rb,
lib/bearcat/client/group_memberships.rb,
lib/bearcat/client/learning_outcomes.rb,
lib/bearcat/client/rubric_assessment.rb,
lib/bearcat/client/content_migrations.rb,
lib/bearcat/client/rubric_association.rb,
lib/bearcat/client/custom_gradebook_columns.rb

Defined Under Namespace

Modules: AccountReports, Accounts, Analytics, AssignmentGroups, Assignments, BlueprintCourses, CalendarEvents, CanvasFiles, ClientModule, Conferences, ContentExports, ContentMigrations, Conversations, Courses, CustomGradebookColumns, Discussions, Enrollments, ExternalTools, FileHelper, Files, Folders, GraphQL, GroupCategories, GroupMemberships, Groups, LearningOutcomes, Logins, ModuleItems, Modules, OAuth2, OutcomeGroups, OutcomeImports, Outcomes, Pages, Progresses, Quizzes, Reports, Roles, Rubric, RubricAssessment, RubricAssociation, Search, Sections, SisImports, Submissions, Tabs, Users

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.registered_endpointsObject



21
22
23
24
25
26
# File 'lib/bearcat/client.rb', line 21

def self.registered_endpoints
  @registered_endpoints ||= @added_modules.reduce({}) do |h, m|
    h.merge!(m._registered_endpoints) rescue h
  end
  @registered_endpoints
end

Instance Method Details

#request(method, &block) ⇒ Object



28
29
30
31
32
33
# File 'lib/bearcat/client.rb', line 28

def request(method, &block)
  response = rate_limited_request do
    connection.send(method, &block)
  end
  ApiArray.process_response(response, self)
end

#set_connection(config) ⇒ Object



35
36
37
38
39
# File 'lib/bearcat/client.rb', line 35

def set_connection(config)
  super
  connection.builder.insert(Footrest::RaiseFootrestErrors, ExtendedRaiseFootrestErrors)
  connection.builder.delete(Footrest::RaiseFootrestErrors)
end