Modrinth.RestClient
3.0.0-rc.1
Suggested Alternatives
Additional Details
This package is deprecated. Please use the new package "Modrinth.Net" instead. It has the same base functionality, but with a new name and namespace.
How to upgrade is explained in the README.md file of the new package in the "Upgrade from 2.X.X to 3.0.0" section for Modrinth.Net version 3.0.1.
This is a prerelease version of Modrinth.RestClient.
The owner has unlisted this package.
This could mean that the package is deprecated, has security vulnerabilities or shouldn't be used anymore.
dotnet add package Modrinth.RestClient --version 3.0.0-rc.1
NuGet\Install-Package Modrinth.RestClient -Version 3.0.0-rc.1
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Modrinth.RestClient" Version="3.0.0-rc.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Modrinth.RestClient --version 3.0.0-rc.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Modrinth.RestClient, 3.0.0-rc.1"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Modrinth.RestClient as a Cake Addin
#addin nuget:?package=Modrinth.RestClient&version=3.0.0-rc.1&prerelease
// Install Modrinth.RestClient as a Cake Tool
#tool nuget:?package=Modrinth.RestClient&version=3.0.0-rc.1&prerelease
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Modrinth.RestClient
- Modrinth API wrapper using RestEase library
⚠️ Project is currently undergoing major rewrite to version 3.0.0 ⚠️
- Versions ❤️.0.0 are not supported anymore as there will be breaking changes in the future, but they work for now.
- I don't recommend using alpha versions, but if you want to, you can find them on NuGet - but be aware that they will change a lot.
Usage
- Install the NuGet package
Version 3.0.0
using Modrinth.RestClient;
// You must provide a user-agent, and optionally an authentication token if you wish to access authenticated API endpoints
var client = new ModrinthClient(userAgent: "My_Awesome_Project" , token: "Your_Authentication_Token");
var project = await client.Project.GetAsync("sodium");
Console.WriteLine(project.Description);
How does version 3.0.0 differ from 2.X.X?
- Dropped use of
RestEase
library- It's a great library, but it was not really suited for this project
- Currently using Flurl library to create and send requests
- Not using 1 big API class anymore, but rather multiple smaller ones - for each endpoint
- To provide more unified experience, there is a
ModrinthClient
class, which contains all the smaller API classes - It's easier to use, as it will be more similar to the API specification
- Instead of
client.GetProjectAsync("sodium")
you will doclient.Project.GetAsync("sodium")
- Instead of
- To provide more unified experience, there is a
- It's set up to be easily extendable
- All methods will be unit tested
- It has the foundation for authenticated API endpoints, some of them are already implemented
Version 2.X.X
- All methods are asynchronous
using Modrinth.RestClient;
// Modrinth recommends to set a uniquely-identifying user-agent
var api = ModrinthApi.NewClient(userAgent: "My_Awesome_Project");
var project = await api.GetProjectAsync("sodium");
Console.WriteLine(project.Description);
Info
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. 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. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net6.0
- Flurl (>= 3.0.7)
- Flurl.Http (>= 3.2.4)
- Newtonsoft.Json (>= 13.0.2)
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 | |
---|---|---|---|
2.5.6 | 393 | 1/8/2023 | |
2.5.5 | 348 | 12/20/2022 | |
2.5.4 | 465 | 11/21/2022 | |
2.5.3 | 490 | 10/23/2022 | |
2.5.2 | 557 | 10/17/2022 | |
2.5.1 | 503 | 9/27/2022 | |
2.5.0 | 517 | 9/27/2022 | |
2.4.0 | 468 | 9/24/2022 | |
2.3.1 | 491 | 9/18/2022 | |
2.2.5 | 463 | 9/17/2022 | |
2.2.4 | 460 | 9/9/2022 | |
2.2.2 | 508 | 8/28/2022 | |
2.2.1 | 418 | 8/28/2022 | |
2.1.0 | 553 | 7/7/2022 | |
2.0.0 | 499 | 7/4/2022 | |
1.1.1 | 495 | 6/29/2022 | |
1.1.0 | 497 | 6/25/2022 | |
1.0.4 | 467 | 6/22/2022 | |
1.0.3 | 455 | 6/17/2022 | |
1.0.2 | 464 | 6/16/2022 | |
1.0.0 | 470 | 6/15/2022 |