Download the PHP package trolley/core without Composer
On this page you can find all versions of the php package trolley/core. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Package core
Short Description Trolley PHP SDK
License MIT
Homepage https://github.com/Trolley/php-sdk
Informations about the package core
Trolley PHP SDK
The Trolley PHP SDK provides integration access to the Trolley API.
Requirements
PHP version >= 5.4.0 is required.
The following PHP extensions are required:
curl json mbstring openssl
Installation & Usage
SDK
Composer
To install the bindings via Composer, add the following to composer.json
:
Then run composer install
Getting Started
Please follow the installation procedure and then run the following:
Documentation for API Endpoints
All URIs are available at https://docs.trolley.com/
Running SDK from Source
- Clone this repo.
- Install dependencies by running
composer install
from the project root. - Access the SDK source code from your code by using
Trolley
namespace as per the path you put the SDK source code on.
Environment Variables
While running from source locally, you can use a .env
file to supply a custom server URL.
The tests use the .env
file anyway to load the API keys.
If you're running tests, make sure the .env
file exists in the project root.
For your ease, a sample .env.example
file is provided, which can be copied to create the .env
file:
Once copied, edit the .env
file to supply the values needed.
Running the tests from SDK
To run the tests in the terminal, you'll need to setup the .env
file to supply API Keys, and then use the PHPUnit test suite from within the tests
directory, like the following:
If you want to provide a custom server URL, provide the server URL in the .env
file , and set the sdk configuration to use the development
server:
Refer to the inline documentation about this in the test setup file: /tests/Setup.php:38
All versions of core with dependencies
ext-curl Version *
ext-json Version *
ext-mbstring Version *
ext-openssl Version *
vlucas/phpdotenv Version ^5.5