Download the PHP package olssonm/roaring without Composer

On this page you can find all versions of the php package olssonm/roaring. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package roaring

Roaring.io API-wrapper

Latest Version on Packagist Software License Scrutinizer Score

This is a (very) simple wrapper for the roaring.io API.

The 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.

The package also includes a service provider for Laravel.

On a sidenote; this package uses the httpful-library for the HTTP-requests. While 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.

Requirements

PHP ^7.3 / ^8.0

If you want to use the Laravel Service Provider, Laravel 5.5 and above is supported.

Installation

Laravel

Laravel should auto-discover the service provider. You may also manually add it to your providers-array in config/app.php:

You may set an alias using the facade in config/app.php:

For the Roaring object to initialise properly using dependancy injection/the facade, you will need to set your key and secret in /config/services.php:

Usage

Using the wrapper is very simple – just initiate the object and call the endpoint you wish to use.

Used standalone/via main class:

Via the Laravel facade/dependancy injection:

Roaring.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.

Because the getResponse()-method always returns the latest response you can retrieve the token data by just creating a new object and returning the response:

You 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:

The returned object is always of the type stdClass (internally httpful just unpacks the returned JSON to setup the object).

With 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.

Testing

First 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:

or

License

The MIT License (MIT). Please see License File for more information.

© 2020 Marcus Olsson.


All versions of roaring with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
nategood/httpful Version ^1.0.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package olssonm/roaring contains the following files

Loading the files please wait ....