{"id":36265701,"url":"https://github.com/olssonm/roaring","last_synced_at":"2026-01-11T08:02:47.713Z","repository":{"id":52435690,"uuid":"165063373","full_name":"olssonm/roaring","owner":"olssonm","description":"Simple API-wrapper for Roaring.io's products.","archived":false,"fork":false,"pushed_at":"2024-09-17T11:44:45.000Z","size":49,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-11-27T15:44:04.029Z","etag":null,"topics":["api","laravel","php","roaring"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/olssonm.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":["olssonm"]}},"created_at":"2019-01-10T13:19:22.000Z","updated_at":"2024-09-17T11:43:32.000Z","dependencies_parsed_at":"2022-08-23T17:40:53.692Z","dependency_job_id":null,"html_url":"https://github.com/olssonm/roaring","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/olssonm/roaring","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/olssonm%2Froaring","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/olssonm%2Froaring/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/olssonm%2Froaring/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/olssonm%2Froaring/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/olssonm","download_url":"https://codeload.github.com/olssonm/roaring/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/olssonm%2Froaring/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28297981,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-11T04:44:51.577Z","status":"ssl_error","status_checked_at":"2026-01-11T04:44:44.232Z","response_time":60,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","laravel","php","roaring"],"created_at":"2026-01-11T08:02:47.139Z","updated_at":"2026-01-11T08:02:47.702Z","avatar_url":"https://github.com/olssonm.png","language":"PHP","funding_links":["https://github.com/sponsors/olssonm"],"categories":[],"sub_categories":[],"readme":"# Roaring.io API-wrapper\n\n[![Latest Version on Packagist][ico-version]][link-packagist]\n[![Software License][ico-license]](LICENSE.md)\n[![Software License][ico-php]][link-packagist]\n[![Scrutinizer Score][ico-scrutinizer]][link-scrutinizer]\n\nThis is a (very) simple wrapper for the [roaring.io](https://www.roaring.io/en/) API.\n\nThe wrapper is designed to be quick and easy to use – no fuzz. Just create a new object with your API-keys and then call the endpoint you want to call. Though you yourself has to do the data-manipulation to your needs and liking.\n\nThe package also includes a service provider for Laravel.\n\nOn a sidenote; this package uses the [httpful](https://github.com/nategood/httpful)-library for the HTTP-requests. While [Guzzle](https://github.com/guzzle/guzzle) and the like may generally be recommended, it is easy to introduce conflicts in some frameworks with different versions of those more common libraries.\n\n## Requirements\n\nPHP ^7.3 / ^8.0\n\nIf you want to use the Laravel Service Provider, Laravel 5.5 and above is supported.\n\n## Installation\n\n```php\n$ composer require olssonm/roaring\n```\n\n### Laravel\n\nLaravel should auto-discover the service provider. You may also manually add it to your providers-array in `config/app.php`:\n\n```php\n'providers' =\u003e [\n    Olssonm\\Roaring\\Laravel\\ServiceProvider::class\n]\n```\n\nYou may set an alias using the facade in `config/app.php`:\n\n```php\n'aliases' =\u003e [\n    'Roaring' =\u003e Olssonm\\Roaring\\Laravel\\Facades\\Roaring::class\n]\n```\n\nFor the Roaring object to initialise properly using dependancy injection/the facade, you will need to set your key and secret in `/config/services.php`:\n\n```\n'roaring' =\u003e [\n    'key' =\u003e env('ROARING_KEY', 'xxx'),\n    'secret' =\u003e env('ROARING_SECRET', 'zzz')\n]\n```\n\n## Usage\n\nUsing the wrapper is very simple – just initiate the object and call the endpoint you wish to use.\n\nUsed standalone/via main class:\n\n```php\nuse \\Olssonm\\Roaring\\Roaring;\n\n$response = (new Roaring('key', 'secret'))\n    -\u003eget('/se/company/overview/1.1/5567164818')\n    -\u003egetResponse();\n```\n\nVia the Laravel facade/dependancy injection:\n\n```php\nuse Roaring;\n\n$response = Roaring::get('/se/company/overview/1.1/5567164818')\n    -\u003egetResponse();\n```\n\nRoaring.io uses the OAuth-protocol – currently a new OAuth token is created automatically upon initialisation unless an already existing token is passed to the `Roaring`-constructor.\n\nBecause the `getResponse()`-method always returns the latest response you can retrieve the token data by just creating a new object and returning the response:\n\n```php\n$token = (new Roaring('key', 'secret'))-\u003egetResponse('body');\n\nvar_dump($token);\n\n// object(stdClass)#26 (4) {\n//   [\"access_token\"]=\u003e\n//   string(36) \"xxxx-xxxx-xxxx-xxxx-xxxx\"\n//   [\"scope\"]=\u003e\n//   string(28) \"am_application_scope default\"\n//   [\"token_type\"]=\u003e\n//   string(6) \"Bearer\"\n//   [\"expires_in\"]=\u003e\n//   int(2184)\n// }\n\n```\n\nYou can also use `getToken()` to retrieve it. This gives you the ability to reuse a token (mostly it is quite unnecessary though – just saves you a request if you know your token is still valid) by passing it as the third parameter:\n\n```php\nuse Olssonm\\Roaring\\Roaring;\n\n$response = (new Roaring('key', 'secret', $token))\n    -\u003eget('/se/company/overview/1.1/5567164818')\n    -\u003egetResponse();\n```\n\nThe returned object is always of the type `stdClass` (internally httpful just unpacks the returned JSON to setup the object).\n\nWith `getResponse()` you will recieve the entire response, you may also for example use `getResponse('body')` to only retrieve the `body`, `getResponse('code')` to get the `code`-attribute and so on.\n\n## Testing\n\nFirst you will need sandbox-keys from roaring.io, once obtained copy `/tests/config.example.json` to `/tests/config.json`, set your keys and then run:\n\n``` bash\n$ composer test\n```\n\nor\n\n``` bash\n$ phpunit\n```\n\n## License\n\nThe MIT License (MIT). Please see [License File](LICENSE.md) for more information.\n\n© 2020 [Marcus Olsson](https://marcusolsson.me).\n\n[ico-version]: https://img.shields.io/packagist/v/olssonm/roaring.svg?style=flat-square\n[ico-license]: https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square\n[ico-scrutinizer]: https://img.shields.io/scrutinizer/g/olssonm/roaring.svg?style=flat-square\n[ico-php]: https://img.shields.io/packagist/php-v/olssonm/roaring.svg?style=flat-square\n[link-packagist]: https://packagist.org/packages/olssonm/roaring\n[link-scrutinizer]: https://scrutinizer-ci.com/g/olssonm/roaring\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Folssonm%2Froaring","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Folssonm%2Froaring","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Folssonm%2Froaring/lists"}