From 0b1cf827a4dd52a51be39679fa0d4fce88e27e43 Mon Sep 17 00:00:00 2001 From: Ben Papillon Date: Tue, 21 May 2024 22:16:25 -0400 Subject: [PATCH] fix using statements in readme --- .fernignore | 2 +- README.md | 38 +++++++++++++++++++------------------- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/.fernignore b/.fernignore index 3b1a043..118c630 100644 --- a/.fernignore +++ b/.fernignore @@ -1,2 +1,2 @@ # Specify files that shouldn't be modified by Fern -# README.md +README.md diff --git a/README.md b/README.md index 613d406..c2c7cf6 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ [![fern shield](https://img.shields.io/badge/%F0%9F%8C%BF-SDK%20generated%20by%20Fern-brightgreen)](https://github.com/fern-api/fern) -The official Schematic C# library, supporting .NET Standard, .NET Core, and .NET Framework. +The official Schematic C# library, supporting .NET Standard, .NET Core, and .NET Framework. ## Installation @@ -18,18 +18,18 @@ Using the NuGet Command Line Interface (CLI): nuget install SchematicHQ.Client ``` -## Instantiation -Instantiate the SDK using the `Schematic` client class. Note that all +## Instantiation +Instantiate the SDK using the `Schematic` client class. Note that all of the SDK methods are awaitable! ```csharp -using Schematic; +using SchematicHQ; Schematic schematic = new Schematic("YOUR_API_KEY") ``` ## HTTP Client -You can override the HttpClient by passing in `ClientOptions`. +You can override the HttpClient by passing in `ClientOptions`. ```csharp schematic = new Schematic("YOUR_API_KEY", new ClientOptions{ @@ -39,28 +39,28 @@ schematic = new Schematic("YOUR_API_KEY", new ClientOptions{ ``` ## Exception Handling -When the API returns a non-zero status code, (4xx or 5xx response), +When the API returns a non-zero status code, (4xx or 5xx response), a subclass of SchematicException will be thrown: ```csharp -using Schematic; -using Schematic.Accounts; +using SchematicHQ; +using SchematicHQ.Accounts; try { - schematic.Accounts.ListApiKeysAsync(...); + schematic.Accounts.ListApiKeysAsync(...); } catch (SchematicException e) { - System.Console.WriteLine(e.Message) - System.Console.WriteLine(e.StatusCode) + System.Console.WriteLine(e.Message) + System.Console.WriteLine(e.StatusCode) } ``` -## Usage +## Usage Below are code snippets of how you can use the C# SDK. ```csharp -using Schematic; -using Schematic.Accounts; +using SchematicHQ; +using SchematicHQ.Accounts; SchematicClient schematic = new Schematic("YOUR_API_KEY") Employee employee = schematic.Accounts.ListApiKeysAsync( @@ -70,10 +70,10 @@ Employee employee = schematic.Accounts.ListApiKeysAsync( ); ``` -## Retries -429 Rate Limit, and >=500 Internal errors will all be -retried twice with exponential backoff. You can override this behavior -globally or per-request. +## Retries +429 Rate Limit, and >=500 Internal errors will all be +retried twice with exponential backoff. You can override this behavior +globally or per-request. ```csharp var schematic = new Schematic("...", new ClientOptions{ @@ -83,7 +83,7 @@ var schematic = new Schematic("...", new ClientOptions{ ## Timeouts The SDK defaults to a 60s timeout. You can override this behaviour -globally or per-request. +globally or per-request. ```csharp var schematic = new Schematic("...", new ClientOptions{