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

ActiveLibrary[API Development](/categories/api)

h4d/api-response
================

H4D API response

v1.0.8(9y ago)012proprietaryPHPPHP &gt;=5.5.9

Since Nov 20Pushed 8y agoCompare

[ Source](https://github.com/h4d/api-response)[ Packagist](https://packagist.org/packages/h4d/api-response)[ RSS](/packages/h4d-api-response/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (1)Versions (10)Used By (0)

¿Qué es esto?
=============

[](#qué-es-esto)

Clases básicas para a instanciación de respuestas tipo API.

Instalación vía composer:
=========================

[](#instalación-vía-composer)

Esta biblioteca puede instalarse vía composer añadiendo esto a tu fichero composer.json:

"require": { "h4d/api-response": "^1.0" }

Uso directo
===========

[](#uso-directo)

```
$resp = new ApiResponse(10000, ['version'=>'1.0'], 'Success!');

```

Uso en cliente
==============

[](#uso-en-cliente)

```
// Array proveniente de descodificar un JSON de respuesta.
$dataArray = ['code'=>10000, 'data'=> ['version'=>'v1.0'], 'message'=>'Success!'];
// Obtengo el objeto de respuesta a partir de la factoría.
$resp = ApiResponseFactory::i()->fromArray($dataArray);
if ($resp->isOK())
{
    // Hago cosas...
}

```

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 93.3% 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 ~46 days

Recently: every ~91 days

Total

9

Last Release

3453d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/203d343ddfac06e27c0d5c04a281449d649c2a6d0f2368f43a671015ee589e5d?d=identicon)[retrinko](/maintainers/retrinko)

---

Top Contributors

[![retrinko](https://avatars.githubusercontent.com/u/17164968?v=4)](https://github.com/retrinko "retrinko (14 commits)")[![edusalguero](https://avatars.githubusercontent.com/u/7685257?v=4)](https://github.com/edusalguero "edusalguero (1 commits)")

---

Tags

responseapi

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[nilportugues/jsonapi-bundle

Symfony 2 &amp; 3 JSON API Transformer Package

11446.0k](/packages/nilportugues-jsonapi-bundle)[nilportugues/json-api

Serializer transformers outputting valid API responses in JSON, JSON API and HAL+JSON API formats.

70106.2k3](/packages/nilportugues-json-api)[nilportugues/api-problems

PSR7 Response implementation for the Problem Details for HTTP APIs

1749.4k2](/packages/nilportugues-api-problems)[dugajean/laravel-yaml

YAML parser for Laravel.

144.8k](/packages/dugajean-laravel-yaml)[nicklaw5/larapi

A simple Laravel 5 class for handling json api responses.

111.5k](/packages/nicklaw5-larapi)

PHPackages © 2026

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