Follow the steps below to install and use this library.
-
.NET SDK
-
ClickUp Personal Token or OAuth2 Credentials
The ClickUp API requires authentication, so you will need credentials to use this library. Visit the ClickUp authentication documentation for more info.
All you have to do is install the NuGet package into your project!
dotnet add package BIOS9.ClickUp
Replace the API key values in these examples with your own.
var apiKey = "pk_1234567_ABCDEFGHIJKLMNOPQRSTUVWXYZ12345"
var client = new ClickUpClient(apiKey);
// Get all teams that are accessible with the current API key.
var teams = await client.GetAuthorizedTeamsAsync();
Console.WriteLine("Team: " + teams.First().Name);
// Get spaces within the first team.
var spaces = await teams.First().GetSpacesAsync();
// Get folders within the first space
var folders = await spaces.First().GetFoldersAsync();
// etc... Refer to the ClickUp structure diagram below for more info on which objects you can get from the API.
var apiKey = "pk_1234567_ABCDEFGHIJKLMNOPQRSTUVWXYZ12345"
var client = new ClickUpClient(apiKey);
// Get team to create space in.
var myCoolTeam = await client.GetAuthorizedTeamsAsync().First();
// Create space with a name.
var mySpace = await myCoolTeam.CreateSpaceAsync(p =>
{
p.Name = "My brand new space";
});
Console.WriteLine(mySpace.Id);
Console.WriteLine(mySpace.Name);
var apiKey = "pk_1234567_ABCDEFGHIJKLMNOPQRSTUVWXYZ12345"
var client = new ClickUpClient(apiKey);
// Get first space in the first team.
var team = await client.GetAuthorizedTeamsAsync().First();
var mySpace = await client.GetAuthorizedTeamsAsync().First();
// Change the name of the space
await mySpace.ModifyAsync(p =>
{
p.Name = "Replacement name";
});
// The mySpace object will also have it's name updated
Console.WriteLine(mySpace.Name);
ClickUp uses the following simplified layout for objects, and this library aims to mimic it.
graph TD;
Teams-->Spaces;
Spaces-->Folders;
Spaces-->Lists;
Folders-->Lists;
Lists-->Tasks;
Distributed under the MIT License. See LICENSE.md
for more information.
- Library structure heavily inspired by Discord.Net