Download the PHP package mywhistlebox/mwb-sdk without Composer
On this page you can find all versions of the php package mywhistlebox/mwb-sdk. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download mywhistlebox/mwb-sdk
More information about mywhistlebox/mwb-sdk
Files in mywhistlebox/mwb-sdk
Package mwb-sdk
Short Description A PHP SDK to integrate with the MyWhistleBox platform
License MIT
Homepage http://github.com/mywhistlebox/mwb-php
Informations about the package mwb-sdk
mwb-php
The MyWhistleBox PHP SDK makes it simpler to integrate your PHP applications using the MyWhistleBox REST API. Using the SDK, you will be able to upload files to you box or others, send requests and much more.
Installation
To install the SDK, you will need to be using Composer in your project. If you aren't using Composer yet, it's really simple! Here's how to install composer:
Required minimum php version
- minimum php version 7.4
Steps to install the SDK Package
-
To install the stable release, run the following command in your project directory:
$ composer require mywhistlebox/mwb-php
Getting started
Authentication
To make the API requests, you need to create a MwbClient
and provide it with an apikey which can be obtained from your MyWhistleBox Account Settings (API Key tab). Only Enterprise plans will have access to the required keys.
We recommend that you store your credentials in the MWB_AUTH_KEY
environment variable, so as to avoid the possibility of accidentally committing them to source control. If you do this, you can initialise the client with no arguments and it will automatically fetch them from the environment variable.
Client Methods
Once you create a client instance, you can use it to call MyWhistleBox methods. The list of methods is described at here.
Method Response
All methods return a json object in the following general format.
in addition, if a method results in an error, the response will look like:
Simple Ping Test
To make sure you are authenicating properly, we recommend using the Ping method as a test. A simple Ping test may look like so:
Examples
List Boxes
Send an upload request
Reporting issues
Report any feedback or problems with this version by opening an issue on Github.