API Basics

PushFYI APIs are classified into 2 categories:

  • Client API
  • Server API

Client APIs are utilized by the client side of your application e.g. Android, Objective-C and JavaScript. Server APIs are utilized by the server side of your applications e.g. Core PHP API, Core JAVA API, .Net API and Wordpress API etc.

PushFYI APIs offer all the necessary functions to create real-time features for your applications.

Please refer to the corresponding documentation of the API for specific details. This article will provide you the general overview of the PushFYI API structure.

Client APIs

PushFYI client APIs offer 3 main functions.

  • init

    init API allows your client application to connect to the PushFYI WebSocket gateway. This must be the first call by a client before it can make a call to publish or subscribe real-time data.

    The init API connects your client to PushFYI WebSocket gateway and carries out the PushFYI handshake process. The PushFYI handshake is the key to a successful connection to PushFYI before a client can send or receive real-time data.

  • subscribe

    subscribe API allows your client application to register interest in any type of real-time messages. Clients can register their interest in an event by providing a logical name to it called data channel.

  • publish

    publish API allows your client application to send a real-time message by providing a logical name to it called data channel. The data channel is merely a logical name.

Server APIs

PushFYI Server APIs offers to utilize Server-side events. Server-side events allow your application server to stream real-time data to and from your client application.

You can use server side events to stream data from your nodejs or C# .Net application to your browser or mobile clients. Server APIs are available for multiple platforms. Check our downloads page to download the Server API that suits you best.