PHPackages                             bookin/broscript - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. bookin/broscript

ActiveLibrary[API Development](/categories/api)

bookin/broscript
================

BroScript php api sdk

05PHP

Since Sep 21Pushed 9y ago1 watchersCompare

[ Source](https://github.com/bookin/broscript-sdk-php)[ Packagist](https://packagist.org/packages/bookin/broscript)[ RSS](/packages/bookin-broscript/feed)WikiDiscussions master Synced 4w ago

READMEChangelogDependenciesVersions (1)Used By (0)

How to Use
----------

[](#how-to-use)

The following section explains how to use the BroScript library in a new project.

How to Test
-----------

[](#how-to-test)

Unit tests in this SDK can be run using PHPUnit.

1. First install the dependencies using composer including the `require-dev` dependencies.
2. Run `vendor\bin\phpunit --verbose` from commandline to execute tests. If you have installed PHPUnit globally, run tests using `phpunit --verbose` instead.

You can change the PHPUnit test configuration in the `phpunit.xml` file.

Initialization
--------------

[](#initialization)

#### Authentication and Initialization

[](#authentication-and-initialization)

In order to setup authentication and initialization of the API client, you need the following information.

ParameterDescriptionuserKeyUser KeyscriptKeyScript KeyAPI client can be initialized as following.

```
// Configuration parameters and credentials
$userKey = "userKey"; // User Key
$scriptKey = "scriptKey"; // Script Key

//The singleton instance of the ``` APIController ``` class can be accessed from the API Client.
$client = BroScriptClient::getInstance($userKey, $scriptKey);
```

Class Reference
===============

[](#class-reference)

List of Controllers
------------------------------------------------------------------

[](#list-of-controllers)

### [![Method: ](https://camo.githubusercontent.com/b5e9cf2edc4a16156670451b34ae7fa43680b64306e988666b321b1002024a95/687474703a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67 ".APIController.cleanHistory")](https://camo.githubusercontent.com/b5e9cf2edc4a16156670451b34ae7fa43680b64306e988666b321b1002024a95/687474703a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67) cleanHistory

[](#-cleanhistory)

> TODO: Add a method description

```
function cleanHistory($chatId = NULL)
```

#### Parameters:

[](#parameters)

ParameterTagsDescriptionchatId`Optional`chat id#### Example Usage:

[](#example-usage)

```
$chatId = 'chat_id';

$result = $client->cleanHistory($chatId);
```

### [![Method: ](https://camo.githubusercontent.com/b5e9cf2edc4a16156670451b34ae7fa43680b64306e988666b321b1002024a95/687474703a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67 ".APIController.templates")](https://camo.githubusercontent.com/b5e9cf2edc4a16156670451b34ae7fa43680b64306e988666b321b1002024a95/687474703a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67) templates

[](#-templates)

> Get array with templates

```
function templates()
```

#### Example Usage:

[](#example-usage-1)

```
$result = $client->templates();
```

### [![Method: ](https://camo.githubusercontent.com/b5e9cf2edc4a16156670451b34ae7fa43680b64306e988666b321b1002024a95/687474703a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67 ".APIController.answers")](https://camo.githubusercontent.com/b5e9cf2edc4a16156670451b34ae7fa43680b64306e988666b321b1002024a95/687474703a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67) answers

[](#-answers)

> Get answer

```
function answers(
        $chatId = NULL,
        $contact = NULL,
        $external = NULL,
        $stopIsNull = false,
        $repeatIsNull = false)
```

#### Parameters:

[](#parameters-1)

ParameterTagsDescriptionchatId`Optional`Chat idcontact`Optional` `Collection`Object with information about concatexternal`Optional` `Collection`Object with information about externalstopIsNull`Optional` `DefaultValue`Stop is nullrepeatIsNull`Optional` `DefaultValue`Stop is null#### Example Usage:

[](#example-usage-2)

```
$chatId = 'chat_id';
$contact = array('contact');
$external = array('external');
$stopIsNull = false;
$repeatIsNull = false;

$result = $client->answers($chatId, $contact, $external, $stopIsNull, $repeatIsNull);
```

[Back to List of Controllers](#list_of_controllers)

###  Health Score

20

—

LowBetter than 13% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/e42ca3ca9dd9b6a27b809ff12add877756d868499929dbf3ec15bc6564bdd0a0?d=identicon)[bookin](/maintainers/bookin)

---

Top Contributors

[![bookin](https://avatars.githubusercontent.com/u/537882?v=4)](https://github.com/bookin "bookin (3 commits)")

### Embed Badge

![Health badge](/badges/bookin-broscript/health.svg)

```
[![Health](https://phpackages.com/badges/bookin-broscript/health.svg)](https://phpackages.com/packages/bookin-broscript)
```

###  Alternatives

[exsyst/swagger

A php library to manipulate Swagger specifications

35816.3M7](/packages/exsyst-swagger)[hubspot/api-client

Hubspot API client

24015.5M18](/packages/hubspot-api-client)[pocketmine/bedrock-protocol

An implementation of the Minecraft: Bedrock Edition protocol in PHP

172437.8k11](/packages/pocketmine-bedrock-protocol)[botman/driver-telegram

Telegram driver for BotMan

94452.6k6](/packages/botman-driver-telegram)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
