Wom.Net
1.0.1-rc2
dotnet add package Wom.Net --version 1.0.1-rc2
NuGet\Install-Package Wom.Net -Version 1.0.1-rc2
<PackageReference Include="Wom.Net" Version="1.0.1-rc2" />
<PackageVersion Include="Wom.Net" Version="1.0.1-rc2" />
<PackageReference Include="Wom.Net" />
paket add Wom.Net --version 1.0.1-rc2
#r "nuget: Wom.Net, 1.0.1-rc2"
#:package Wom.Net@1.0.1-rc2
#addin nuget:?package=Wom.Net&version=1.0.1-rc2&prerelease
#tool nuget:?package=Wom.Net&version=1.0.1-rc2&prerelease
Wom.Net
A comprehensive .NET wrapper for the WiseOldMan API, providing easy access to Old School RuneScape player tracking and statistics.
Overview
Wom.Net is a modern, fully-featured .NET library for interacting with the WiseOldMan API. This library allows developers to easily integrate OSRS player tracking, group management, and competition features into their .NET applications.
For more info use the WiseOldMan API Docs.
Features
- Complete coverage of the WiseOldMan REST API
- Strong typing for all API responses
- Result pattern using Functional.Sharp
- Dependency Injection ready with
Microsoft.Extensions.DependencyInjection
integration
Installation
.NET CLI
dotnet add package Wom.Net
Quick Start
using Functional.Sharp.Monads;
using Wom.Net;
using Wom.Net.Extensions;
using Microsoft.Extensions.DependencyInjection;
using Wom.Net.Services.Players.Entities;
// Setup dependency injection
var services = new ServiceCollection();
services.AddWiseOldMan();
// Build service provider and get the client
var serviceProvider = services.BuildServiceProvider();
var womClient = serviceProvider.GetRequiredService<IWiseOldManService>();
// Search for a player
Result<IEnumerable<Player>> playerSearchResult = await womClient.Players.Search("zezima");
playerSearchResult.Match(
players => Console.WriteLine($"Found {players.Count()} players"),
err => Console.WriteLine($"Error searching players: {err.Message}")
);
Authentication
Providing an API key will increase rate limits, more info can be found here API Keys:
services.AddWiseOldMan(options => {
options.ApiKey = "your-api-key-here"; // Optional
options.DiscordUsername = "YourDiscordName"; // Optional
});
Usage Examples
Players
// Get player details
Result<IEnumerable<Player>> playerSearchResult = await womClient.Players.Search("zezima");
Advanced Configuration
Result Handling
The library uses Results instead of exceptions for different API error scenarios:
Result<PlayerDetails> playerDetailsResult = await womClient.Players.GetPlayerDetails("non-existent-player");
playerDetailsResult.Match(
player => // use player here,
err => err switch {
NotFoundError => Console.WriteLine($"Player not found: {err.Message}"),
_ => Console.WriteLine($"API error: {err.Message}")
}
);
Support
- Open an issue
- (TODO) Documentation
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your branch using semantic branch names (
git checkout -b feat/amazing-feature
) - Commit your changes (
git commit -m 'feat: add some amazing feature'
) - Push to the branch (
git push origin feat/amazing-feature
) - Open a Pull Request
License
This project is licensed under the MIT License - see the LICENSE file for details.
Acknowledgments
- WiseOldMan for their excellent OSRS tracking platform and API
- The Old School RuneScape community
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. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net8.0
- Functional.Sharp (>= 2.6.0)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 9.0.3)
- Microsoft.Extensions.Http (>= 9.0.3)
- Microsoft.Extensions.Http.Polly (>= 9.0.3)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.