Giter Site home page Giter Site logo

synchtube-api's Introduction

Synchtube Simple API

The synchtube simple API allows you retrieve information about rooms and returns the result in a JSON format.

Usage

The format of the REST URL is http://synchtube.com/api/{version}/{resource}. The current version of the API is 1.

Resources

We currently only have one resource.

  • room/:ROOM_NAME --- GET Request. Requires a room name and returns all the information about the room and its current state.

Quick Start

The simple way to access a resource is with jQuery:

$.getJSON("http://synchtube.com/api/1/room/{ROOM_NAME}?callback=?", function(response) {
    console.log(response);
});

Example

This is a complete example using the API to gather information about the room "mrchess".

###Request

$.getJSON("http://synchtube.com/api/1/room/mrchess?callback=?", function(response) {
    console.log(response);
});

###Response JSON Response

{
    "room": {
            "id":12,
            "port":"8884"
    },
    "user": {
            "username":"mrchess",
            "avatar": {
                "original":"http://synchtube.com/uploads/avatars/3/original_avatar.jpg",
                "thumb":"http://synchtube.com/uploads/avatars/3/thumb_avatar.jpg"
            }
    },
    "description":"<p>\n\tWelcome to my hangout. I&#39;m typically here during the day while I code. Feel free to chill.</p>\n<br />\n<p>\n\tThis room is a portal to my other rooms.</p>\n<br />\n<p>\n\t<strong>chessclassical </strong>- classical piano music up to the late-romantic period [<a href=\"http://synchtube.com/r/chessclassical\">go now</a>]</p>",

    "moderators":["lucidrains","chessclassical"],
    "affiliates":["chessclassical"],
    "current_media":{
        "title":"VOCALOID MUSICAL Alice in Musicland ~English~Original Son",
        "image":"http://i.ytimg.com/vi/jHatMUTHSiY/default.jpg",
        "type":"Youtube",
        "type_icon":"http://synchtube.com/images/icons/favico/yt.ico"
    }
    "current_users": 0
}

A complete code example of the above can be found in the example.html file.

synchtube-api's People

Contributors

mrchess avatar

Watchers

Yiorgos Voulgaris avatar James Cloos 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.