A .Net wrapper for Harvest API.
This project is intended to simplify using the Harvest API in your .Net project by
-
hiding the complexity of setting up the HTTP Web Requests and endpoints.
-
seamlessly deal with Harvests’ API throttle limit.
-
and having acceptance test coverage.
This version currently covers all “Project” service requests and “client” service requests, other requests maybe added in the future but you can extend IHarvestService.cs and IHarvestService.cs to handle more of the API.
In addition in the source code there’s also a POCO project that uses this project that is very easy to extend if you don’t want to deal with any XML.
@_Simon_Jackson www.prosperity247.com
This solution expects the following to be installed:
-
Visual Studio 2010
-
Compile the HarvestApi into a DLL
-
Add a reference to the DLL in your project
-
Create an instance of the service and call the API methods
var connectionInfo = new HarvestApi.Service.HarvestConnection("https://YOUR_SUB_DOMAIN.harvestapp.com","[email protected]","YourPassword"); var service = new HarvestApi.Service.HarvestService(connectionInfo); string xml = service.GetProjects();
The acceptance tests use SpecFlow with MSTest so that they can be run within Visual Studio. You will need to setup your credentials in the HarvestApiSpec/App.Config
Edit HarvestApiSpec/App.Config and update the XXXX placeholders with your Harvest account information.
<appSettings> <add key="HarvestUri" value="https://XXXX.harvestapp.com/"/> <add key="Username" value="[email protected]"/> <add key="Password" value="XXXX"/> </appSettings>
In Visual Studio’s Solution Explorer, Right Click HarvestApiSpec and select “Run Unit Tests”
The following is a list of future tasks for this project
-
Implement more of the API
Harvest is Time Tracking & Online Invoicing Application. Harvest lets you and your staff track time and send invoices from one integrated application. Get set up in just a few minutes and instantly start tracking time and invoicing your clients. Contractor and employee timesheet and timesheet approval is included. Use Harvest’s visual reports to see the distribution of your company’s resources at a glance. Create an online invoice and easily bill your client. Get paid faster by collecting online payments from your clients instantly and securely via the web. Give Harvest a try today to lower your payroll costs and improve your business today.