Class: Basecamp::Services::MyAssignmentsService
- Inherits:
-
BaseService
- Object
- BaseService
- Basecamp::Services::MyAssignmentsService
- Defined in:
- lib/basecamp/generated/services/my_assignments_service.rb
Overview
Service for MyAssignments operations
Instance Method Summary collapse
-
#deprioritize_assignment(recording_id:) ⇒ void
Remove a recording from Up Next (returns 204 No Content).
-
#get_my_assignments ⇒ Hash
Get the current user's active assignments grouped into priorities and non_priorities.
-
#get_my_completed_assignments ⇒ Array<Hash>
Get the current user's completed assignments.
-
#get_my_due_assignments(scope: nil) ⇒ Array<Hash>
Get the current user's assignments filtered by due date scope.
-
#prioritize_assignment(id:) ⇒ void
Add a recording to Up Next — the current user's ordered list of prioritized.
-
#reorder_up_next(source_id:, position:) ⇒ void
Move an already-prioritized recording to a new 1-based position in Up Next.
Constructor Details
This class inherits a constructor from Basecamp::Services::BaseService
Instance Method Details
#deprioritize_assignment(recording_id:) ⇒ void
This method returns an undefined value.
Remove a recording from Up Next (returns 204 No Content). Exact-target:
49 50 51 52 53 54 |
# File 'lib/basecamp/generated/services/my_assignments_service.rb', line 49 def deprioritize_assignment(recording_id:) with_operation(service: "myassignments", operation: "deprioritize_assignment", is_mutation: true, resource_id: recording_id) do http_delete("/my/priorities/#{recording_id}") nil end end |
#get_my_assignments ⇒ Hash
Get the current user's active assignments grouped into priorities and non_priorities.
12 13 14 15 16 |
# File 'lib/basecamp/generated/services/my_assignments_service.rb', line 12 def get_my_assignments() with_operation(service: "myassignments", operation: "get_my_assignments", is_mutation: false) do http_get("/my/assignments.json", operation: "GetMyAssignments").json end end |
#get_my_completed_assignments ⇒ Array<Hash>
Get the current user's completed assignments.
20 21 22 23 24 |
# File 'lib/basecamp/generated/services/my_assignments_service.rb', line 20 def get_my_completed_assignments() with_operation(service: "myassignments", operation: "get_my_completed_assignments", is_mutation: false) do http_get("/my/assignments/completed.json", operation: "GetMyCompletedAssignments").json end end |
#get_my_due_assignments(scope: nil) ⇒ Array<Hash>
Get the current user's assignments filtered by due date scope.
30 31 32 33 34 |
# File 'lib/basecamp/generated/services/my_assignments_service.rb', line 30 def get_my_due_assignments(scope: nil) with_operation(service: "myassignments", operation: "get_my_due_assignments", is_mutation: false) do http_get("/my/assignments/due.json", params: compact_query_params(scope: scope), operation: "GetMyDueAssignments").json end end |
#prioritize_assignment(id:) ⇒ void
This method returns an undefined value.
Add a recording to Up Next — the current user's ordered list of prioritized
39 40 41 42 43 44 |
# File 'lib/basecamp/generated/services/my_assignments_service.rb', line 39 def prioritize_assignment(id:) with_operation(service: "myassignments", operation: "prioritize_assignment", is_mutation: true) do http_post("/my/priorities.json", body: compact_params(id: id)) nil end end |
#reorder_up_next(source_id:, position:) ⇒ void
This method returns an undefined value.
Move an already-prioritized recording to a new 1-based position in Up Next
60 61 62 63 64 65 |
# File 'lib/basecamp/generated/services/my_assignments_service.rb', line 60 def reorder_up_next(source_id:, position:) with_operation(service: "myassignments", operation: "reorder_up_next", is_mutation: true) do http_post("/my/priority_moves.json", body: compact_params(source_id: source_id, position: position)) nil end end |