codeweird/kulfi-php

Real-time API gateway for next-gen apps

1.0.1 2021-01-06 10:50 UTC

This package is auto-updated.

Last update: 2024-05-06 19:57:41 UTC


README

Real-time API gateway for next-gen apps

Latest Stable Version Total Downloads License: MIT

Installation

Preferred way to install is with Composer.

 composer require codeweird/kulfi-php

Bringing Real-time data to your apps

  • Initiate Kulfi Client
require_once __DIR__ . '/vendor/autoload.php';

use codeweird\Kulfi\Kulfi;

$client = new Kulfi();
  • Connect Client with Kulfi API endpoint using API KEY & APP NAME configured in Kulfi Web Console (https://kulfi.app/console)
$client->connect("API_KEY","APP_NAME","API_ENDPOINT");
  • Push real-time data to all connected clients through channels
$client->push("DATA","CHANNEL_NAME");

//example
$client->push("25","home/Score");
  • Get latest real-time data from the channel
echo $client->pull("CHANNEL_NAME");

//example
echo $client->pull("home/Score");

You're app is now real-time without any web server and DB.

Other Platform Libraries

Available for Android & JavaScript as of now