class Wawka::Harvest

Public Instance Methods

time_entries(from:, to:, page: 1) click to toggle source
# File lib/wawka/harvest.rb, line 6
def time_entries(from:, to:, page: 1)
  self.class.get('/v2/time_entries', headers: headers, query: { from: from, to: to, per_page: 100, page: page })
end

Private Instance Methods

headers() click to toggle source
# File lib/wawka/harvest.rb, line 12
def headers
  {
    'Authorization' => 'Bearer ' + Wawka.config.dig('harvest', 'token'),
    'Harvest-Account-Id' => Wawka.config.dig('harvest', 'account_id').to_s,
    'User-Agent' => 'KakaDemona'
  }
end