Download the PHP package filippo-toso/driver-rocket-chat without Composer

On this page you can find all versions of the php package filippo-toso/driver-rocket-chat. 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 driver-rocket-chat

BotMan Rocket Chat Driver

BotMan driver to create bots for RocketChat

Installation & Setup

First you need to pull in the RocketChat Driver.

Then load the driver before creating the BotMan instance (only when you don't use BotMan Studio):

This driver requires a valid and secure URL in order to set up webhooks and receive events and information from the chat users. This means your application should be accessible through an HTTPS URL.

ngrok is a great tool to create such a public HTTPS URL for your local application. If you use Laravel Valet, you can create it with "valet share" as well.

To connect BotMan with your RocketChat server, you need to:

  1. Create an integration for outgoing messages. You can find more details about this process in the RocketChat documentation.
  2. Create a bot user in RocketChat that will "talk" with the other users.

Once you have setup the integration and created the user, you need to configure the driver. Open the app/config/botman/rocketchat.php file and insert the required information in the token, endpoint and bot parameters. Don't touch the 'matchingKeys' array.

Authentication

To send messages as the bot user the driver needs to authenticate with the REST API. To avoid the need to re-authenticate each time the bot needs to send a message, you can use the RocketChatAuth support class to get the access token and save it for later use. Here is a sample code you can use as a starting point.

You must execute it before creating the BotMan instance. It checks if the auth details are saved in Laravel's cache. If they aren't, RocketChatAuth authenticates with the REST API and saves the access token and user id in the cache for later use. These details are also saved in the botman.rocketchat.auth configuration array where the driver searches for them.

Supported Features

Currently this driver supports only text messages (for both questions and answers). I'm working on the attachment implementation. If you want to contribute, get in touch!


All versions of driver-rocket-chat with dependencies

PHP Build Version
Package Version
Requires php Version >=7.0
botman/botman Version ~2.0
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 filippo-toso/driver-rocket-chat contains the following files

Loading the files please wait ....