https://github.com/zhaytam/psawsharp
A wrapper of the Pushshift reddit API.
https://github.com/zhaytam/psawsharp
api-wrapper csharp psaw pushshift reddit
Last synced: 10 months ago
JSON representation
A wrapper of the Pushshift reddit API.
- Host: GitHub
- URL: https://github.com/zhaytam/psawsharp
- Owner: zHaytam
- License: mit
- Created: 2018-12-02T16:03:05.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2019-02-28T14:31:10.000Z (almost 7 years ago)
- Last Synced: 2025-02-12T15:53:13.284Z (about 1 year ago)
- Topics: api-wrapper, csharp, psaw, pushshift, reddit
- Language: C#
- Homepage:
- Size: 18.6 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# PsawSharp
PsawCharp is a simple wrapper around [Pushshift's API](https://pushshift.io/api-parameters/) that supports rate limits and proxies.
## Example:
From the Tests project:
```csharp
var client = new PsawClient(new RequestsManagerOptions
{
ProxyAddress = "178.217.194.175:49850"
});
var meta = await client.GetMeta();
Assert.Equal("178.217.194.175", meta.SourceIp);
Assert.Equal("PL", meta.ClientRequestHeaders.CfIpCountry);
```
```csharp
var client = new PsawClient();
var submmissions = await client.Search(new SearchOptions
{
Subreddit = "game",
Size = 1
});
Assert.Single(submmissions);
```