2017 © Pedro Peláez
 

library pebble-api-php

image

dav-m85/pebble-api-php

  • Saturday, May 16, 2015
  • by dav-m85
  • Repository
  • 4 Watchers
  • 10 Stars
  • 15 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

Build Status Scrutinizer Code Quality Code Coverage Total Downloads, (*1)

Library to interact with Pebble Timeline API., (*2)

Why should I use it ?

Because you love when ... * It's tested code * It can be installed with composer * It follows semver * It's already used in production, (*3)

Installation

With composer installed, (*4)

php composer.phar require dav-m85/pebble-api-php:dev-master

Usage

// Define a pin with an Array
$pin = new PebbleApi\Pin("reservation-1395203", new \DateTime("2014-03-07T09:01:10.229Z"), array(
    "layout" => array(
        ...
    )
));

// Or using object oriented approach (still work in progress)
$layout = new PebbleApi\Layout\GenericLayout();
$layout->setForegroundColor(PebbleApi\LayoutInterface::COLOR_BLUE);
$pin = new PebbleApi\Pin("reservation-1395203", new \DateTime("2014-03-07T09:01:10.229Z"), $layout);
$pin->setDuration(120);

// Then spawn a client
$client = new PebbleApi\Client();

// Create (or update) a pin
$user = new PebbleApi\User($userToken);
$client->put($user, $pin);

// Delete a pin
$client->delete($user, $pin);

// Create a pin for all users (shared pin)
$sharedTopic = new PebbleApi\SharedTopic($apiToken, array('baseball', 'giants'));

$client->put($sharedTopic, $pin);

The Versions

16/05 2015

dev-master

9999999-dev

  Sources   Download

MIT

The Requires

 

The Development Requires

api pebble

12/05 2015

0.0.1

0.0.1.0

  Sources   Download

MIT

The Requires

 

The Development Requires

api pebble