Note
The Publishing Test C# API Library is currently in beta and we're excited for you to experiment with it!
This library has not yet been exhaustively tested in production environments and may be missing some features you'd expect in a stable release. As we continue development, there may be breaking changes that require updates to your code.
We'd love your feedback! Please share any suggestions, bug reports, feature requests, or general thoughts by filing an issue.
The Publishing Test C# SDK provides convenient access to the Publishing Test REST API from applications written in C#.
It is generated with Stainless.
dotnet add package PublishingTestSee the examples directory for complete and runnable examples.
using PublishingTest;
using PublishingTest.Models.Stores.Orders;
using System;
// Configured using the PETSTORE_API_KEY and PUBLISHING_TEST_BASE_URL environment variables
PublishingTestClient client = new();
OrderCreateParams param = new();
var order = await client.Stores.Orders.Create(param);
Console.WriteLine(order);Configure the client using environment variables:
using PublishingTest;
// Configured using the PETSTORE_API_KEY and PUBLISHING_TEST_BASE_URL environment variables
PublishingTestClient client = new();Or manually:
using PublishingTest;
PublishingTestClient client = new() { APIKey = "My API Key" };Alternatively, you can use a combination of the two approaches.