auxlabs / twitch Goto Github PK
View Code? Open in Web Editor NEWAn implementation of the Twitch Developer APIs for dotnet
Home Page: https://docs.auxlabs.org/Twitch/
License: MIT License
An implementation of the Twitch Developer APIs for dotnet
Home Page: https://docs.auxlabs.org/Twitch/
License: MIT License
Implement interfaces between like-objects for cross-compatibility between projects.
Chat's UserStateEventArgs
and Rest's User
are both objects containing data referring to a user and so both implement Core's IUser
. This should be implemented across all entities in all projects. e.g. Users, Channels, Broadcasts, etc...
The library currently only manages ratelimits globally through headers. Some endpoints, however, have their own constant ratelimits specified in the api documentation. Obviously these need to be implemented somehow. These constant values are specified below.
There are many situations with the twitch api where requests can only be made using an oauth token authorized by a broadcaster or moderator rather than an application's user account. The best method to handle this is probably by making a TwitchRestApiClientFactory
or something similar that manages identity internally and allows the user to generate TwitchRestApiClient
for authorized users as needed.
TwitchRestApiClient
would need a constructor to allow providing a premade HttpClient
.While this method works fine for the lower library, it will probably cause issues with the higher library. Since entities there all contain a reference to the client that created them it might cause confusion if a user caches them, but it might not we'll see.
Extension endpoints have a unique authentication scheme that isn't compatible with most other endpoints in the rest api. They should probably be implemented in their own client.
This is related to #12
Twitch chat has constant ratelimits based on the moderator status of a user in a channel, and also a special verified status globally. IRateLimiter
should be abstracted so a ratelimit class can be written for this rules.
As of now the default irc serializer works, but it could be faster/cleaner. I'll need to rewrite it at some point.
Haven't tested if it's an issue with the mock api or the library, but it's probably the library.
Requests that ask for an array inside of the url only generate one ?tag=value
instead of many ?tag=value&tag=value
repeating.
As of 2023โ05โ11 Twitch has added 12 new REST endpoints and 5 new EventSub topics to integrate with the Guest Star feature. This includes 12 REST endpoints and 5 EventSub topics.
Self explanatory title.
The latest .Net version unity supports is .Net Standard 2.1 and .Net 4.x, compared to this library's .Net 6.0
The latest c# version unity supports is c#6, compared to this library's c#10
Obviously this isn't that important to get done right away, but it's good to make note of how it can be done.
Re: docfx issue explanation
dotnet/docfx#873 (comment)
The rest client should auto attempt to refresh tokens when they expire, if the user provides the necessary info to do so.
TwitchRestApiConfig
to optionally disable auto refresh even if information is provided.For requests that allow multiple of a single property, like &id=value&id=value&id=value&id=value
the query builder takes on average 4x longer to generate the request. From 0.24s in non-array requests to 1.16s in array requests. There's definitely a better way to handle this, figure it out later.
Where twitch provides an ISO 639-1 two-letter language code the property type should be a CultureInfo
rather than a raw string.
Most requests have a specific set of permissions the client needs to be valid. The client has this information and should check before sending any request. This isn't limited to just Rest requests, EventSub and PubSub both also have specific permissions.
/channels/editors
or GetChannelEditorsAsync
channel:read:editors
scopeAs the client is now, it denies app authorizations for any endpoint that has required scopes. This doesn't work for subscriptions since, in the case of extensions, the app can have scopes authorized that aren't viewable from the API. Unless a method is added to view these scopes, the client should just allow app authorizations to simply bypass the scope check even if it will result in a 401 Unauthorized.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.