2017 © Pedro Peláez
 

library addcontext-php

PHP wrapper to connect with AddContext.io API and save context snapshots based on events/actions

image

sleiman/addcontext-php

PHP wrapper to connect with AddContext.io API and save context snapshots based on events/actions

  • Thursday, April 19, 2018
  • by sleiman
  • Repository
  • 1 Watchers
  • 0 Stars
  • 2 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 6 Versions
  • 0 % Grown

The README.md

AddContext PHP Wrapper

A PHP wrapper for the AddContext API. Feedback or bug reports are appreciated., (*1)

Get started

Installation

If you're using Composer, you can run the following command:, (*2)

composer require sleiman/addcontext-php

You can also download them directly and extract them to your web directory., (*3)

Add the wrapper to your project

If you're using Composer, run the autoloader, (*4)

require 'vendor/autoload.php';

Or include the Addcontext.php file, (*5)

include('../src/Addcontext.php');

Initialize the class

use \TANIOS\Addcontext\Addcontext;
$addcontext = new Addcontext(array(
    'access_token' => 'ACCESS_TOKEN',
));

Create new snapshot request

We want to create a new entry in the system via the API, (*6)

// Add any metadata you want to associate to that snapshopt to an array, (*7)

$metadata['text_main_entity']   = 'russia';
$metadata['sent_from']   = 'iphone';
$metadata['tweet_id'] = '123213213';
$metadata['tweet_content']    = 'messsage text';

// Add all the information you have to an array (email, datetime and rule are mandatory)
// Add the metada array to the fields array

$fields = array(
    'email' => "someletters@youcanread.com",
    'datetime'=> "2018-03-01 19:08:00",
    'rule' => 'trump tweeted',
    'metadata'=> $metadata
);

// Create the snapshot 
$new_snapshot = $addcontext->createSnapshotRequest($fields);

Credits

Copyright (c) 2018 - Programmed by Sleiman Tanios, (*8)

The Versions

19/04 2018

dev-master

9999999-dev https://github.com/sleiman/addcontext-php

PHP wrapper to connect with AddContext.io API and save context snapshots based on events/actions

  Sources   Download

MIT

The Requires

  • php ^5.3.3 || ^7.0

 

api marketing data machine learning context data science

14/04 2018

1.1.2

1.1.2.0 https://github.com/sleiman/addcontext-php

PHP wrapper to connect with AddContext.io API and save context snapshots based on events/actions

  Sources   Download

MIT

The Requires

  • php ^5.3.3 || ^7.0

 

api marketing data machine learning context data science

14/04 2018

1.1.1

1.1.1.0 https://github.com/sleiman/addcontext-php

PHP wrapper to connect with AddContext.io API and save context snapshots based on events/actions

  Sources   Download

MIT

The Requires

  • php ^5.3.3 || ^7.0

 

api marketing data machine learning context data science

14/04 2018

1.1.0

1.1.0.0 https://github.com/sleiman/addcontext-php

PHP wrapper to connect with AddContext.io API and save context snapshots based on events/actions

  Sources   Download

MIT

The Requires

  • php ^5.3.3 || ^7.2

 

api marketing data machine learning context data science

14/04 2018

1.0.9

1.0.9.0 https://github.com/sleiman/addcontext-php

PHP wrapper to connect with AddContext.io API and save context snapshots based on events/actions

  Sources   Download

MIT

The Requires

  • php ^5.3.3

 

api marketing data machine learning context data science

14/04 2018

1.0.1

1.0.1.0 https://github.com/sleiman/addcontext-php

PHP wrapper to connect with AddContext.io API and save context snapshots based on events/actions

  Sources   Download

MIT

The Requires

  • php ^5.3.3 || ^7.2

 

api marketing data machine learning context data science