2017 © Pedro PelĂĄez
 

library noun-project-php-client

A PHP client to interface with The Noun Project

image

mattyrad/noun-project-php-client

A PHP client to interface with The Noun Project

  • Thursday, April 19, 2018
  • by MattyRad
  • Repository
  • 1 Watchers
  • 0 Stars
  • 10 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 150 % Grown

The README.md

The Noun Project PHP Client

Build Status Code Coverage, (*1)

Installation

composer require mattyrad/noun-project-php-client, (*2)

Usage

Pass a NounProject\Request to the NounProject\Client to receive data from the API. You will receive a MattyRad\Support\Result back., (*3)

Example

use MattyRad\NounProject;

$api = new NounProject\Client($key = 'abc123', $secret= 'xxxx');

$result = $api->send(new NounProject\Request\Icons($term = 'feather', $public_domain = true));

if (! $result->isSuccess()) {
    throw new \Exception($result->getReason());
}

$icons = $result->getIcons();

API and Requests Types

Collection

Returns a single collection (by collection id or slug)
$result = $api->send(new NounProject\Request\Collection($collection_id_or_slug = 123));

$collection = $result->getCollection();
Returns a list of icons associated with a collection (by collection id or slug)
$result = $api->send(new NounProject\Request\IconsInCollection(
    $collection_id_or_slug = 123,
    $offset = 1,
    $page = 2,
    $limit = 3
));

$icons = $result->getIcons();

Collections

Return’s a list of all collections
$result = $api->send(new NounProject\Request\Collections($offset = 2, $page = 3, $limit = 1000));

$collections = $result->getCollections();

Icon

Returns a single icon
$result = $api->send(new NounProject\Request\Icon($icon_id_or_term = 123));

$icon = $result->getIcon();

Icons

Returns a list of icons
$result = $api->send(new NounProject\Request\Icons(
    $icon_id_or_term = 'feather'
    $limit_to_public_domain = true;
    $offset = 2;
    $page = 3;
    $limit = 4;
));

$icon = $result->getIcons();
Returns list of most recently uploaded icons
$result = $api->send(new NounProject\Request\RecentIcons);

$icon = $result->getIcons();

Usage

Returns current oauth usage and limits
$result = $api->send(new NounProject\Request\Usage);

$usage = $result->getUsage();
$limits = $result->getLimits();

User

TODO

The Versions

19/04 2018

dev-master

9999999-dev https://github.com/MattyRad/noun-project-php-client

A PHP client to interface with The Noun Project

  Sources   Download

MIT

The Requires

 

The Development Requires

19/04 2018
17/04 2018

dev-separate-http-client-extended

dev-separate-http-client-extended https://github.com/MattyRad/noun-project-php-client

A PHP client to interface with The Noun Project

  Sources   Download

MIT

The Requires

 

The Development Requires

17/04 2018

dev-separate-http-client

dev-separate-http-client https://github.com/MattyRad/noun-project-php-client

A PHP client to interface with The Noun Project

  Sources   Download

MIT

The Requires

 

The Development Requires