Class: Basecamp::Services::MyAssignmentsService

Inherits:
BaseService
  • Object
show all
Defined in:
lib/basecamp/generated/services/my_assignments_service.rb

Overview

Service for MyAssignments operations

Instance Method Summary collapse

Constructor Details

This class inherits a constructor from Basecamp::Services::BaseService

Instance Method Details

#get_my_assignmentsHash

Get the current user's active assignments grouped into priorities and non_priorities.

Returns:

  • (Hash)

    response data



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").json
  end
end

#get_my_completed_assignmentsHash

Get the current user's completed assignments.

Returns:

  • (Hash)

    response data



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").json
  end
end

#get_my_due_assignments(scope: nil) ⇒ Hash

Get the current user's assignments filtered by due date scope.

Parameters:

  • scope (String, nil) (defaults to: nil)

    Filter by due date range: overdue, due_today, due_tomorrow, due_later_this_week, due_next_week, due_later

Returns:

  • (Hash)

    response data



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)).json
  end
end