PHPackages                             onoi/remi - 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. onoi/remi

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

onoi/remi
=========

A small library to mine (parse) REST responses from selected metatdata providers

0.4.0(9y ago)09.9k1GPL-2.0+PHPPHP &gt;=5.3.2

Since Aug 3Pushed 8y ago1 watchersCompare

[ Source](https://github.com/onoi/remi)[ Packagist](https://packagist.org/packages/onoi/remi)[ Docs](https://github.com/onoi/remi)[ RSS](/packages/onoi-remi/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (2)Dependencies (2)Versions (5)Used By (1)

remi
====

[](#remi)

[![Build Status](https://camo.githubusercontent.com/c041f1dc04e7cbd1e01043d6f3039df6e916a2a64052a7687136eb3b78c57a5f/68747470733a2f2f7365637572652e7472617669732d63692e6f72672f6f6e6f692f72656d692e7376673f6272616e63683d6d6173746572)](http://travis-ci.org/onoi/remi)[![Code Coverage](https://camo.githubusercontent.com/a6637f207120b4c1ab7ae28836c425152a3877b800d6fce832dcc30b3361e2a9/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6f6e6f692f72656d692f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/onoi/remi/?branch=master)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/06d2d8995bbf185729527b1c18a7a9570a68ecda4a06d22164bb43be5387e71b/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6f6e6f692f72656d692f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/onoi/remi/?branch=master)[![Latest Stable Version](https://camo.githubusercontent.com/3b52b2ba74e13ea4867d8b12472988b9ad9252910365280c93e1d6bcd5ce67c6/68747470733a2f2f706f7365722e707567782e6f72672f6f6e6f692f72656d692f76657273696f6e2e706e67)](https://packagist.org/packages/onoi/remi)[![Packagist download count](https://camo.githubusercontent.com/c00318965aaff4270d32f9d0b2a0a6cc3dacd036cb3bfd64aa4ecdbc8e4c70df/68747470733a2f2f706f7365722e707567782e6f72672f6f6e6f692f72656d692f642f746f74616c2e706e67)](https://packagist.org/packages/onoi/remi)[![Dependency Status](https://camo.githubusercontent.com/a6952d49612ebe37b2df8d9b24ea1c60f90aa59a5944fb00529b428650f2bf7f/68747470733a2f2f7777772e76657273696f6e6579652e636f6d2f7068702f6f6e6f693a72656d692f62616467652e706e67)](https://www.versioneye.com/php/onoi:remi)

This library is intended to generate a filtered record from a REST/Http metadata provider response (to mine a REST response a.k.a. `remi`). The code base was part of [Semantic Cite](https://github.com/SemanticMediaWiki/SemanticCite/) and is now being deployed as independent library. Supported providers are:

- CrossRef (DOI)
- VIAF
- PubMed (PMID and PMCID)
- OCLC (WorldCat)
- OpenLibrary (OLID, ISBN)

Requirements
------------

[](#requirements)

PHP 5.3 / HHVM 3.5 or later

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

[](#installation)

The recommended installation method for this library is to add the dependency to your [composer.json](https://getcomposer.org/).

```
{
	"require": {
		"onoi/remi": "~0.4"
	}
}
```

Usage
-----

[](#usage)

```
use Onoi\HttpRequest\HttpRequestFactory;
use Onoi\Remi\FilteredHttpResponseParserFactory;

$httpRequestFactory = new HttpRequestFactory()

$filteredHttpResponseParserFactory = new FilteredHttpResponseParserFactory(
	$httpRequestFactory->newCurlRequest()
);
```

```
$crossRefFilteredHttpResponseParser = $filteredHttpResponseParserFactory->newCrossRefFilteredHttpResponseParser(
	new FilteredRecord()
)

$crossRefFilteredHttpResponseParser->doFilterResponseById( '10.1126/science.1152662' );
```

```
$filteredRecord = new FilteredRecord();
$filteredRecord->setRedactedFields( array( 'pages', 'abstract' ) );

$pubMedFilteredHttpResponseParser = $filteredHttpResponseParserFactory->newNcbiPubMedFilteredHttpResponseParser(
	$filteredRecord
)

$pubMedFilteredHttpResponseParser->doFilterResponseById( '19782018' );
```

- The `FilteredHttpResponseParser` (implementing the `ResponseParser` interface) returns a simple `array` filtered from a REST response.
- `FilteredHttpResponseParser::doFilterResponseById` is not expected to make any input validation (in terms of format or range) for the requested response therefore the implementing class is responsible for an appropriate validation process.
- `FilteredRecord::setRedactedFields` can be used to remove selected fields from the record.
- It is further possible to invoke a `CachedCurlRequest` to avoid repeated requests to the same REST API url.

Contribution and support
------------------------

[](#contribution-and-support)

If you want to contribute work to the project please subscribe to the developers mailing list and have a look at the [contribution guidelinee](/CONTRIBUTING.md). A list of people who have made contributions in the past can be found [here](https://github.com/onoi/remi/graphs/contributors).

- [File an issue](https://github.com/onoi/remi/issues)
- [Submit a pull request](https://github.com/onoi/remi/pulls)

### Tests

[](#tests)

The library provides unit tests that covers the core-functionality normally run by the [continues integration platform](https://travis-ci.org/onoi/remi). Tests can also be executed manually using the `composer phpunit` command from the root directory.

### Release notes

[](#release-notes)

- 0.4.0 (2017-05-13)
    - Changed HTTP to HTTPS for Ncbi resources
- 0.3.0 (2016-09-21)
    - Added some additional fields
- 0.2.0 (2015-09-25)
    - Changed `ResponseParser` interface to clarify method names
- 0.1.0 (2015-08-03) Initial release
    - Added `ResponseParser` interface
    - Added `FilteredHttpResponseParserFactory` to provide access to CrossRef, VIAF, PubMed, OCLC, and OpenLibrary REST API

License
-------

[](#license)

[GNU General Public License 2.0 or later](https://www.gnu.org/copyleft/gpl.html).

###  Health Score

29

—

LowBetter than 59% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity22

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 94.1% 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 ~216 days

Total

4

Last Release

3293d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/372f9bc1233d5518b9522cb681210a8de2765a3a9bbde20138f6ad5332a411ca?d=identicon)[mwjames](/maintainers/mwjames)

---

Top Contributors

[![mwjames](https://avatars.githubusercontent.com/u/1245473?v=4)](https://github.com/mwjames "mwjames (16 commits)")[![kghbln](https://avatars.githubusercontent.com/u/1104078?v=4)](https://github.com/kghbln "kghbln (1 commits)")

---

Tags

rest

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/onoi-remi/health.svg)

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

###  Alternatives

[zircote/swagger-php

Generate interactive documentation for your RESTful API using PHP attributes (preferred) or PHPDoc annotations

5.3k132.9M468](/packages/zircote-swagger-php)[psr/link

Common interfaces for HTTP links

2.5k144.1M68](/packages/psr-link)[league/fractal

Handle the output of complex data structures ready for API output.

3.5k64.1M476](/packages/league-fractal)[friendsofsymfony/rest-bundle

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

2.8k73.3M319](/packages/friendsofsymfony-rest-bundle)[lexik/jwt-authentication-bundle

This bundle provides JWT authentication for your Symfony REST API

2.6k58.7M210](/packages/lexik-jwt-authentication-bundle)[nelmio/api-doc-bundle

Generates documentation for your REST API from attributes

2.3k63.6M233](/packages/nelmio-api-doc-bundle)

PHPackages © 2026

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