Module: CleverSDK::Api::Sections
- Included in:
- CleverSDK::Api
- Defined in:
- lib/clever_sdk/api/sections.rb
Instance Method Summary collapse
- #section(access_token:, id:) ⇒ Object
- #section_course(access_token:, id:) ⇒ Object
- #section_district(access_token:, id:) ⇒ Object
- #section_resources(access_token:, id:, limit: nil, starting_after: nil, ending_before: nil) ⇒ Object
- #section_school(access_token:, id:) ⇒ Object
- #section_term(access_token:, id:) ⇒ Object
-
#section_users(access_token:, id:, role: nil, limit: nil, starting_after: nil, ending_before: nil) ⇒ Object
role - acceptable values are nil, :student, :teacher.
-
#sections(access_token:, limit: nil, starting_after: nil, ending_before: nil, count: nil) ⇒ Object
count - acceptable values are nil, :true, :false, :undefined.
Instance Method Details
#section(access_token:, id:) ⇒ Object
15 16 17 18 19 20 21 |
# File 'lib/clever_sdk/api/sections.rb', line 15 def section(access_token:, id:) get( "https://api.clever.com/v3.0/sections/#{id}", {}, bearer_headers(access_token) ) end |
#section_course(access_token:, id:) ⇒ Object
23 24 25 26 27 28 29 |
# File 'lib/clever_sdk/api/sections.rb', line 23 def section_course(access_token:, id:) get( "https://api.clever.com/v3.0/sections/#{id}/course", {}, bearer_headers(access_token) ) end |
#section_district(access_token:, id:) ⇒ Object
31 32 33 34 35 36 37 |
# File 'lib/clever_sdk/api/sections.rb', line 31 def section_district(access_token:, id:) get( "https://api.clever.com/v3.0/sections/#{id}/district", {}, bearer_headers(access_token) ) end |
#section_resources(access_token:, id:, limit: nil, starting_after: nil, ending_before: nil) ⇒ Object
39 40 41 42 43 44 45 |
# File 'lib/clever_sdk/api/sections.rb', line 39 def section_resources(access_token:, id:, limit: nil, starting_after: nil, ending_before: nil) get( "https://api.clever.com/v3.0/sections/#{id}/resources", params(limit: limit, starting_after: starting_after, ending_before: ending_before), bearer_headers(access_token) ) end |
#section_school(access_token:, id:) ⇒ Object
47 48 49 50 51 52 53 |
# File 'lib/clever_sdk/api/sections.rb', line 47 def section_school(access_token:, id:) get( "https://api.clever.com/v3.0/sections/#{id}/school", {}, bearer_headers(access_token) ) end |
#section_term(access_token:, id:) ⇒ Object
55 56 57 58 59 60 61 |
# File 'lib/clever_sdk/api/sections.rb', line 55 def section_term(access_token:, id:) get( "https://api.clever.com/v3.0/sections/#{id}/term", {}, bearer_headers(access_token) ) end |
#section_users(access_token:, id:, role: nil, limit: nil, starting_after: nil, ending_before: nil) ⇒ Object
role - acceptable values are nil, :student, :teacher
64 65 66 67 68 69 70 |
# File 'lib/clever_sdk/api/sections.rb', line 64 def section_users(access_token:, id:, role: nil, limit: nil, starting_after: nil, ending_before: nil) get( "https://api.clever.com/v3.0/sections/#{id}/users", params(role: role, limit: limit, starting_after: starting_after, ending_before: ending_before), bearer_headers(access_token) ) end |
#sections(access_token:, limit: nil, starting_after: nil, ending_before: nil, count: nil) ⇒ Object
count - acceptable values are nil, :true, :false, :undefined
7 8 9 10 11 12 13 |
# File 'lib/clever_sdk/api/sections.rb', line 7 def sections(access_token:, limit: nil, starting_after: nil, ending_before: nil, count: nil) get( "https://api.clever.com/v3.0/sections", params(limit: limit, starting_after: starting_after, ending_before: ending_before, count: count), bearer_headers(access_token) ) end |