VOOZH about

URL: https://www.nuget.org/packages/Remora.Rest.Core/

⇱ NuGet Gallery | Remora.Rest.Core 3.0.0




👁 Image
Remora.Rest.Core 3.0.0

Prefix Reserved
dotnet add package Remora.Rest.Core --version 3.0.0
 
 
NuGet\Install-Package Remora.Rest.Core -Version 3.0.0
 
 
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="Remora.Rest.Core" Version="3.0.0" />
 
 
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Remora.Rest.Core" Version="3.0.0" />
 
Directory.Packages.props
<PackageReference Include="Remora.Rest.Core" />
 
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Remora.Rest.Core --version 3.0.0
 
 
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Remora.Rest.Core, 3.0.0"
 
 
#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.
#:package Remora.Rest.Core@3.0.0
 
 
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Remora.Rest.Core&version=3.0.0
 
Install as a Cake Addin
#tool nuget:?package=Remora.Rest.Core&version=3.0.0
 
Install as a Cake Tool
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

Remora.Rest

Remora.Rest is a compact helper library for building REST API wrappers, giving you the tools you need to rapidly create robust, highly configurable wrappers of your own.

The library is somewhat opinionated, and it does target a single subset of REST API types - those whose payloads (error or otherwise) are JSON-serialized. For these use cases, however, the library is quite adept at what it does.

Quickstart

At its core, the library expects you to do two things - one, to access the REST endpoints through a configured RestHttpClient<TError>, and two, to define the entities in the API model through an interface/implementation combination.

var services = new ServiceCollection();

var clientBuilder = services
 .AddRestHttpClient<RestHttpClient<ErrorPayloadType>>();

// Perform HttpClient configuration (adding Polly policies, setting default
// request headers, etc)
clientBuilder...

// Configure API model types
services.Configure<JsonSerializerOptions>(clientBuilder.Name, options => 
{
 options.AddDataObjectConverter<IModelType, ModelType>();
});

After you've set up your client and your types, you can then inject an instance of RestHttpClient<TError> into your actual API wrapper type (the instance is transient, so you can treat it the same as any HttpClient you'd normally inject).

public class MyWrapper
{
 private readonly RestHttpClient<ErrorPayloadType> _restClient;
 
 public MyWrapper(RestHttpClient<ErrorPayloadType> restClient)
 {
 _restClient = restClient;
 }
}

More detailed documentation will hopefully be available in the future; in the meantime, check out Remora.Discord, for which this project was originally developed - it pushes all available functionality to its limits, and serves as a relatively comprehensive demonstration of what you can do with the library.

Product Versions Compatible and additional computed target framework versions.
.NET net5.0 net5.0 was computed.  net5.0-windows net5.0-windows was computed.  net6.0 net6.0 was computed.  net6.0-android net6.0-android was computed.  net6.0-ios net6.0-ios was computed.  net6.0-maccatalyst net6.0-maccatalyst was computed.  net6.0-macos net6.0-macos was computed.  net6.0-tvos net6.0-tvos was computed.  net6.0-windows net6.0-windows was computed.  net7.0 net7.0 was computed.  net7.0-android net7.0-android was computed.  net7.0-ios net7.0-ios was computed.  net7.0-maccatalyst net7.0-maccatalyst was computed.  net7.0-macos net7.0-macos was computed.  net7.0-tvos net7.0-tvos was computed.  net7.0-windows net7.0-windows was computed.  net8.0 net8.0 is compatible.  net8.0-android net8.0-android was computed.  net8.0-browser net8.0-browser was computed.  net8.0-ios net8.0-ios was computed.  net8.0-maccatalyst net8.0-maccatalyst was computed.  net8.0-macos net8.0-macos was computed.  net8.0-tvos net8.0-tvos was computed.  net8.0-windows net8.0-windows was computed.  net9.0 net9.0 is compatible.  net9.0-android net9.0-android was computed.  net9.0-browser net9.0-browser was computed.  net9.0-ios net9.0-ios was computed.  net9.0-maccatalyst net9.0-maccatalyst was computed.  net9.0-macos net9.0-macos was computed.  net9.0-tvos net9.0-tvos was computed.  net9.0-windows net9.0-windows was computed.  net10.0 net10.0 was computed.  net10.0-android net10.0-android was computed.  net10.0-browser net10.0-browser was computed.  net10.0-ios net10.0-ios was computed.  net10.0-maccatalyst net10.0-maccatalyst was computed.  net10.0-macos net10.0-macos was computed.  net10.0-tvos net10.0-tvos was computed.  net10.0-windows net10.0-windows was computed. 
.NET Core netcoreapp3.0 netcoreapp3.0 was computed.  netcoreapp3.1 netcoreapp3.1 was computed. 
.NET Standard netstandard2.1 netstandard2.1 is compatible. 
MonoAndroid monoandroid monoandroid was computed. 
MonoMac monomac monomac was computed. 
MonoTouch monotouch monotouch was computed. 
Tizen tizen60 tizen60 was computed. 
Xamarin.iOS xamarinios xamarinios was computed. 
Xamarin.Mac xamarinmac xamarinmac was computed. 
Xamarin.TVOS xamarintvos xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETStandard 2.1

    • No dependencies.
  • net8.0

    • No dependencies.
  • net9.0

    • No dependencies.

NuGet packages (6)

Showing the top 5 NuGet packages that depend on Remora.Rest.Core:

Package Downloads
Remora.Discord.API.Abstractions

Interface definitions of Discord's API

Remora.Rest

Core functionality of basic REST-focused API tooling, allowing you to easily build new wrappers around your favourite services.

VTP.RemoraHelpSystem

Provides a simple, modular help system for Remora.Discord.

VTP.Remora.Views

A (currently POC) library to implement views (e.g. MVC) into the Remora.Discord library.

VTP.Remora.Discord.Builders

Adds builders to make Remora.Discord slightly easier to use.

GitHub repositories (1)

Showing the top 1 popular GitHub repositories that depend on Remora.Rest.Core:

Repository Stars
Remora/Remora.Discord
A data-oriented C# Discord library, focused on high-performance concurrency and robust design.
Version Downloads Last Updated
3.0.0 53,651 2/13/2025
2.2.1 78,245 11/20/2023
2.2.0 103,794 2/26/2023
2.1.0 11,069 12/28/2022
2.0.5 7,600 11/20/2022
2.0.4 33,243 8/19/2022
2.0.3 872 8/3/2022
2.0.2 91,178 4/19/2022
2.0.1 26,201 2/20/2022
2.0.0 78,688 11/26/2021
1.0.0 4,593 11/14/2021

Update target frameworks.
           Update nuget dependencies.