Yo API PHP Package

Installs: 4

Dependents: 0

Stars: 2

Watches: 1

Open Issues: 1

Language: PHP

0.2.1 2014-09-15 14:43 UTC

README

This package lets u perform actions on the Yo Developers API.

Build Status Scrutinizer Code Quality Code Coverage Dependencies Status

It has no extra dependencies but it can play nice with other curl or http clients by creating an adapter just implement the YoClientInterface and inject it into the Yo class.

Documentation

We encourage you to read the documentation carefully before proceeding.

Installing via Composer (recommended)

Install composer in your project:

curl -s http://getcomposer.org/installer | php

Create a composer.json file in your project root:

{
    "require": {
        "websoftwares/yo": "~0.2"
    }
}

Install via composer

php composer.phar install

Usage

Basic usage of the Yo class.

use Websoftwares\YoClient, Websoftwares\Yo;

// apiKey
$apiKey = 'obtain-valid-api-key-from-yo';

// Instantiate class
$Yo = new Yo(new YoClient($apiKey));

// Perform method
$yo->all();

all();

This will yo all your subscribers

$yo->all();

(optional) provide a link argument This will yo all your subscribers with a link

$yo->all("yo.websoftwar.es");

user();

This will yo an individual user

$yo->user("BORIS010");

(optional) provide a link argument This will yo an individual user with a link

$yo->user("BORIS010", "yo.websoftwar.es");

subscribersCount();

Returns the amount of subscribers

$yo->subscribersCount();

Testing

In the tests folder u can find several tests.

Goals

  • Unit testing 100%
  • PSR compliance
  • Implement new methods from Yo API when they are available

License

The MIT License (MIT).