class

Harvest::Service

Inherits Reference < Object

A Harvest client.

Constants

BASE_URI = URI.parse("https://api.harvestapp.com/v2/")

Constructors

new(account_id : String, token : String)
Source

Instance methods

get(path : String, klass : HarvestResponse.class, params : URI::Params | Nil = nil, &)

Perform a GET request on the given path.

Handles pagination and yields the klass to the block for each page.

Source
projects(updated_since : Time | Nil = nil)

Get projects.

Source
projects(updated_since : Time | Nil = nil, &)

Get projects.

Source
tasks(updated_since : Time | Nil = nil)

Get tasks.

Source
tasks(updated_since : Time | Nil = nil, &)

Get tasks.

Source
time_entries(*, from : Time | Nil = nil, to : Time | Nil = nil, user : Int | String | User | UserRef | Nil = nil, updated_since : Time | Nil = nil)

Get time entries.

Entries can be limited by from, to and user.

Source
time_entries(*, from : Time | Nil = nil, to : Time | Nil = nil, user : Int | String | User | UserRef | Nil = nil, updated_since : Time | Nil = nil, &)

Get time entries.

Entries can be limited by from, to and user.

Source
users(*, is_active : Bool = false, updated_since : Time | Nil = nil)

Get users.

Users can be limited to active users.

Source
users(*, is_active : Bool = false, updated_since : Time | Nil = nil, &)

Get users.

Users can be limited to active users.

Source