mdissel / Harvest.Api

.Net client for Harvest API Version 2

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

zv MyGet Build Status

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 = new HarvestClient("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);

Current State

Library contains all API I needed. Everything else will be added someday.

About

.Net client for Harvest API Version 2

License:Apache License 2.0


Languages

Language:C# 100.0%