Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c6c4b7ebc8 |
@@ -6,6 +6,7 @@ using Novaloop.PaymoApi.Clients;
|
|||||||
using Novaloop.PaymoApi.Clients.Models;
|
using Novaloop.PaymoApi.Clients.Models;
|
||||||
using Novaloop.PaymoApi.Shared;
|
using Novaloop.PaymoApi.Shared;
|
||||||
using Novaloop.PaymoApi.Tasks;
|
using Novaloop.PaymoApi.Tasks;
|
||||||
|
using Novaloop.PaymoApi.Tasks.Models;
|
||||||
|
|
||||||
namespace Novaloop.PaymoApi.Extensions
|
namespace Novaloop.PaymoApi.Extensions
|
||||||
{
|
{
|
||||||
@@ -16,10 +17,19 @@ namespace Novaloop.PaymoApi.Extensions
|
|||||||
services.Configure(options);
|
services.Configure(options);
|
||||||
var resolvedOptions = (IOptions<ApiOptions>) services.BuildServiceProvider().GetService(typeof(IOptions<ApiOptions>));
|
var resolvedOptions = (IOptions<ApiOptions>) services.BuildServiceProvider().GetService(typeof(IOptions<ApiOptions>));
|
||||||
services.AddHttpClient<ApiClient>(client => { client.BaseAddress = new Uri(resolvedOptions.Value.BaseUrl); });
|
services.AddHttpClient<ApiClient>(client => { client.BaseAddress = new Uri(resolvedOptions.Value.BaseUrl); });
|
||||||
|
|
||||||
|
// Clients
|
||||||
services.AddTransient<IBaseApi<ClientsResponse, Client>, BaseApi<ClientsResponse, Client>>();
|
services.AddTransient<IBaseApi<ClientsResponse, Client>, BaseApi<ClientsResponse, Client>>();
|
||||||
services.AddTransient<ITasksApi, TasksApi>();
|
|
||||||
services.AddTransient<IClientContactsApi, ClientContactsApi>();
|
|
||||||
services.AddTransient<IClientsApi, ClientsApi>();
|
services.AddTransient<IClientsApi, ClientsApi>();
|
||||||
|
|
||||||
|
// Tasks
|
||||||
|
services.AddTransient<ITasksApi, TasksApi>();
|
||||||
|
services.AddTransient<IBaseApi<TasksResponse, Task>, BaseApi<TasksResponse, Task>>();
|
||||||
|
|
||||||
|
// Contacts
|
||||||
|
services.AddTransient<IClientContactsApi, ClientContactsApi>();
|
||||||
|
services.AddTransient<IBaseApi<ClientsResponse, Client>, BaseApi<ClientsResponse, Client>>();
|
||||||
|
|
||||||
return services;
|
return services;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
<PackageId>Novaloop.PaymoApi</PackageId>
|
<PackageId>Novaloop.PaymoApi</PackageId>
|
||||||
<title>Access your paymo instance for asp.net core</title>
|
<title>Access your paymo instance for asp.net core</title>
|
||||||
<PackageTags>api;paymo;asp.net core;</PackageTags>
|
<PackageTags>api;paymo;asp.net core;</PackageTags>
|
||||||
<Version>1.1.0</Version>
|
<Version>1.1.2</Version>
|
||||||
<Authors>Matthias Langhard</Authors>
|
<Authors>Matthias Langhard</Authors>
|
||||||
<Company>Novaloop AG</Company>
|
<Company>Novaloop AG</Company>
|
||||||
<PackageProjectUrl>https://gitlab.com/novaloop-oss/novaloop.paymoapi</PackageProjectUrl>
|
<PackageProjectUrl>https://gitlab.com/novaloop-oss/novaloop.paymoapi</PackageProjectUrl>
|
||||||
|
|||||||
Reference in New Issue
Block a user