{"repo":"fastruby/harvesting","free":true,"listed":false,"github":"https://github.com/fastruby/harvesting","clone":"git clone https://github.com/fastruby/harvesting.git","description":"Ruby wrapper for the Harvest API v2","language":"Ruby","stars":29,"topics":["harvest-api","harvest","rubygems","ruby","gem","api","api-wrapper"],"license":"MIT","category":"api-integrations-sdks","readme_excerpt":"Harvesting A Ruby gem to interact with the Harvest API v2.0 and forward. Installation Add this line to your application's Gemfile: And then execute: $ bundle Or install it yourself as: $ gem install harvesting Documentation The API is documented here Usage In order to start using this gem you will need your personal token and an account id: Identity You can find these details over here: https://id.getharvest.com/developers If you don't specify values for access token or account id , it will default to these environment variables: ENV['HARVEST ACCESS TOKEN'] ENV['HARVEST ACCOUNT ID'] That means that you could build a client like this: If you don't specify a valid combination of token and account id, your code will raise this error: If your personal token and account id are valid, you should see something like this: Clients Time Entries Tasks Projects Invoices An invoice can have many line items: You can filter invoices by various attributes. E.g. client.invoices(state: \"draft\") only returns invoices in a draft state. Nested Attributes The Harvest v2 API embeds some data in JSON objects. You can access nested attributes quite naturally. For example, to access the user id for a time entry instance, entry , use: Or to access the name of the client on a project instance, project : Tips Deleting All Items When you need to delete all items, care needs to be taken, because the API uses pagination. The following code will only delete data from every other page. While iterating over it","default_branch":null,"files":null,"tree":[],"storefront":"/r/fastruby","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/fastruby/harvesting/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}