PHPackages                             lexonouri/serwisant-api - 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. lexonouri/serwisant-api

ActiveLibrary[API Development](/categories/api)

lexonouri/serwisant-api
=======================

API client for https://serwisant.online service

3.0.5(5y ago)110Apache-2.0PHP

Since Jul 19Pushed 5y agoCompare

[ Source](https://github.com/Lexonouri/serwisant-api-php-sdk)[ Packagist](https://packagist.org/packages/lexonouri/serwisant-api)[ Docs](https://github.com/Lexonouri/serwisant-api-php-sdk)[ RSS](/packages/lexonouri-serwisant-api/feed)WikiDiscussions master Synced 5d ago

READMEChangelog (1)Dependencies (1)Versions (8)Used By (0)

Serwisant Online PHP SDK
========================

[](#serwisant-online-php-sdk)

Installation:
-------------

[](#installation)

To install this package in composer environment use:

`composer require lexonouri/serwisant-api`

Requirements:
-------------

[](#requirements)

- PHP 7.2 or higher
- ext-mbstring
- ext-curl

Word about versioning
---------------------

[](#word-about-versioning)

Versioning of SDK is very important. It looks like `3..`, eg. `3.0.1`. When you're including SDK into your composer config, it's strongly recommended to set major version as fixed, eg:

```
"require": {
    "lexonouri/serwisant-api": "3.0.*"
},

```

It's important, because of typed queries and mutations. If schema will change, arguments passed to queries and mutations will change as well. It can be new required arguments or even order of arguments can change. In that case SDK will e released with incremented major version. If you'll decide to upgrade, it can break your application.

**You have being warned.**

There is a single exception to that. `internal` schema is not for public consumption. Breaking changes will be excluded from above rules.

Usage:
------

[](#usage)

First of all, prepare an instance of API for later use, it should be shared across whole application

```
use Serwisant\SerwisantApi;

// get own client and secret by creating an application via webpage
// 4th argument is a access token cache, it's optional, but recommended for performance reasons
$access_token = new SerwisantApi\AccessTokenOauth('client', 'secret', 'public', (new SerwisantApi\AccessTokenContainerFile));

$api = new SerwisantApi\Api();
$api->setAccessToken($access_token);
```

Basic example with inline query

```
/* please note __typename at each type - it's required for proper typecast */
$query = '
query($token: String!) {
    repairByToken(token: $token) {
      __typename
      displayName
      status {
        __typename
        displayName
      }
    }
}';

/* @var SerwisantApi\Types\SchemaPublic\Repair $repair */
$repair = $api->publicQuery()->newRequest()->set($query, ['token' => 'abc-def'])->execute()->fetch();

echo $repair->displayName;
echo $repair->status->displayName;
```

Example with batched query - use batches as more, as you can for performance reasons. Batching queries reduce HTTP traffic.

```
/* please note __typename at each type - it's required for proper typecast */
$query = '
query($token: String!) {
  repair: repairByToken(token: $token) {
    __typename
    displayName
  }
  me: viewer {
    __typename
    employee {
      __typename
      displayName
    }
  }
}';

$result = $api->publicQuery()->newRequest()->set($query, ['token' => 'abc-def'])->execute();

$repair = $result->fetch('repair');
$me = $result->fetch('me');

echo $repair->displayName;
echo $me->displayName;
```

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity68

Established project with proven stability

 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 ~191 days

Recently: every ~35 days

Total

7

Last Release

2073d ago

Major Versions

2.0 → 3.0.02020-04-21

### Community

Maintainers

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

---

Top Contributors

[![arekk](https://avatars.githubusercontent.com/u/992535?v=4)](https://github.com/arekk "arekk (36 commits)")

### Embed Badge

![Health badge](/badges/lexonouri-serwisant-api/health.svg)

```
[![Health](https://phpackages.com/badges/lexonouri-serwisant-api/health.svg)](https://phpackages.com/packages/lexonouri-serwisant-api)
```

###  Alternatives

[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3731.2M42](/packages/tencentcloud-tencentcloud-sdk-php)[convertkit/convertkitapi

Kit PHP SDK for the Kit API

2167.1k1](/packages/convertkit-convertkitapi)[mapado/rest-client-sdk

Rest Client SDK for hydra API

1125.9k2](/packages/mapado-rest-client-sdk)

PHPackages © 2026

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