PHPackages                             chipslays/tas-wrapper - 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. chipslays/tas-wrapper

ActiveLibrary[API Development](/categories/api)

chipslays/tas-wrapper
=====================

Simple API wrapper for easy manage TelegramApiServer.

0.0.6(5y ago)015MITPHP

Since Dec 12Pushed 5y ago1 watchersCompare

[ Source](https://github.com/chipslays/tas-wrapper)[ Packagist](https://packagist.org/packages/chipslays/tas-wrapper)[ RSS](/packages/chipslays-tas-wrapper/feed)WikiDiscussions main Synced 2d ago

READMEChangelog (6)DependenciesVersions (7)Used By (0)

tas-wrapper
===========

[](#tas-wrapper)

Simple API wrapper for easy manage [TelegramApiServer](https://github.com/xtrime-ru/TelegramApiServer) in your project.

### Install

[](#install)

```
composer require chipslays/tas-wrapper
```

### Example

[](#example)

#### Client

[](#client)

All methods from MadelineProto supported, methods list [here](https://docs.madelineproto.xyz/API_docs/methods/).

```
use TelegramApiServer\Client;

require 'vendor/autoload.php';

$client = new Client([
    'host' => '127.0.0.1',
    'port' => '9503',
    'session' => 'session_name',
]);

$response = $client->get('getSelf')->execute(); // GET request
$response = $client->post('getSelf')->execute(); // POST request

$response = $client->get('messages.sendMessage', [
    'peer' => '@chipslays',
    'message' => 'Hello from tas-wrapper! 👋',
    'parse_mode' => 'html',
])->execute();
```

Also, you can define curl option by `option(NAME_OPTION, 'value')` method.

```
$response = $client
                ->get('getSelf')
                ->option(CURLOPT_TIMEOUT, 60)
                ->option(CURLOPT_HEADER, false)
                ->execute();
```

Map your own methods (aliases), it so simple:

```
$client->map('sendMessage', fn($peer, $text) => $client->get('messages.sendMessage', [
    'peer' => $peer,
    'message' => $text,
])->execute());

$response = $client->sendMessage('@chipslays', 'so simple!');
```

Each time the `sendMessage` method is called, the function from the second parameter **will be executed again**.

If you need the function to work **only once**, and then return only the result of execution in subsequent times, use the `mapOnce()` method instead of `map()`.

```
$client->mapOnce('getSelf', fn() => $client->get('getSelf')->execute());

$me = $client->getSelf();
```

#### Session

[](#session)

Manage TelegramApiServer session, more detail [here](https://github.com/xtrime-ru/TelegramApiServer#session-management).

```
use TelegramApiServer\Session;

require 'vendor/autoload.php';

// This is example of default config
// NOTE: If you have the same data, you can skip this
Session::setConfig([
    'host' => '127.0.0.1',
    'port' => '9503',
    'schema' => 'http',
]);

// Get sessions list
$response = Session::list();

// Adding new session
$response = Session::add('session_name');

// Removing session (session file will remain)
$response = Session::remove('session_name');

// Remove session file
// WARNING: Don`t forget to logout and call `removeSession` first!
$response = Session::unlink('session_name');
```

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity48

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.

###  Release Activity

Cadence

Every ~7 days

Total

6

Last Release

1941d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/19103498?v=4)[chipslays](/maintainers/chipslays)[@chipslays](https://github.com/chipslays)

---

Top Contributors

[![chipslays](https://avatars.githubusercontent.com/u/19103498?v=4)](https://github.com/chipslays "chipslays (22 commits)")

---

Tags

php-librarywrapper-api

### Embed Badge

![Health badge](/badges/chipslays-tas-wrapper/health.svg)

```
[![Health](https://phpackages.com/badges/chipslays-tas-wrapper/health.svg)](https://phpackages.com/packages/chipslays-tas-wrapper)
```

###  Alternatives

[stripe/stripe-php

Stripe PHP Library

4.0k143.3M480](/packages/stripe-stripe-php)[twilio/sdk

A PHP wrapper for Twilio's API

1.6k92.9M272](/packages/twilio-sdk)[knplabs/github-api

GitHub API v3 client

2.2k15.8M187](/packages/knplabs-github-api)[facebook/php-business-sdk

PHP SDK for Facebook Business

90121.9M34](/packages/facebook-php-business-sdk)[meilisearch/meilisearch-php

PHP wrapper for the Meilisearch API

73813.7M114](/packages/meilisearch-meilisearch-php)[google/gax

Google API Core for PHP

263103.1M454](/packages/google-gax)

PHPackages © 2026

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