Download the PHP package richdynamix/chatbase-api without Composer

On this page you can find all versions of the php package richdynamix/chatbase-api. 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 chatbase-api

Chatbase API for PHP and Laravel

Chatbase is a Chatbot analytics service by Google.

This is the unofficial Chatbase API for PHP. It focuses heavily on the Laravel Framework however it will work in any standalone project with usage of Composer.

Installation

This package can be installed through Composer.

Framework Agnostic Usage

Laravel Usage

In Laravel >5.5 the package will auto register the service provider. In Laravel 5.4 you must install this service provider.

In Laravel >5.5 the package will auto register the facades. In Laravel 5.4 you must install the facade manually.

You can publish the config file of this package with this command:

The following config file will be published in config/chatbase.php

Only the Generic Messaging API is setup at present

IoC container

The IoC container will automatically resolve the GenericMessage dependencies for you. You can grab an instance of GenericMessage from the IoC container in a number of ways.

Alternatively you may use the Chatbase facade directly

Fields (keys) that can be set using the with() method. (Passed as an array)

field type required description
user_id string Y the ID of the end-user
message string N the raw message body regardless of type for example a typed-in or a tapped button or tapped image
intent string N set for user messages only; if not set usage metrics will not be shown per intent; do not set if it is a generic catch all intent, like default fallback, so that clusters of similar messages can be reported
version string N set for user and bot messages; used to track versions of your code or to track A/B tests
custom_session_id string N set for user and bot messages; used to define your own custom sessions for Session Flow report and daily session metrics

Usage

All methods take the same parameters in the following order -

Send a user message to Chatbase

Example Response -

Send a user message to Chatbase for a different platform

Example Response -

Send a user message to Chatbase while logging a version

Example Response -

Send a user message to Chatbase with intent

Example Response -

Send failed user message not handled by the bot

Example Response -

Send a bot message sent back to the user

Response -

Working with multiple bots

Sometime you may wish to push your bot activity to different chatbase accounts. Perhaps you have multiple bots running in the one application. You can easily set the API KEY for each bot on each method call.

Example Response -

*Please Note: Invalid fields sent to Chatbase may result in a successful entry however, you will receive a 400 error and a WrongDataSet exception will be thrown. This is common when you set fields like intent for bot messages.

Changelog

Please see CHANGELOG for more information what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email [email protected] instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.


All versions of chatbase-api with dependencies

PHP Build Version
Package Version
Requires php Version ^7.1
guzzlehttp/guzzle Version ^6.3
illuminate/contracts Version ~5.5.0|~5.6.0|~5.7.0|~5.8.0
illuminate/support Version ~5.5.0|~5.6.0|~5.7.0|~5.8.0
nesbot/carbon Version ^1.22
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 richdynamix/chatbase-api contains the following files

Loading the files please wait ....