2017 © Pedro Peláez
 

library relateiq

RelateIQ API v2 client for Laravel & standalone projects.

image

torann/relateiq

RelateIQ API v2 client for Laravel & standalone projects.

  • Tuesday, May 29, 2018
  • by torann
  • Repository
  • 1 Watchers
  • 0 Stars
  • 75 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

RelateIQ Client - Beta

Latest Stable Version Total Downloads, (*1)


Installation

To get the latest version of RelateIQ Client simply require it in your composer.json file., (*2)

"torann/relateiq": "dev-master"

You'll then need to run composer install to download it and have the autoloader updated., (*3)

Laravel Setup

Once RelateIQ Client is installed you need to register the service provider with the application. Open up app/config/app.php and find the providers key., (*4)

'Torann\RelateIQ\ServiceProvider'

There is no need to add the Facade, the package will add it for you., (*5)

Add RelateIQ to the Services Config

Open up app/config/services.php and add relateiq., (*6)

'relateiq' => array(
    'key'    => '66cfba7f741d645a488c0b21ebFAKE',
    'secret' => 'effd5216acac6314219ALSOFAKE',
),

RelateIQ Client Instance

$riq = new RelateIQ('66cfba7f741d645a488c0b21ebFAKE', 'effd5216acac6314219ALSOFAKE');
$contact = $riq->getContact('741d645a488c0b21eb');

For Laravel simple use the facade RelateIQ., (*7)

$contact = new RelateIQ::getContact('741d645a488c0b21eb');

Methods

Create a Contact newContact(:properties)

A POST request which creates a new Contact object and returns the created Contact with its new unique ID., (*8)

Parameters:, (*9)

  • :properties Attributes that are comprised of a contact object in RelateIQ. The following attributes are supported through the API:
    • name
    • email (Required)
    • phone
    • address
    • company
    • title
    • twitter

Example, (*10)

$contact = RelateIQ::newContact(array(
    'name'    => 'John Doe',
    'email'   => 'john.doe@mail.box',
    'phone'   => '555-4454',
    'address' => '22 Hill Ave',
    'company' => 'Box Maker, Inc.',
    'title'   => 'Lead Taper',
    'twitter' => '@John4Boxes'
));

Get a Single Contact getContact(:id)

A GET request which pulls a specific Contact by ID, Email or Phone Number, (*11)

Parameters:, (*12)

  • :id The identifier for the Contact to be fetched.

Example, (*13)

$contact = new RelateIQ::getContact('741d645a488c0b21eb');

Get All Contacts getContacts()

A GET request which fetches a paginated collection of all Contacts in your Organization., (*14)

Example, (*15)

$contacts = new RelateIQ::getContacts();

Update a Contact

A PUT request which updates the details of a specific Contact., (*16)

Example, (*17)

$contact = new RelateIQ::getContact('741d645a488c0b21eb');
$contact->name = 'Sally Doe';
$contact->save();

Change Log

v0.1.0

  • First release

The Versions

29/05 2018

dev-master

9999999-dev

RelateIQ API v2 client for Laravel & standalone projects.

  Sources   Download

BSD-2-Clause BSD 2-Clause

The Requires

  • php >=5.4.0

 

laravel api wrapper laravel4 standalone relateiq