All Projects → michidk → Twitchcsharp

michidk / Twitchcsharp

Licence: apache-2.0
Twitch C# Wrapper for the Twitch v3 REST API

Projects that are alternatives of or similar to Twitchcsharp

Twitch4j
Modular Async/Sync/Reactive Twitch API Client / IRC Client
Stars: ✭ 209 (+480.56%)
Mutual labels:  api, twitch, oauth
Flickr Sdk
Almost certainly the best Flickr API client in the world for node and the browser
Stars: ✭ 104 (+188.89%)
Mutual labels:  api, rest, oauth
Twitchio
TwitchIO - An Async Bot/API wrapper for Twitch made in Python.
Stars: ✭ 268 (+644.44%)
Mutual labels:  api, wrapper, twitch
Python Twitch Client
Python wrapper for Twitch API
Stars: ✭ 137 (+280.56%)
Mutual labels:  api, wrapper, twitch
Atlassian Python Api
Atlassian Python REST API wrapper
Stars: ✭ 564 (+1466.67%)
Mutual labels:  api, rest, wrapper
Swaddle
Automagically create API clients/wrappers in JavaScript
Stars: ✭ 23 (-36.11%)
Mutual labels:  api, wrapper
Yet Another Rest Client
YARC (Yet Another REST Client) is an easy-to-use REST Client for Google Chrome.
Stars: ✭ 23 (-36.11%)
Mutual labels:  api, rest
Discord4j
Discord4J is a fast, powerful, unopinionated, reactive library to enable quick and easy development of Discord bots for Java, Kotlin, and other JVM languages using the official Discord Bot API.
Stars: ✭ 973 (+2602.78%)
Mutual labels:  api, rest
Fusio
Open source API management platform
Stars: ✭ 946 (+2527.78%)
Mutual labels:  api, rest
Goyave
🍐 Elegant Golang REST API Framework
Stars: ✭ 811 (+2152.78%)
Mutual labels:  api, rest
Fastapi
FastAPI framework, high performance, easy to learn, fast to code, ready for production
Stars: ✭ 39,588 (+109866.67%)
Mutual labels:  api, rest
Apipie
Transform api declaration to js object for frontend. Inspired by VueRouter, koa-middleware and axios.
Stars: ✭ 29 (-19.44%)
Mutual labels:  api, rest
Wykop Es6
Wykop.pl API library
Stars: ✭ 17 (-52.78%)
Mutual labels:  api, wrapper
Github Create Token
Create a Github OAuth access token.
Stars: ✭ 6 (-83.33%)
Mutual labels:  api, oauth
Django apistar
Django App to integrate API Star's routes and views into Django's ecossystem.
Stars: ✭ 25 (-30.56%)
Mutual labels:  api, rest
Api Platform
Create REST and GraphQL APIs, scaffold Jamstack webapps, stream changes in real-time.
Stars: ✭ 7,144 (+19744.44%)
Mutual labels:  api, rest
Tinyme
A tiny php framework based on flight and medoo with restful api service
Stars: ✭ 28 (-22.22%)
Mutual labels:  api, rest
Nextjs Graphql Sample
A simple app to demonstrate basic API functions built with REST and GraphQL
Stars: ✭ 29 (-19.44%)
Mutual labels:  api, rest
Versionist
A plugin for versioning Rails based RESTful APIs.
Stars: ✭ 950 (+2538.89%)
Mutual labels:  api, rest
Apicache
Simple API-caching middleware for Express/Node.
Stars: ✭ 957 (+2558.33%)
Mutual labels:  api, rest

Twitch C# Wrapper for the Twitch v3 REST API

Notes

If you are using Twitch C# Wrapper for your project, please let me know! If there are many projects using this API, I will update it more frequently. If you are interested in a Twitch C# API Wrapper with active support or Unity 5 integration for the new Twitch v5 API and are willing to pay for it, please contact me.

For news & updates, follow me on Twitter: @miichidk

Projects Using Twitch C# Wrapper

Documentation

This project is just a wrapper, so that you can interact with the Twitch REST API using C#. That means that most of the methods are named and work like requests of the Twitch REST API. The Twitch REST API is documented here.

Usage

Client

To interact with the API you need at least a client-ID. Some requests can only be made by authorized users. These also need a OAuth-key.

There are three client classes:

Class Explanation
TwitchReadOnlyClient you can use this client without an auth-key to access public data
TwitchAuthenticatedClient needs to authenticate via auth-key, can access and change private data

The TwitchReadOnlyClient can be used to read basic informations which are public on Twitch like the follower count of certain people. Requests which access data which is not public or do change something (e.g. the stream title) need authentication. For these requests you should use the TwitchAuthenticatedClient. The authenticated client also has access to all TwitchReadOnlyClient methods. The TwitchNamedClient is deprecated, since the TwitchAuthenticatedClient automatically fetches the username.

OAuth-Key / Client-ID

Your client-ID is used to protect the twitch servers from spam-attacks. You can create one here (scroll to the bottom).

You auth-key is used to authenticate you with the twitch servers. To generate one, just put your client-ID after "client_id=" in the URL and visit the following link:

https://api.twitch.tv/kraken/oauth2/authorize?response_type=token&client_id=INSERT_YOUR_CLIENT_ID_HERE&redirect_uri=http://localhost&scope=user_read+user_blocks_edit+user_blocks_read+user_follows_edit+channel_read+c
hannel_editor+channel_commercial+channel_stream+channel_subscriptions+user_subscriptions+channel_check_subscription+chat_login

You will be redirected to a url like this:

http://localhost/#access_token=qxxxxtnc33456quxfghmcpw211s92xgp&scope=user_read+user_blocks_edit+user_blocks_read+user_follows_edit+channel_read+channel_editor+channel_commercial+channel_stream+channel_subscriptions+user_subscriptions+channel_check_subscription+chat_login

You can find your auth-key in the resulting url: #access_token=qxxxxtnc33456quxfghmcpw211s92xgp If you create a service, you have to provide a web-frontend, for the users to get their auth-key. Auth-keys are bound to accounts and should not be shared.

Read more about the Twitch authentication API here.

Example

// create a new client with access to the account to the auth-key owner
var client = new TwitchAuthenticatedClient("client-id", "oauth-key");

client.Follow("michidk");					// the owner of the auth-key will follow the user 'michidk'

foreach (var follower in client.GetFollowers("michidk").List)
{
    Console.WriteLine(follower.User.Name);	// print out all followers of the user 'michidk'
}

Dependencies

License

Used some code from Gibletto.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Misc

Created 2015 by Michael Lohr

Analytics

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].