Skip to content

WARPTechnologiesLimited/Harvest.Api

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

77 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WARP Fork

Forked to give us the ability to sign the assembly for use in Dynamics projects.

Harvest.Api

A .Net client for the Harvest API v2.

Installation

This library is hosted as a nuget package.

To install Harvest.Net, run the following command in the Package Manager Console

PM> Install-Package Harvest.Api

Usage

Create a client object:

var client = HarvestClient.FromAccessToken("user_agent", "access_token");

Call API methods

var projects = await client.GetProjectAssignmentsAsync();

Use authorization helper for OAuth2 Authorization

var client = new HarvestClient("HavestApiClient")
{
    ClientId = "<ClientId>",
    ClientSecret = "<ClientSecret>",
    RedirectUri = new Uri("http://redirect/url"),
};

var authUrl = auth.BuildAuthorizationUrl();

// open url via web browser component for WPF, Windows Forms application or redirect to this url for asp.net application

// you can use helper to parse redirect url 
var client = await client.AuthorizeAsync(callbackUri);

// OR for existing accessToken/personal access token

client.Authorize(accessToken);

// OR

var client = HarvestClient.FromAccessToken("HavestApiClient", accessToken);

Current State

Library contains all API I needed. Everything else will be added someday. Pull requests are welcome.

About

.Net client for Harvest API Version 2

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 100.0%