Skip to content

Commit

Permalink
Helix 0.4.0-prerelease
Browse files Browse the repository at this point in the history
  • Loading branch information
Foretack committed Jul 11, 2024
1 parent 3a9b337 commit a0de9b1
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 12 deletions.
13 changes: 9 additions & 4 deletions MiniTwitch.Helix/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,22 @@ This changelog is available at: https://github.com/Foretack/MiniTwitch/blob/mast

# MiniTwitch.Helix Changelog

## Upcoming version
## 0.4.0-prerelease

### Breaking changes
- `SortedHelixWrapper` has been removed
- `SortedHelixWrapper` has been removed (#110)

### Minor Changes
- Changing the token of `HelixWrapper` is now possible through `HelixWrapper.Client.ChangeToken()`
- Added `Warn Chat User` endpoint
- Changing the token of `HelixWrapper` is now possible through `HelixWrapper.Client.ChangeToken()` (#110)
- Added `Warn Chat User` endpoint (#111)
- Error messages are now provided from Helix responses rather than scraped data (#115)

### Fixes
- Fixed an exception that occurs when empty strings are provided to SnakeCase.ConvertToCase
- Fixed an exception that occurs when calling `GetChatSettings()` on a channel that does not have any special modes enabled
- The HttpResponseMessage from making calls with HttpClient now gets disposed (#118)

****

## 0.3.0-prerelease

Expand Down
4 changes: 2 additions & 2 deletions MiniTwitch.Helix/MiniTwitch.Helix.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
<PropertyGroup>
<TargetFrameworks>net6.0;net7.0;net8.0</TargetFrameworks>
<PackageId>MiniTwitch.Helix</PackageId>
<PackageVersion>0.3.1-prerelease</PackageVersion>
<Version>0.3.1-prerelease</Version>
<PackageVersion>0.4.0-prerelease</PackageVersion>
<Version>0.4.0-prerelease</Version>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<Title>MiniTwitch.Helix</Title>
Expand Down
6 changes: 3 additions & 3 deletions MiniTwitch.Helix/README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
# MiniTwitch.Helix (Pre-release)

MiniTwitch.Helix conveniently wraps the Twitch Helix API and exposes them through the `HelixWrapper` and `SortedHelixWrapper` classes. The difference between the two classes is that `HelixWrapper` exposes all endpoints as methods directly on the class, while `SortedHelixWrapper` exposes them through categories (i.e `HelixWrapper.BanUser()` vs `SortedHelixWrapper.Moderation.BanUser()`)

MiniTwitch.Helix conveniently wraps the Twitch Helix API and exposes them through the `HelixWrapper`class.
## Features

- Contains all generally available and beta Helix API endpoints
- Virtually no dependencies
- Returns meaningful information about responses with `HelixResult`:
- **HelixResult.Success**: Whether the request was successful
- **HelixResult.StatusCode**: Status code of the response
- **HelixResult.Message**: Contains a message clarifying the meaning of the status code
- **HelixResult.Message**: Contains the error message for the request, if not successful
- **HelixResult.Elapsed**: The amount of time the request took to get a response
- **HelixResult.RateLimit.Limit**: Maximum amount of requests that can be made in a period
- **HelixResult.RateLimit.Remaining**: The amount of requests that can be made before the ratelimit resets
Expand Down Expand Up @@ -78,6 +77,7 @@ public class Program
if (!next.CanPaginate)
return usernames;

// Assign the new page to the old one so we move forward
chatters = next;
}

Expand Down
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -156,16 +156,15 @@ public class Program

# MiniTwitch.Helix (Pre-release)

MiniTwitch.Helix conveniently wraps the Twitch Helix API and exposes them through the `HelixWrapper` and `SortedHelixWrapper` classes. The difference between the two classes is that `HelixWrapper` exposes all endpoints as methods directly on the class, while `SortedHelixWrapper` exposes them through categories (i.e `HelixWrapper.BanUser()` vs `SortedHelixWrapper.Moderation.BanUser()`)

MiniTwitch.Helix conveniently wraps the Twitch Helix API and exposes them through the `HelixWrapper`class.
## Features

- Contains all generally available and beta Helix API endpoints
- Virtually no dependencies
- Returns meaningful information about responses with `HelixResult`:
- **HelixResult.Success**: Whether the request was successful
- **HelixResult.StatusCode**: Status code of the response
- **HelixResult.Message**: Contains a message clarifying the meaning of the status code
- **HelixResult.Message**: Contains the error message for the request, if not successful
- **HelixResult.Elapsed**: The amount of time the request took to get a response
- **HelixResult.RateLimit.Limit**: Maximum amount of requests that can be made in a period
- **HelixResult.RateLimit.Remaining**: The amount of requests that can be made before the ratelimit resets
Expand All @@ -180,6 +179,9 @@ MiniTwitch.Helix conveniently wraps the Twitch Helix API and exposes them throug

This example demonstrates the usage of `HelixWrapper` and `HelixResult<T>.Paginate()`

> [!IMPORTANT]
> You may notice that some requests have missing parameters. This is because the user ID is supplied by the library to requests that require the user ID of the provided token
```csharp
using MiniTwitch.Helix;
using MiniTwitch.Helix.Models;
Expand Down Expand Up @@ -231,6 +233,7 @@ public class Program
if (!next.CanPaginate)
return usernames;

// Assign the new page to the old one so we move forward
chatters = next;
}

Expand Down

0 comments on commit a0de9b1

Please sign in to comment.