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

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

paulbunyannet/api
=================

Shortcut for making http api calls

1.5.1(8y ago)02.0kMITPHPPHP &gt;=5.4.0

Since Sep 14Pushed 8y ago2 watchersCompare

[ Source](https://github.com/paulbunyannet/api)[ Packagist](https://packagist.org/packages/paulbunyannet/api)[ RSS](/packages/paulbunyannet-api/feed)WikiDiscussions master Synced 2w ago

READMEChangelog (1)Dependencies (4)Versions (14)Used By (0)

paulbunyannet/api
=================

[](#paulbunyannetapi)

[![Build Status](https://camo.githubusercontent.com/00901259b1686ec2db594668e8293232af42225a9b13a531948fc29406af8d3c/68747470733a2f2f7472617669732d63692e6f72672f7061756c62756e79616e6e65742f6170692e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/paulbunyannet/api)[![Latest Version](https://camo.githubusercontent.com/925f4128a6e69e9023dd013c4b2e25546dc35cae949e09d20e219d0cbb48a7d3/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7061756c62756e79616e6e65742f6170692e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/paulbunyannet/api)[![Coverage Status](https://camo.githubusercontent.com/fa9cf8a04e26752bf13be8918429f4d1c7aad7894eca097156f411dc79a73f4e/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f7061756c62756e79616e6e65742f6170692f62616467652e737667)](https://coveralls.io/github/paulbunyannet/api)

**paulbunyannet/api** Shortcut for making http calls to json endpoint

Installation
------------

[](#installation)

This project can be installed via \[Composer\]:

```
$ composer require paulbunyannet/api:^1.0
```

Request Methods:
----------------

[](#request-methods)

### Get

[](#get)

```
$getArgs = ['something' => ,'something_else'];
$get = new Get('https://pathtoapi.com/get/?'.http_build_query($getArgs));
$retrieve = $get->retrieve();
var_dump($retrieve); // { "some_response_key" => "some_response_value" }
```

```
$getArgs = ['something' => ,'something_else'];
$get = new Get('https://pathtoapi.com/get/?'.http_build_query($getArgs));
$retrieve = $get->retrieve();
var_dump($retrieve); // { "some_response_key" => "some_response_value" }
```

### Post

[](#post)

```
$postArgs = ['something' => ,'something_else'];
$post = new Post('https://pathtoapi.com/post');
$retrieve = $post->retrieve($postArgs);
var_dump($retrieve); // { "some_response_key" => "some_response_value" }
```

### Put

[](#put)

```
$postArgs = ['something' => ,'something_else'];
$put = new Put('https://pathtoapi.com/put');
$retrieve = $put->retrieve($postArgs);
var_dump($retrieve); // { "some_response_key" => "some_response_value" }
```

### Delete

[](#delete)

```
$delete = new Put('https://pathtoapi.com/delete/user/1');
$retrieve = $delete->retrieve();
var_dump($retrieve); // { "success" => "true" }
```

Headers
-------

[](#headers)

Header array can be passed into a new object:

```
$getArgs = ['something' => ,'something_else'];
$get = new Get('https://pathtoapi.com/get/?'.http_build_query($getArgs));
// headers to pass with request
$get->setHeaders(['headerKey' => 'headerValue']);
$retrieve = $get->retrieve();
var_dump($retrieve); // { "some_response_key" => "some_response_value" }
```

The header "headerKey: headerValue" will then be passed on with the REST request

Authentication
--------------

[](#authentication)

Each request method can use payload authentication and then check that payload on the receiving end

```
// on the sender side:
$postArgs = ['something' => ,'something_else'];
$identity = 'my-user-name'; // used for looking up private key on the receiving side
$privateKey = "my-super-secret-key";
$post = new Post('https://pathtoapi.com/post');
$post->setPayload([Auth\AuthBootstrap::IDENTITY => $identity, Auth\AuthBootstrap::PRIVATEKEY => $privateKey]);
$retrieve = $post->retrieve($postArgs);

// then on the receiving side:
$lookUpPrivateKey = 'my-super-secret-key'; // this is where you would do a lookup for user's private key by the ideney key that was sent with the request
$receiver = new Auth\Receive($_POST['payload'], $lookUpPrivateKey);
$verifyHash = receiver->verifyHash($_POST); // will return true if payload hash sent is correct
```

###  Health Score

31

—

LowBetter than 66% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 95% 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 ~54 days

Recently: every ~90 days

Total

13

Last Release

3280d ago

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

1.4.0PHP &gt;=5.6.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/10351920?v=4)[Paul Bunyan Communications](/maintainers/paulbunyannet)[@paulbunyannet](https://github.com/paulbunyannet)

---

Top Contributors

[![natenolting](https://avatars.githubusercontent.com/u/8352600?v=4)](https://github.com/natenolting "natenolting (19 commits)")[![paulbunyannet](https://avatars.githubusercontent.com/u/10351920?v=4)](https://github.com/paulbunyannet "paulbunyannet (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[php-http/cache-plugin

PSR-6 Cache plugin for HTTPlug

25025.5M80](/packages/php-http-cache-plugin)[illuminate/http

The Illuminate Http package.

11937.2M6.5k](/packages/illuminate-http)[rdkafka/rdkafka

A PHP extension for Kafka

2.2k20.0k1](/packages/rdkafka-rdkafka)[httpsoft/http-message

Strict and fast implementation of PSR-7 and PSR-17

87930.4k113](/packages/httpsoft-http-message)[mezzio/mezzio-router

Router subcomponent for Mezzio

265.3M84](/packages/mezzio-mezzio-router)[serpapi/google-search-results-php

Get Google, Bing, Baidu, Ebay, Yahoo, Yandex, Home depot, Naver, Apple, Duckduckgo, Youtube search results via SerpApi.com

69122.6k](/packages/serpapi-google-search-results-php)

PHPackages © 2026

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