Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sir-photch/powerliftingsharp
C# Wrapper for OpenPowerlifting API
https://github.com/sir-photch/powerliftingsharp
csharp dotnet powerlifting wrapper
Last synced: about 1 month ago
JSON representation
C# Wrapper for OpenPowerlifting API
- Host: GitHub
- URL: https://github.com/sir-photch/powerliftingsharp
- Owner: Sir-Photch
- License: mpl-2.0
- Created: 2022-02-20T21:24:04.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2022-03-04T09:11:45.000Z (almost 3 years ago)
- Last Synced: 2023-03-02T16:31:31.131Z (almost 2 years ago)
- Topics: csharp, dotnet, powerlifting, wrapper
- Language: C#
- Homepage:
- Size: 335 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Lightweight! C# Wrapper for OpenPowerlifting API
Built with .NET 6.0 and available on [nuget](https://www.nuget.org/packages/PowerliftingSharp/)
Currently, querying unique identifiers of athletes and returning their recorded data is supported.
Feel free to fork this repo or open an issue if you miss a feature!## How to get started
```csharp
using PowerliftingSharp;
using PowerliftingSharp.Types;using PLClient client = new();
string nameToBeFound = "Andrey Malanichev";
(string foundName, string identifier)? query = await client.QueryName(nameToBeFound);
if (query is null || query.Value.foundName != nameToBeFound)
return;
Athlete? andrey;
try
{
andrey = await client.GetAthleteByIdentifierAsync(query.Value.identifier);
}
catch (Exception e)
{
// request was not successful, or, an internal error has occurred.
}
```For reference, see [OPL data service](https://openpowerlifting.gitlab.io/opl-csv/) and the official [Gitlab repo](https://gitlab.com/openpowerlifting/opl-data).