Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/volodymyrbaydalka/harvest.api
.Net client for Harvest API Version 2
https://github.com/volodymyrbaydalka/harvest.api
harvestapp
Last synced: 3 months ago
JSON representation
.Net client for Harvest API Version 2
- Host: GitHub
- URL: https://github.com/volodymyrbaydalka/harvest.api
- Owner: VolodymyrBaydalka
- License: apache-2.0
- Created: 2017-10-26T16:49:25.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2023-11-15T02:18:02.000Z (about 1 year ago)
- Last Synced: 2024-10-13T14:26:51.771Z (3 months ago)
- Topics: harvestapp
- Language: C#
- Homepage:
- Size: 104 KB
- Stars: 6
- Watchers: 1
- Forks: 14
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[![NuGet](https://img.shields.io/nuget/v/Harvest.Api.svg?maxAge=43200)](https://www.nuget.org/packages/Harvest.Api)
[![Support Ukraine](https://img.shields.io/badge/Support-Ukraine-blue?style=flat&logo=adguard)](https://how-to-help-ukraine-now.super.site/)# Harvest.Api
A .Net client for the [Harvest API v2][0].
Installation
------------This library is hosted as a [nuget package][1].
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 = "",
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 StateLibrary contains all API I needed. Everything else will be added someday. Pull requests are welcome.
[0]:https://help.getharvest.com/api-v2/
[1]:https://www.nuget.org/packages/Harvest.Api/