Metaforce.WebEditor.Api.Client.Core 2.0.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package Metaforce.WebEditor.Api.Client.Core --version 2.0.0
                    
NuGet\Install-Package Metaforce.WebEditor.Api.Client.Core -Version 2.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="Metaforce.WebEditor.Api.Client.Core" Version="2.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Metaforce.WebEditor.Api.Client.Core" Version="2.0.0" />
                    
Directory.Packages.props
<PackageReference Include="Metaforce.WebEditor.Api.Client.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 Metaforce.WebEditor.Api.Client.Core --version 2.0.0
                    
#r "nuget: Metaforce.WebEditor.Api.Client.Core, 2.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 Metaforce.WebEditor.Api.Client.Core@2.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=Metaforce.WebEditor.Api.Client.Core&version=2.0.0
                    
Install as a Cake Addin
#tool nuget:?package=Metaforce.WebEditor.Api.Client.Core&version=2.0.0
                    
Install as a Cake Tool

Metaforce.WebEditor.Api clients

This client aims to facilitate the integration with the Metaforce WebEditor api. There are two versions of this package:

The main difference is that the .NET Core package offers the ability to authenticate using mTLS, otherwise both packages offers the exact same funtionality.

Getting started

Download the package to include it in your project and enjoy 😃

Usage Metaforce.WebEditor.Api.Client

ClientId/ClientSecret authentication

Setup you appsettings.json with the following properties:

{
  "WebEditorClientOptions": {
    "AuthorityEndpoint": "https://identity-v2.metaforce.net",
    "ApiBaseAddress": "https://api.webeditor.metaforce.net",
    "ClientId": "YOUR_CLIENT_ID",
    "ClientSecret": "YOUR_CLIENT_SECRET",
    "Scopes": "api.external",
    "CustomerEnvironment": "Test"
  }
}

Configure services

var hostBuilder = new HostBuilder()
.ConfigureAppConfiguration((context, config) =>
{
    config.SetBasePath(Directory.GetCurrentDirectory())
    .AddJsonFile("appsettings.json");
})
.ConfigureServices((context, services) =>
{
    _ = services.WebEditorClient(context.Configuration);
});

var host = hostBuilder.Build();

Usage Metaforce.WebEditor.Api.Client.Core

ClientId/ClientSecret authentication (Core)

See ClientId/ClientSecret authentication configuration above...

mTLS authentication

Setup you appsettings.json with the following properties:

{
  "WebEditorClientOptions": {
    "AuthorityEndpoint": "https://identity-v2.metaforce.net",
    "ApiBaseAddress": "https://api.webeditor.metaforce.net",
    "ClientId": "YOUR_CLIENT_ID",
    "CertificateThumbprint": "YOUR_THUMBPRINT",
    "Scopes": "api.external",
    "CustomerEnvironment": "Test"
  }
}

Configure services (Core)

var hostBuilder = new HostBuilder()
.ConfigureAppConfiguration((context, config) =>
{
    config.SetBasePath(Directory.GetCurrentDirectory())
    .AddJsonFile("appsettings.json");
})
.ConfigureServices((context, services) =>
{
    _ = services.WebEditorClientCore(context.Configuration);
});

var host = hostBuilder.Build();

Once configuration is done you can use the following clients (interfaces):

  • IWebEditorApiClient
  • IWebEditorArchive
  • IWebEditorDistribution
  • IWebEditorStatus

Each interface corresponds to the api:s exposed by the Metaforce WebEditor api.

Product 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.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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
4.0.0 235 11/17/2024 4.0.0 is deprecated because it is no longer maintained.
3.0.1 286 1/12/2024
3.0.0 250 12/31/2023
2.0.3 264 7/14/2023
2.0.2 255 7/14/2023
2.0.1 264 7/13/2023
2.0.0 267 7/13/2023
1.0.17 263 7/13/2023
1.0.16-beta 227 7/12/2023