Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/teamwork/dotnet
Teamwork API Libraries for .Net Framework and .Net Core
https://github.com/teamwork/dotnet
api-client net netcore sdk teamwork
Last synced: 3 days ago
JSON representation
Teamwork API Libraries for .Net Framework and .Net Core
- Host: GitHub
- URL: https://github.com/teamwork/dotnet
- Owner: Teamwork
- Created: 2016-05-23T20:39:32.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2022-12-08T01:43:53.000Z (almost 2 years ago)
- Last Synced: 2024-11-03T16:06:18.728Z (11 days ago)
- Topics: api-client, net, netcore, sdk, teamwork
- Language: C#
- Homepage: https://developer.teamwork.com
- Size: 20.7 MB
- Stars: 5
- Watchers: 50
- Forks: 3
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Teamwork.Net
[![Build Status](https://travis-ci.com/Teamwork/dotnet.svg?token=R12oYgGSHPyyQRhqQcMP&branch=master)](https://travis-ci.com/Teamwork/dotnet)## Legacy SDK
If you are still using or want to use our old legacy SDK, use the [Legacy Branch](https://github.com/Teamwork/dotnet/tree/legacy)
Please note that we are not updating the old sdk any more and feature are only added to the new sdk. Its highly recommended to not start new projects with the legacy sdk.## Developer Docs
If you are looking for API documentation go [here](http://developer.teamwork.com)# Usage:
Install the SDK`install-package Teamwork -IncludePrerelease`
## Authentication
Note, to get the Token and domain you need to use our [App Loginflow](https://developer.teamwork.com/projects/authentication-questions/how-to-authenticate-via-app-login-flow)When using the SDK you only need to handle the first step yourself, once you got a code back from our system you can use our helper to retrieve the final access token along with user data:
var response = await GetLoginDataAsync(code);
With that you can get an instance of the client itself:
var client = Teamwork.Client.GetTeamworkClient(
response.TokenData.Installation.Url,
response.TokenData.AccessToken, true);If you are using our legacy api key (deprecated and not recomended to use)
var client = TeamworkProjects.Client.GetTeamworkClient(apiKey, Domain,false)
## Teamwork CRM
Client Library for our newly added CRM Product. These are autogenerated from Swagger at this stage.
See [example.cs](https://github.com/Teamwork/dotnet/blob/master/Libraries/Teamwork.CRM/Example.cs) on how to use them.## Fetching Data
Fetching data is really simple, just like this:var myProjects = client.Projects.Projects.GetAllAsync()
var taskOfAProjects = client.Projects.Tasks.GetAllAsync(projectid, optional: tasklistid)## Manipulating data
You can also create or update items using the sdk, done like this:To create a new task to a project
var myNewTask = new TodoItem() {
Description = "My Task Description",
Content = "My Task Title"
};
var result = client.Projects.Projects.AddTodoItem(myNewTask);To update an existing task
// Add all fields you want to update, need the task id
var myUpdatedTask = new TodoItem() {
id = "myTaskID",
Description = "My Task Description",
Content = "My Task Title"
};result = client.Projects.Tasks.UpdateTask(myNewTask);
## Support and feedback
if you have any question, need support or have any feedback please send us a message to [[email protected]](mailto:[email protected])