GithubHelp home page GithubHelp logo

cwoodyard / caffeinetvjavaapi Goto Github PK

View Code? Open in Web Editor NEW

This project forked from e3ndr/caffeinetvjavaapi

0.0 1.0 0.0 9 KB

A (very) unofficial way of getting Caffeine related data including stream chat.

Java 100.00%

caffeinetvjavaapi's Introduction

CaffeineTVJavaApi

A (very) unofficial way of getting Caffeine related data including stream chat.

Usage

You can find the project on JitPack.

CaffeineProfile profile = new CaffeineProfile(username);
profile.isValid(); // returns false if a user doesn't exist.

EventListener listener = (new ChatListener() {
  @Override
  public void onEvent(Chat chat) {
    // Code here, relies on the json-simple library.
  }
})
CaffeineStream stream = new CaffeineStream(profile, listener); // Automatically connects, if not an error is thrown.
stream.close(); // Close.
stream.isOpen(); // Is open, directly from the websocket api.

What it accesses

https://api.caffeine.tv/v1/users/$username # Where to get client information
wss://realtime.caffeine.tv/v2/reaper/stages/$stage-id/messages # Socket address for stream events
{"Headers":{"Authorization":"Anonymous API","X-Client-Type":"api"}} # Headers for websocket
https://images.caffeine.tv/$avatar-link # Where you can get an avatar, every client has an associated avatar_link

caffeinetvjavaapi's People

Contributors

e3ndr avatar

Watchers

 avatar

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.