GithubHelp home page GithubHelp logo

alexxnica / emojitrack-streamer-spec Goto Github PK

View Code? Open in Web Editor NEW

This project forked from emojitracker/emojitrack-streamer-spec

0.0 1.0 0.0 163 KB

:dizzy: Defines and tests the API for emojitrack streamers

CoffeeScript 100.00%

emojitrack-streamer-spec's Introduction

emojitrack-streamer-spec

Attempt to define the API spec for emojitrack-streamer, and offer an acceptance test to be run against staging/production servers to verify they meet it.

Mainly useful as we experiment with different routing layers and with rewriting emojitrack-streamer on different platforms.

Streaming API

All endpoints are normal HTTP connections, which emit EventSource/SSE formatted data.

CORS headers are set to * so anyone can play, please don't abuse the privilege.

Note to hackers: if you just want to get some data out of emojitracker and don't need to stream realtime data, you are probably looking for the normal web API.

Endpoints

/subscribe/eps

Emits a JSON blob every 17ms (1/60th of a second) containing the unicode IDs that have incremented and the amount they have incremented.

Example:

data:{'1F4C2':2,'2665':3,'2664':1,'1F65C':1}

If there have been no updates in that period, in lieu of an empty array, no message will be sent. Therefore, do not rely on this for timing data.

/subscribe/details/:id

Get every single tweet that pertains to the emoji glyph represented by the unified id.

Example:

event:stream.tweet_updates.2665
data:{"id":"451196288952844288","text":"유졍여신에게 화유니가아~♥\n햇살을 담은 my only one\n그대인거죠 선물같은 사람 달콤한 꿈속\n주인공처럼 영원히 with you♥\nAll about-멜로디데이\n@GAEBUL_Chicken ♥ @shy1189\n화윤애끼미랑평생행쇼할텨~?♥\n#화융자트","screen_name":"snowflake_Du","name":"잠수탄✻눈꽃두준✻☆글확인","links":[],"profile_image_url":"http://pbs.twimg.com/profile_images/437227370248806400/aP0fFJOk_normal.jpeg","created_at":"2014-04-02T03:15:52+00:00"}

*** More information to go here.

/subscribe/raw

*** Description.

This endpoint can be disabled in configuration.

Compliance testing

$ STREAM_SERVER=http://host:port npm test

emojitrack-streamer-spec's People

Contributors

mroth 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.