Download the PHP package wonnova/woost-gamification-php-sdk without Composer

On this page you can find all versions of the php package wonnova/woost-gamification-php-sdk. 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 woost-gamification-php-sdk

Wonnova - Woost gamification PHP SDK

Woost SDK for PHP. Use Woost's RESTful API directly from your PHP projects

Build Status Code Coverage Scrutinizer Code Quality Latest Stable Version License

Installation

The preferred installation method is composer. Just run this in your project in order to update your composer.json file and install your dependencies.

composer require wonnova/woost-gamification-php-sdk

If you never worked with composer, take a look at its documentation.

Usage

This library basically provides a simple Client object that performs requests to the RESTful API.

The Client object gets another two arguments. The first one is the language in which you want to get responses. It is es by default.

The second one is a cache adapter (an instance of Doctrine\Common\Cache\Cache). By default a FilesystemCache instance is used pointing to your system's temp directory.

This adapter is used to store the authentication token between requests to improve performance. If you have access to something "faster" like Redis, Memcached or OPcache, we recommend you to use another cache adapter.

Error management

Each method in the Client object will perform at least one HTTP request (even more if a reauthentication has to be performed). If the server returns a response with 200 status code, the response content will be parsed, but 4xx and 5xx status codes could throw an exception.

All the 4xx exceptions extend from a common Wonnova\SDK\Exception\ClientException, and all the exceptions in this package implement the common Wonnova\SDK\Exception\ExceptionInterface to ease catching them.

Future compatibility

If for some reason Wonnova has to publish a new version of the API with new endpoints before a new version of this SDK is published and you need to consume those new endpoints, there is a way to do it.

Using the public connect method, you will get a raw response of any route request. You won't get mapped objects, but you will be able to manually parse the response and work with it.

Dependency injection and testing

If you need to depend on Wonnova's Client object, always use the Wonnova\SDK\Connection\ClientInterface instead of the concrete Client object. This way you will be able to replace the object in case of need.

If you don't want to replace all the methods in the Client object but you need to test another object that depends on it and don't want real HTTP requests to be performed, there is no problem. The object Wonnova\SDK\Connection\Client is based and extends GuzzleHttp\Client, so you will be able to mock HTTP requests as explained here.

An example.

You just need to set a response content that is compatible with what the SDK expectes to get from the request.

Documentation

If you need to know the specifications of the API that is consumed by this SDK, or want to get an extended documentation of the SDK itself, feel free to contact us.


All versions of woost-gamification-php-sdk with dependencies

PHP Build Version
Package Version
Requires php Version ^5.4||^7.0
guzzlehttp/guzzle Version ~5.0
jms/serializer Version 0.16.*
doctrine/common Version ~2.4
doctrine/cache Version ~1.4
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 wonnova/woost-gamification-php-sdk contains the following files

Loading the files please wait ....