audiens/beeswax

Unofficial BeesWax PHP SDK

This package's canonical repository appears to be gone and the package has been frozen as a result.

0.1.0 2018-10-15 08:37 UTC

This package is auto-updated.

Last update: 2023-01-29 03:40:48 UTC


README

Build Status Coverage Status Maintainability Scrutinizer Code Quality

Implemented features

limited to search by id †2 limited to single file upload, no previous uploaded file

How to

Run the tests

  • Copy .env.dist to .env and edit accordingly. ATTENTION: it will create, update, delete data in the sandbox environment.
  • Run vendor/bin/phpunit

Use the library

First you need to create a new BeesWaxSession object:

<?php
use Audiens\BeesWax\BeesWaxSession;

$session = new BeesWaxSession($buzzKey, $email, $password);
  • $buzzKey: stinger for production, stingersbx for sandbox.
  • $email: the user's email
  • $password: the user's password

Then you can use one of the managers (BeesWax*Manager) to access the API. For example using the segment manager:

<?php

use Audiens\BeesWax\Segment\BeesWaxSegmentManager;

$session = /**/;
$segmentManager = new BeesWaxSegmentManager($sesion);

// ...
$segmentManager->create($mySegment);

Error handling

All the exceptions generated in this library extend Audiens\BeesWax\Exception\BeesWaxGenericException.

Particular exceptions may rise, such as BeesWaxLoginException or BeesWaxResponseException, accordingly to the PHPDoc documentation.