WakaTimeApi 0.6.0
dotnet add package WakaTimeApi --version 0.6.0
NuGet\Install-Package WakaTimeApi -Version 0.6.0
<PackageReference Include="WakaTimeApi" Version="0.6.0" />
paket add WakaTimeApi --version 0.6.0
#r "nuget: WakaTimeApi, 0.6.0"
// Install WakaTimeApi as a Cake Addin #addin nuget:?package=WakaTimeApi&version=0.6.0 // Install WakaTimeApi as a Cake Tool #tool nuget:?package=WakaTimeApi&version=0.6.0
Dotnet WakaTimeApi
! Currently in development !
Version 0.6.0
This is a .NET 8 library for the WakaTime API. It is a simple wrapper around the WakaTime API, which allows you to easily interact with the API.
Usage
To use the library, you'll need to get an API key from the WakaTime website.
Using Service Provider
using WakaTimeApi;
Builder.Services.AddWakaTimeApi("!!Your API Key!!");
// Your scoped service
public ctor(WakaTimeApiClient wakaTimeApi)
{
// Use the wakaTimeApi
var temp = wakaTimeApi.GetStatsResponse();
}
Using the client directly
using WakaTimeApi;
WakaTimeApiClient api = WakaTimeServiceProvider.GetWakaTimeApiClient("!!Your API Key!!");
var projects = await api.GetProjects();
Extra Information
- This library is still in development, so there are some features that are not yet implemented.
- This library uses Dotnet 8.0, so you'll need to have the Dotnet 8.0 SDK installed to use it.
- This library uses a custom
JsonSerializerContext
so it is AOT compatible.
Contributing
If you would like to contribute to this project, please feel free to fork the repository and submit a pull request.
To run the tests or the sample AOT application you'll need to put your
WakaTime API key in your local user environment variables
as WakaTimeToken
(at least for now till
I have set up everything for it to work separately).
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
-
net8.0
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 8.0.1)
- Microsoft.Extensions.Logging.Abstractions (>= 8.0.1)
- Refit (>= 7.1.1)
- Refit.HttpClientFactory (>= 7.1.1)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
0.6.0 | 106 | 6/26/2024 |
Initial Release