Dev.to API library for .NET ๐Ÿš€

James Turner - Mar 7 '19 - - Dev Community

With a few articles (Vue Twitter Bot & React Twitter Bot) recently talking about creating automated Twitter bots for posting articles for a particular topic, I thought I would chip in and write a basic library for any .NET clients. It is a fully async library using .NET Standard.

GitHub logo Turnerj / forem-dotnet

.NET API interface for Forem apps. Forem is the platform which powers DEV and other online communities.

Forem API for .NET

API interface for Forem apps. Forem is the platform which powers DEV and other online communities.

AppVeyor Codecov NuGet

API Support

We attempt to support all the API endpoints per the Forem/DEV API, which includes:

  • Articles
  • Users
  • Podcasts
  • Videos

Where available, the library supports pagination and page size controls If there is an API endpoint that isn't currently supported, feel free to open an issue or create a PR.

Getting Started

Installation

To install the library run the below on Nuget Manager Console:

Install-Package Forem.Api -Version 0.4.0

Usage

  • For Some of the methods, DEV API key apiKey is required to be passed to authenticate you as a user To obtain one, check the authentication section GET API KEY

  • Using DI, Add the service to the container just by doing the below:

    services.AddForemApi(new Uri("https://dev.to/"))
    
    Enter fullscreen mode Exit fullscreen mode
  • Configure your HttpClient DI by addingโ€ฆ

It is early days as the API is likely going to change a bit and probably will need an API key at some point but might help some people get started easier.

You can grab it on NuGet here.

Happy to work with the DEV team to make sure this library supports the current and future APIs for the site. ๐Ÿ™‚

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Terabox Video Player