2017 © Pedro Peláez
 

library fomo-php-sdk

Fomo PHP SDK is the official SDK wrapper for the Fomo API service

image

usefomo/fomo-php-sdk

Fomo PHP SDK is the official SDK wrapper for the Fomo API service

  • Friday, July 6, 2018
  • by fomo
  • Repository
  • 2 Watchers
  • 2 Stars
  • 3,196 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 6 Forks
  • 0 Open issues
  • 12 Versions
  • 33 % Grown

The README.md

Fomo PHP SDK

Fomo PHP SDK is the official SDK wrapper for the Fomo API service, (*1)

API docs: https://docs.fomo.com, (*2)

Requirements

  • PHP Version 5.3.0+

Installation

Install the latest version with, (*3)

$ composer require usefomo/fomo-php-sdk

Manual User Installation

Download src/Fomo/FomoClient.php and include the file in your PHP project., (*4)

Check out our examples in example/fomo-example.php, quick usage examples:, (*5)

Basic Usage

Initialize Fomo client:, (*6)

<?php
use Fomo\FomoClient;
$client = new FomoClient($authToken); // auth token can be found Fomo application admin dashboard (App -> API Access)

Create a new event:, (*7)

with a template name..., (*8)

use Fomo\FomoEventBasic;
$event = new FomoEventBasic();
$event->event_type_tag = "new_order"; // Event type tag is found on Fomo dashboard (Templates -> Template name)
$event->title = "Test event";
$event->first_name = "Ryan";
$event->email_address = "ryan.kulp@fomo.com"; // used to fetch Gravatar for notification image
$event->ip_address = "128.177.108.102"; // used for extracting location parameters (city, province, country)
$event->city = "New York City";
$event->url = "https://www.fomo.com";
// for additional parameters check code documentation

// Add event custom attributes
$event->addCustomEventField('variable_name', 'value');

$fomoEvent = $client->createEvent($event);

or with a template ID:, (*9)

use Fomo\FomoEventBasic;
$event = new FomoEventBasic();
$event->event_type_id = "4"; // Event type ID is found on Fomo dashboard (Templates -> Template ID)
$event->title = "Test event";
$event->first_name = "Ryan";
$event->email_address = "ryan.kulp@fomo.com";
$event->ip_address = "128.177.108.102";
$event->url = "https://www.fomo.com";
// for additional parameters check code documentation

// Add event custom attributes
$event->addCustomEventField('variable_name', 'value');

$fomoEvent = $client->createEvent($event);

Fetch an event:, (*10)

$fomoEvent = $client->getEvent("<event ID>");

Get events:, (*11)

$fomoEvents = $client->getEvents(30 /* page size */, 1 /* page */);

Get events with meta data:, (*12)

$fomoEventsWithMeta = $client->getEventsWithMeta(30 /* page size */, 1 /* page */);

/* Events */
print_r($fomoEventsWithMeta->events);

/* Meta data */
echo 'Current page: ', $fomoEventsWithMeta->meta->page, "\n";
echo 'Total pages: ', $fomoEventsWithMeta->meta->total_pages, "\n";
echo 'Page size: ', $fomoEventsWithMeta->meta->per_page, "\n";
echo 'Total count: ', $fomoEventsWithMeta->meta->total_count, "\n";

Delete an event:, (*13)

$client->deleteEvent("<event ID>");

Update an event:, (*14)

$fomoEvent = $client->getEvent("<event ID>");
$fomoEvent->first_name = "John";
$fomoEvent = $client->updateEvent($fomoEvent);

Support

If you have questions, email us at hello@fomo.com., (*15)

The Versions

06/07 2018

dev-master

9999999-dev https://www.usefomo.com

Fomo PHP SDK is the official SDK wrapper for the Fomo API service

  Sources   Download

proprietary

The Requires

  • php >=5.3.0
  • ext-curl *

 

api wrapper notifications fomo social proof

04/12 2017

1.1.0

1.1.0.0 https://www.usefomo.com

Fomo PHP SDK is the official SDK wrapper for the Fomo API service

  Sources   Download

proprietary

The Requires

  • php >=5.3.0
  • ext-curl *

 

api wrapper notifications fomo social proof

14/10 2017

1.0.9

1.0.9.0 https://www.usefomo.com

Fomo PHP SDK is the official SDK wrapper for the Fomo API service

  Sources   Download

proprietary

The Requires

  • php >=5.3.0
  • ext-curl *

 

api wrapper notifications fomo social proof

10/06 2017

1.0.8

1.0.8.0 https://www.usefomo.com

Fomo PHP SDK is the official SDK wrapper for the Fomo API service

  Sources   Download

proprietary

The Requires

 

api wrapper notifications fomo social proof

31/05 2017

1.0.7

1.0.7.0 https://www.usefomo.com

Fomo PHP SDK is the official SDK wrapper for the Fomo API service

  Sources   Download

proprietary

The Requires

  • php >=5.3.0

 

api wrapper notifications fomo social proof

31/05 2017

1.0.6

1.0.6.0 https://www.usefomo.com

Fomo PHP SDK is the official SDK wrapper for the Fomo API service

  Sources   Download

proprietary

The Requires

  • php >=5.3.0

 

api wrapper notifications fomo social proof

31/05 2017

1.0.5

1.0.5.0 https://www.usefomo.com

Fomo PHP SDK is the official SDK wrapper for the Fomo API service

  Sources   Download

proprietary

The Requires

  • php >=5.3.0

 

api wrapper notifications fomo social proof

09/12 2016

1.0.4

1.0.4.0 https://www.usefomo.com

Fomo PHP SDK is the official SDK wrapper for the Fomo API service

  Sources   Download

proprietary

The Requires

  • php >=5.3.0

 

api wrapper notifications fomo social proof

29/09 2016

1.0.3

1.0.3.0 https://www.usefomo.com

Fomo PHP SDK is the official SDK wrapper for the Fomo API service

  Sources   Download

proprietary

The Requires

  • php >=5.3.0

 

api wrapper notifications fomo social proof

01/09 2016

1.0.2

1.0.2.0 https://www.usefomo.com

Fomo PHP SDK is the official SDK wrapper for the Fomo API service

  Sources   Download

proprietary

The Requires

  • php >=5.3.0

 

api wrapper notifications fomo social proof

19/08 2016

1.0.1

1.0.1.0 https://www.usefomo.com

Fomo PHP SDK is the official SDK wrapper for the Fomo API service

  Sources   Download

proprietary

The Requires

  • php >=5.3.0

 

api wrapper notifications fomo social proof

12/08 2016

1.0.0

1.0.0.0 https://github.com/usefomo/fomo-php-sdk

Fomo PHP SDK is the official SDK wrapper for the Fomo API service

  Sources   Download

proprietary

The Requires

  • php >=5.3.0

 

api wrapper notifications fomo