Skip to content

Latest commit

 

History

History
55 lines (38 loc) · 1.93 KB

README.md

File metadata and controls

55 lines (38 loc) · 1.93 KB

NuGet

ProjectManager.com SDK for API v4

This software development kit contains all API definitions for the ProjectManager.com REST API v4.

Why use the SDK?

The ProjectManager API v4 is available as a REST definition in OpenAPI format. You can read the documentation online at developer.projectmanager.com.

This SDK provides a few capabilities that developers may find more useful than hand-writing REST API code:

  • Documentation is available in your editor via autocomplete and hover docblocks
  • Patch notes are available detailing changes
  • Implements GZip encoding and HTTPS connection pooling
  • Automated updates whenever new API endpoints are added

Using this SDK

Here's how to add this SDK to create a project.

dotnet add package ProjectManager.Sdk

To create an API client for ProjectManager, you must specify:

  • Your API key, and
  • Your environment URL.

For the ProjectManager production environment, the environment URL is https://api.projectmanager.com.

To obtain a ProjectManager.com API key:

  • Log on to ProjectManager.com
  • Click your name in the bottom left hand corner
  • Select Account, then API
  • Follow the instructions on the page to create a new API key
using System;
using ProjectManager.Sdk;

public class CSharpExample
{
    public static async ProjectManagerClient GetProjectManagerClient(string? apiKey, string? env)
    {
        return ProjectManagerClient
            .WithCustomEnvironment(env ?? Environment.GetEnvironmentVariable("PM_ENV"))
            .WithBearerToken(apiKey ?? Environment.GetEnvironmentVariable("PM_API_KEY"))
            .WithAppName("MyApplicationName");
    }
}