This repository has been archived on 2025-05-19 . You can view files and clone it. You cannot open issues or pull requests or push a commit.
1.1.3
Novaloop.PaymoApi - Accessing Paymo Api
Novaloop.PaymoApi allows to access the paymo API within your .net projects.
Disclaimer
This library is an early state. Not a lot of api endpoints have been implemented. But it is set on solid grounds and hopefully will grow in the future. Don't shy away to open an issue or write a pull request for an endpoint you need.
Implemented Methods
- Get all existing Tasks
- Get an existing Task
- Create a new Task
Getting Started
Startup.cs
The api client is added with the following configuration inside ConfigureServices.
See https://github.com/paymoapp/api/blob/master/sections/authentication.md#using-sessions for how to acquire an api key.
public void ConfigureServices(IServiceCollection services)
{
services.AddPaymoApi(options =>
{
options.ApiKey = "your-api-key";
});
services.AddControllers();
}
Usage
Now the Api Services can be injected via dependency injection inside controllers / services:
[ApiController]
[Route("[controller]")]
public class ExampleController : ControllerBase
{
private readonly IPaymoTaskApiService _paymoTaskService;
public ExampleController(IPaymoTaskApiService paymoTaskService)
{
_paymoTaskService = paymoTaskService;
}
[HttpGet]
public async Task<IActionResult> Get()
{
return Ok(await _paymoTaskService.GetTask(11));
}
}
Description
Languages
C#
99.8%
Shell
0.2%