Reddit.NET.Client
1.2.0
See the version list below for details.
dotnet add package Reddit.NET.Client --version 1.2.0
NuGet\Install-Package Reddit.NET.Client -Version 1.2.0
<PackageReference Include="Reddit.NET.Client" Version="1.2.0" />
paket add Reddit.NET.Client --version 1.2.0
#r "nuget: Reddit.NET.Client, 1.2.0"
// Install Reddit.NET.Client as a Cake Addin #addin nuget:?package=Reddit.NET.Client&version=1.2.0 // Install Reddit.NET.Client as a Cake Tool #tool nuget:?package=Reddit.NET.Client&version=1.2.0
Reddit .NET client
About
Provides a .NET client for interacting with reddit.
The client was designed with the following goals in mind:
- Simple, modern, asynchronous API
- Support for various authentication modes
- Modular structure with simple re-usable components
Usage
var builder = RedditClientBuilder.New;
// Configure builder
...
var client = await builder.BuildAsync();
// Get the details of a subreddit
var askReddit = client.Subreddit("askreddit");
var askRedditDetails = await askReddit.GetDetailsAsync();
// Get the top 50 hot submissions
var topFiftyHotSubmissions = askReddit.GetSubmissionsAsync(builder =>
builder
.WithSort(SubredditSubmissionSort.Hot)
.WithMaximumItems(50));
await foreach (var submission in topFiftyHotSubmissions)
{
// Upvote the submission
await submission
.Interact(client)
.UpvoteAsync();
}
Further examples of usage can be found in the demos folder.
Development
Following the instructions below to get started with the project in a local development environment.
Prerequisites
Building
After cloning the source code to a destination of your choice, run the following command to build the solution:
dotnet build
Tests
The test suite can be run using the following command:
dotnet test
Documentation
See the docs folder for documentation on how to use the client and an overview of its internals.
The documentation is also hosted on GitHub pages.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 is compatible. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. |
-
net5.0
- Microsoft.Extensions.Http (>= 5.0.0)
- Microsoft.Extensions.Logging (>= 5.0.0)
- Microsoft.VisualStudio.Validation (>= 16.10.26)
- Polly (>= 7.2.2)
- System.Net.Http.Json (>= 5.0.0)
- System.Text.Json (>= 5.0.2)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.