Skip to content

Repository files navigation

Medium API

Built with APIMatic License: MIT

The Medium API SDK for .NET provides access to the Medium API REST APIs from .NET applications.

Medium API helps you to quickly extract data from Medium's Website (https://medium.com).

You can gather data related to users, publications, articles (including its textual content), latest posts & top writers within a topic/niche, etc…


Installation

Add the .NET SDK as a project reference into your solution:

dotnet add reference <path-to-sdk>/MediumApi.csproj

Quick Start

Dependency Injection

Register the client with IServiceCollection and resolve it from the container. The HttpClient is managed by IHttpClientFactory. Configure the client's behavior through MediumApiClientOptions.

services.AddMediumApiClient(options =>
    {
        options.ApiHost = "YOUR_API_KEY";
        options.ApiKey = "YOUR_API_KEY";
        options.Environment = ServerEnvironment.Production;
        // TODO: configure more client options here
    });

Direct Instantiation

Create the client by passing an HttpClient you manage yourself. Configure the client's behavior through MediumApiClientOptions.

var httpClient = new HttpClient();
// TODO: configure more client options here
var options =
    new MediumApiClientOptions
    {
        ApiHost = "YOUR_API_KEY",
        ApiKey = "YOUR_API_KEY",
        Environment = ServerEnvironment.Production,
    };
var client = new MediumApiClient(httpClient, options);

Usage

For code examples and error responses, see API Reference.

Best Practices

Tip

Use a single MediumApiClient instance for the lifetime of your application and reuse it across all requests. Creating a new instance per request might exhaust the connection pool.

License

This SDK is distributed under the MIT License.


Support

Refer to the API reference for detailed information on available operations with code samples.

For further assistance, please contact support at [email protected].


About

contextmatic-crawler csharp SDK for Medium API blobId=c55df461a9f51fa1910662c91f82219484e105a7520a8b6704914bef533aef2c.yaml

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages