Skip to content
This repository has been archived by the owner on Feb 5, 2020. It is now read-only.

Latest commit

 

History

History
45 lines (28 loc) · 1.64 KB

07.Faye-endpoint.md

File metadata and controls

45 lines (28 loc) · 1.64 KB

Faye

At Gitter we use Faye extensibly to publish real-time messages regarding user and room activity to all our clients.

What is Faye?

Faye is a publish-subscribe messaging system based on the Bayeux protocol.

Learn more: Faye

Endpoints

We provide Faye endpoints that look like our REST API. When a user subscribes to them, she will receive real-time activity regarding those resources:

A user can subscribe to the following endpoints:

  • /api/v1/user/:userId/rooms
  • /api/v1/user/:userId/rooms/:roomId/unreadItems
  • /api/v1/user/:userId
  • /api/v1/rooms/:roomId: Room user presence.
  • /api/v1/rooms/:roomId/chatMessages: Room messages.
  • /api/v1/rooms/:roomId/users: Room users.
  • /api/v1/rooms/:roomId/events: Room events.
  • /api/v1/rooms/:roomId/chatMessages/:messageId/readBy

Consuming messages

To consume messages from Faye you'll need to use one of the provided clients.

Get the packages.

Publishing messages

We don't currently support publishing messages from your client to the server. For that purpose you should use our REST API.

Example

Node.js client

You can find an example client at https://github.com/gitterHQ/gitter-faye-client.