Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
55 lines (32 sloc) 1.62 KB

Streaming API

Your application can use a server-sent events endpoint to receive updates in real-time. Server-sent events is an incredibly simple transport method that relies entirely on chunked-encoding transfer, i.e. the HTTP connection is kept open and receives new data periodically.

Endpoints:

GET /api/v1/streaming/user

Returns events that are relevant to the authorized user, i.e. home timeline and notifications

GET /api/v1/streaming/public

Returns all public statuses

GET /api/v1/streaming/public/local

Returns all local statuses

GET /api/v1/streaming/hashtag

Returns all public statuses for a particular hashtag (query param tag)

GET /api/v1/streaming/list

Returns statuses for list (query param list)

GET /api/v1/streaming/direct

Returns all direct messages

Stream contents

The stream will contain events as well as heartbeat comments. Lines that begin with a colon (:) can be ignored by parsers, they are simply there to keep the connection open. Events have this structure:

event: name
data: payload

See MDN

Event types

Event Description What's in the payload
update A new status has appeared! Status
notification A new notification Notification
delete A status has been deleted ID of the deleted status
filters_changed Keyword filters have been changed Not exists. (undefined)

The payload is JSON-encoded.

Note: In case of filters_changed event, payload is not defined.

You can’t perform that action at this time.