SlySoft.RestResource 1.0.0.13-Beta

This is a prerelease version of SlySoft.RestResource.
There is a newer prerelease version of this package available.
See the version list below for details.
dotnet add package SlySoft.RestResource --version 1.0.0.13-Beta                
NuGet\Install-Package SlySoft.RestResource -Version 1.0.0.13-Beta                
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="SlySoft.RestResource" Version="1.0.0.13-Beta" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add SlySoft.RestResource --version 1.0.0.13-Beta                
#r "nuget: SlySoft.RestResource, 1.0.0.13-Beta"                
#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 SlySoft.RestResource as a Cake Addin
#addin nuget:?package=SlySoft.RestResource&version=1.0.0.13-Beta&prerelease

// Install SlySoft.RestResource as a Cake Tool
#tool nuget:?package=SlySoft.RestResource&version=1.0.0.13-Beta&prerelease                

RestResource

Utility for creating representing resources containing data, links, and embedded resources. A tool for creating HATEOAS web services.

Getting started

Install from Nuget.Org, and create a Resource() class. Use the extension methods .Data(), .Embedded() .Get(), .Query(), Post(), Put(), Patch(), and Delete() to add data and links to the resource.

Prerequisites

No prerequisites are required; however, to get maximum benifits use SlySoft.RestResource.Hal, and SlySoft.RestResource.Html to serialize and deserialize resources. SlySoft.RestResource.AspNetCoreUtils contains utilities for returning Resources from controller methods, respected the Accept header for serialization SlySoft.RestResource.Client contains utilities for communicating with web services created using RestResource

Usage

Example code (from an ASP.NET CORE MVC Controller):

    [HttpGet]
    public IActionResult Get() {
        var resource = new Resource()
            .Data("message", "Hello World!")
            .Get("getUser", "/user")
            .Post("addUser", "/user")
                .Field("userName")
                .Field("lastName")
                .Field("firstName")
                .Field("email")
            .EndBody();

        return StatusCode(200, resource);
    }

Find more examples of how to use RestResource at my blog.

Additional documentation

More comprehensive documentation is also at my blog.

Feedback

Contact me for questions, issuess, or collaboration at sylvesterjj@gmail.com

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  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 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. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (4)

Showing the top 4 NuGet packages that depend on SlySoft.RestResource:

Package Downloads
SlySoft.RestResource.Html

Package Description

SlySoft.RestResource.Serializers

Package Description

Slysoft.RestResource.HalXml

Package Description

Slysoft.RestResource.HalJson

Package Description

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.0.19-Beta 51 11/27/2024
1.0.0.18-Beta 68 11/22/2024
1.0.0.15-Beta 90 11/1/2024
1.0.0.14-Beta 41 11/1/2024
1.0.0.13-Beta 39 11/1/2024
1.0.0.12-Beta 39 11/1/2024
1.0.0.11-Beta 60 10/28/2024
1.0.0.9-Beta 72 10/19/2024
1.0.0.8-Beta 97 10/9/2024
1.0.0-Beta 103 7/12/2023

This is a beta version.