Code Monkey home page Code Monkey logo

qtwitch's Introduction

QTwitch

This library is intended to make development of Twitch-powered applications for any platform as easy as possible. Although it's primarily designed to simplify TwitchTube and to make it's porting to other platforms easier, you will probably find QTwitch useful for various other applications from a chat bot or statistics collector to embedding a stream player into an app.

Dependencies

  • Qt 5
  • C++17-capable compiler

C++11 and C++14 support

If for some reason you cannot use a recent compiler, QTwitch can be compiled in c++11 or c++14 mode. To do so set qmake variable CXX_VERSION to desired value (e.g. qmake "CXX_VERSION=c++14").

These modes don't disable any of QTwitch features but will decrease performance and might be less stable as they rely on custom backported implementations of several functions of the standard library.

Build

Twitch requires a Client-ID for all requests so before being able to use QTwitch you'll have to register your app on developer's dashboard, get it's Client-ID and set it to TWITCH_CLIENT_ID environment variable, e.g.:

export TWITCH_CLIENT_ID=your-client-id

If you need authorization you also have to set redirect url (also set on developer's dashboard) in TWITCH_REDIRECT_URI.

export TWITCH_REDIRECT_URI=http://localhost

If you use Qt Creator, you can also set these variables in Projects -> Build -> Build Environment section.

Then, you should be able to build the root project QTwitch.pro, e.g.:

qmake QTwitch.pro
make

This will generate a shared library for each module.
Unfortunately, there're no installation rules nor any qmake or CMake helpers at the moment.

Documentation

As the library matures, it's going to get a complete doxygen-like documentation. For now, there's only a sketch of it's general structure.

Modules

The library consists of the following modules:

Api

This module includes a basic framework for sending requests to Twitch APIs and authorization as well as descriptions for API endpoints.

All classes in the Api module are defined inside QTwitch::Api namespace.

Works: OAuth2 implicit flow, significant part of the New API, APIv5 search and follow/unfollow endpoints and Usher API. TODO: describe remaining endpoints of the New API.

Models

This module will include models for visual representation of various data provided by Twitch. The models will be QAbstractListModel-inherited classes thus usable by both QtQuick and QWidgets, wrapping Api functionality.

Status: WIP.

Chat

This module will include an implementation of IRC with support for Twitch extensions as well as a model for visual representation of the chat (Note: the latter might actually better suit Models module).

Status: High priority in TODO list.

Player

Embeddable GStreamer-based stream/vod player.

Status: Low priority in TODO list.

tests

Contains tests for functionality of each module.

Status: Has basic functional tests for most implemented API endpoints. All tests pass successfully.

qtwitch's People

Contributors

aldrog avatar

Stargazers

 avatar

Watchers

 avatar  avatar

qtwitch's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.