Sha256: fb6d3f0fff0e0c59d7580db254bb288cf8dda872644e40ad5700bd67c601ad0b

Contents?: true

Size: 639 Bytes

Versions: 9

Compression:

Stored size: 639 Bytes

Contents

# typed: false
#
module Researchable
  module FreedcampApi
    class UpdateTask < Endpoint
      integer :task_id, default: 44_509_132
      object :task, class: Researchable::FreedcampApi::Structs::Task

      def execute
        update_task(task_id, task)
      end

      sig do
        params(
          task_id: Integer,
          task: Researchable::FreedcampApi::Structs::Task
        ).returns(
          T::Array[Researchable::FreedcampApi::Structs::Task]
        )
      end
      def update_task(task_id, task)
        result = session.post("/tasks/#{task_id}", task)
        result['data']['tasks']
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
researchable-freedcamp-api-0.1.8 lib/researchable/freedcamp_api/update_task.rb
researchable-freedcamp-api-0.1.7 lib/researchable/freedcamp_api/update_task.rb
researchable-freedcamp-api-0.1.6 lib/researchable/freedcamp_api/update_task.rb
researchable-freedcamp-api-0.1.5 lib/researchable/freedcamp_api/update_task.rb
researchable-freedcamp-api-0.1.4 lib/researchable/freedcamp_api/update_task.rb
researchable-freedcamp-api-0.1.3 lib/researchable/freedcamp_api/update_task.rb
researchable-freedcamp-api-0.1.2 lib/researchable/freedcamp_api/update_task.rb
researchable-freedcamp-api-0.1.1 lib/researchable/freedcamp_api/update_task.rb
researchable-freedcamp-api-0.1.0 lib/researchable/freedcamp_api/update_task.rb