Skip to content

Commit

Permalink
fix using statements in readme
Browse files Browse the repository at this point in the history
  • Loading branch information
bpapillon committed May 22, 2024
1 parent c6e441e commit 0b1cf82
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 20 deletions.
2 changes: 1 addition & 1 deletion .fernignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# Specify files that shouldn't be modified by Fern
# README.md
README.md
38 changes: 19 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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{
Expand All @@ -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(
Expand All @@ -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{
Expand All @@ -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{
Expand Down

0 comments on commit 0b1cf82

Please sign in to comment.