PHPackages                             farpat/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. [HTTP &amp; Networking](/categories/http)
4. /
5. farpat/api

ActiveLibrary[HTTP &amp; Networking](/categories/http)

farpat/api
==========

API Client in PHP

1.1.7(5y ago)153[1 PRs](https://github.com/farpat/api-php/pulls)PHPPHP &gt;=7.4CI failing

Since Aug 20Pushed 3mo agoCompare

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

READMEChangelogDependencies (2)Versions (12)Used By (0)

[![Build Status](https://camo.githubusercontent.com/0ecda584abebd2eb0a53306bd688522bab32a2bb33d97490fd3ad912474fefb2/68747470733a2f2f7472617669732d63692e6f72672f6661727061742f6170692d7068702e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/farpat/api-php)

Installation
============

[](#installation)

`composer require farpat/api`

Use
===

[](#use)

You can use verb " POST, GET PUT, PATCH and DELETE ". Here are some examples of use to understand functionnalities:

```
use Farpat\Api\Api;

$users = (new Api)
    ->setPathToCertificat('/path/to/certificat')
    ->setToken('your_token', 'BEARER')
    ->setUserPassword('username', 'password')
    ->get('https://my-site.com/users');
/*
equivalent to:
curl GET https://my-site.com/users
--cert /path/to/certificat
-H "Authorization: BEARER your_token"
-u "username:password"
*/

$posts = (new Api)
    ->setUrl('https://jsonplaceholder.typicode.com/comments')
    ->get(null, ['postId' => 2]);
/*
equivalent to:
curl GET https://jsonplaceholder.typicode.com/comments?postId=2
*/

$data = ['data-key-1' => 'data-value-1', 'data-key-2' => 'data-value-2'];
$headers = ['Header-1' => 'header-value-1', 'Header-2' => 'header-value-2'];
$post = (new Api)
    ->setUrl('https://jsonplaceholder.typicode.com')
    ->put('/posts/1', $data, $headers);
/*
equivalent to:
CURL PUT https://jsonplaceholder.typicode.com
-d '{"data-key-1": "data-value-1", "data-key-2": "data-value-2"}'
-H  "Header-1: header-value-1"
-H  "Header-2: header-value-2"
*/
```

###  Health Score

37

—

LowBetter than 83% of packages

Maintenance53

Moderate activity, may be stable

Popularity10

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity65

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

Recently: every ~21 days

Total

10

Last Release

2109d ago

PHP version history (2 changes)1.0.0PHP &gt;=7.1.0

1.1.6PHP &gt;=7.4

### Community

Maintainers

![](https://www.gravatar.com/avatar/43ca5122cff97882666e2c0fe66ddf70806afdca85167faed8bf568fdb45bb45?d=identicon)[pfarrugia](/maintainers/pfarrugia)

---

Top Contributors

[![farpat](https://avatars.githubusercontent.com/u/24484284?v=4)](https://github.com/farpat "farpat (10 commits)")

---

Tags

curlphp

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[friendsofsymfony/rest-bundle

This Bundle provides various tools to rapidly develop RESTful API's with Symfony

2.8k73.3M319](/packages/friendsofsymfony-rest-bundle)[php-http/discovery

Finds and installs PSR-7, PSR-17, PSR-18 and HTTPlug implementations

1.3k309.5M1.2k](/packages/php-http-discovery)[nyholm/psr7

A fast PHP7 implementation of PSR-7

1.3k235.4M2.4k](/packages/nyholm-psr7)[pusher/pusher-php-server

Library for interacting with the Pusher REST API

1.5k94.8M293](/packages/pusher-pusher-php-server)[spatie/crawler

Crawl all internal links found on a website

2.8k16.3M52](/packages/spatie-crawler)[react/http

Event-driven, streaming HTTP client and server implementation for ReactPHP

78126.4M414](/packages/react-http)

PHPackages © 2026

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