otobank/treasure

TreasureData REST API Wrapper

0.1.0 2016-06-16 11:37 UTC

README

Build Status Latest Stable Version Total Downloads Latest Unstable Version License

Installation

composer require otobank/treasure

Usage

<?php

require __DIR__.'/vendor/autoload.php';

use Otobank\Treasure\Treasure;

$treasure = new Treasure([
    'host' => 'in.treasuredata.com',
    'writeKey' => 'YOUR_WRITE_ONLY_APIKEY_IS_HERE',
    'database' => 'DATABASE_NAME',
]);

$treasure->addRecord([
    'itemId' => 101,
    'saleId' => 10,
    'userId' => 1,
]);