Download the PHP package jawabapp/chat-sdk without Composer

On this page you can find all versions of the php package jawabapp/chat-sdk. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package chat-sdk

JawabChat App SDK

JawabChat is a chat application that you can integrate to your services easily to gain your structure a chat feature. This library will help you to integrate chat feature easily.

Installation

you can use composer directly to install this library to your application:

Your Responsibilities

Before using JawabChat application as service, your service needs to provide some features.

Service Token

We are expecting a service token as a string to be able to reach your services. We will send this token in the header as "Accept-Token" field to reach your endpoints.

User API

We need a user API to get your user information to our side. We will create a user for you to chat with your clients with this user. Your user phone will be our primary key of the service. You should send a unique user phone number. You need to create an API endpoint which is working with a service token, have already provided by you.

We will send you a request to get user information like below:

The response of this API should be JSON and the structure should be like below:

Topic List API

We need a topic endpoint to handle topics of the chats. We will send a request to get the topics while creating a chat for you:

This endpoint should return a JSON response and the structure should be like below :

SDK Features

Send Channel

You can send a message to your users.

Receive Channel

You can receive the response of the user on JawabChat. For this, you only need a token:

Response Message Structure

Response Sender Structure

This feature will work forever. Maybe, you need to work this feature as a service.

Supervisor

http://supervisord.org/index.html

Adding a Program

The program configuration files for Supervisor programs are found in the /etc/supervisor/conf.d directory, normally with one program per file and a .conf extension. A simple configuration for our script, saved at /etc/supervisor/conf.d/chat_receiver.conf, would look like so:

Once our configuration file is created and saved, we can inform Supervisor of our new program through the supervisorctl command. First we tell Supervisor to look for any new or changed program configurations in the /etc/supervisor/conf.d directory with:

Followed by telling it to enact any changes with:

Any time you make a change to any program configuration file, running the two previous commands will bring the changes into effect.

Managing Programs

Once our programs are running, there will undoubtedly be a time when we want to stop, restart, or see their status. The supervisorctl program, which we first used above, also has an interactive mode through which we can issue commands to control our programs.

To enter the interactive mode, start supervisorctl with no arguments:

When started, supervisorctl will initially print the status and uptime of all programs, followed by showing a command prompt. Entering help will reveal all of the available commands that we can use:

supervisor> help

To start in a simple manner, we can start, stop and restart a program with the associated commands followed by the program name:

Using status we can view again the current execution state of each program after making any changes:

Finally, once we are finished, we can exit supervisorctl with Ctrl-C or by entering quit into the prompt:

And that's it! You've mastered the basics of managing persistent programs through Supervisor and extending this to your own programs should be a relatively simple task. If you have any questions or further advice, be sure to leave it in the comments section.

Credits


All versions of chat-sdk with dependencies

PHP Build Version
Package Version
Requires php Version >=5.5.9
guzzlehttp/guzzle Version *
ext-json Version *
bluerhinos/phpmqtt Version @dev
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package jawabapp/chat-sdk contains the following files

Loading the files please wait ....