PHPackages                             vasilukwolf/php-lion - 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. vasilukwolf/php-lion

ActiveLibrary[API Development](/categories/api)

vasilukwolf/php-lion
====================

An example of client implementation for REST API for Guzzle

11PHP

Since Sep 6Pushed 5y ago1 watchersCompare

[ Source](https://github.com/vasilukwolf/php-lion)[ Packagist](https://packagist.org/packages/vasilukwolf/php-lion)[ RSS](/packages/vasilukwolf-php-lion/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependenciesVersions (1)Used By (0)

PHP-Lion
========

[](#php-lion)

An example of client implementation for REST API with Guzzle.

API Legend
----------

[](#api-legend)

You need to write integration to  which allows you to request user data and update it in a third-party system. Initially, we request the user's data, then we change some of their credentials (name and lock flag, their rights) and send the result to the integrated system.

### Authorization

[](#authorization)

To work with the api, you must first log in to the address

- GET method
- login and pass parameters
- where login=test, pass=12345

the result will be a json containing the token

answer:

```
{
   "status":"OK",
   "token":"dsfd79843r32d1d3dx23d32d"
}
```

### Getting user data

[](#getting-user-data)

The api also provides the ability to get user data at the address [https://api.example.org/get-user/{username}?token={token}](https://api.example.org/get-user/%7Busername%7D?token=%7Btoken%7D)

- GET method
- username = muffin
- token = token received during authorization

the result will be a json that contains the user's data

Answer:

```
{
   "status":"OK",
   "active":"1",
   "blocked":false,
   "created_at":1587457590,
   "id":23,
   "name":"Ivanov Ivan",
   "permissions":[
      {
         "id":1,
         "permission":"comment"
      },
      {
         "id":2,
         "permission":"upload photo"
      },
      {
         "id":3,
         "permission":"add event"
      }
   ]
}
```

### Sending user data

[](#sending-user-data)

And the api provides the ability to update user data at [https://api.example.org/user/{user-id}/update?token={token}](https://api.example.org/user/%7Buser-id%7D/update?token=%7Btoken%7D)

- POST method
- request body:

```
{
   "active":"1",
   "blocked":true,
   "name":"Petr Petrovich",
   "permissions":[
      {
         "id":1,
         "permission":"comment"
      }
   ]
}
```

Answer:

```
{
   "status":"OK"
}
```

For each request, in Addition to the standard HTTP response codes, there is an additional parameter "status" that signals the success of the operation:

- OK - Successful
- Not found - User not found
- Error - Any error

###  Health Score

17

—

LowBetter than 6% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity32

Early-stage or recently created project

 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://avatars.githubusercontent.com/u/6550330?v=4)[Vasiluk Dmitry](/maintainers/vasilukwolf)[@vasilukwolf](https://github.com/vasilukwolf)

---

Top Contributors

[![vasilukwolf](https://avatars.githubusercontent.com/u/6550330?v=4)](https://github.com/vasilukwolf "vasilukwolf (5 commits)")

### Embed Badge

![Health badge](/badges/vasilukwolf-php-lion/health.svg)

```
[![Health](https://phpackages.com/badges/vasilukwolf-php-lion/health.svg)](https://phpackages.com/packages/vasilukwolf-php-lion)
```

###  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)
