Sha256: 6266fb9939164db21ccf66a7844c1668eec1db875a92bfe03b6bb8120a879038

Contents?: true

Size: 1 KB

Versions: 1

Compression:

Stored size: 1 KB

Contents

module Teamwork
  class Client

    module Timer

      # GET recent time entries
      # options:
      #   page: UnsignedInt
      #   fromdate: YYYYMMDD
      #   fromtime: HH:MM
      #   todate: YYYYMMDD
      #   totime: HH:MM
      #   sortorder: (ASC, DESC) (defaults to ascending order by date (oldest to newest))
      # Return [Teamwork::Thing]
      def time_entries(options = {})
        objects_from_response(:get, "time_entries", "time-entries", options)
      end


      # GET a single time entry
      # Return Teamwork::Thing
      def time_entry(id)
        object_from_response(:get, "time_entries/#{id}", "time-entry")
      end

      # PUT a single time entry
      # Return Teamwork::Thing
      def update_time_entry(options = {})
        object_from_response(:put, "time_entries/#{id}", "time-entry", "time-entry" => options)
      end

      # DELETE a single time entry
      # Return boolean
      def delete_time_entry(id)
        send(:delete, "time_entries/#{id}")
      end

    end

  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
teamworkpm-2.0.0 lib/teamwork/client/timer.rb