Sha256: bfef446aaafe2b02687ab6c7fcb2c80e9779ad4f4ad7f834c6f7cee0d1651c96

Contents?: true

Size: 723 Bytes

Versions: 3

Compression:

Stored size: 723 Bytes

Contents

module DockHealthApi
  class Task < Resource
    extend DockHealthApi::Crud::Create
    extend DockHealthApi::Crud::Delete
    extend DockHealthApi::Crud::Get
    extend DockHealthApi::Crud::Update
    extend DockHealthApi::Crud::List

    def self.list(**params)
      headers = {"x-api-key": "#{ENV["DOCK_HEALTH_API"]}", "x-user-id": "#{ENV["DOCK_USER"]}", "x-organization-id": client.config.org_id}
      execute_request(:get, "#{resource_url}", headers: headers, params: params)
    end

    class Group < Task
      def self.resource_url
        "#{Task.resource_url}/group"
      end
    end

    class Comment < Task
      def self.resource_url
        "#{Task.resource_url}/comment"
      end
    end    
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
dock_health_api-0.5.11 lib/dock_health_api/resources/task.rb
dock_health_api-0.5.10 lib/dock_health_api/resources/task.rb
dock_health_api-0.5.9 lib/dock_health_api/resources/task.rb