Geopromote-sdk

sdk


1 - Version php 5.3.7 or higher

2 - Version MySQL 5.0 or higher

I tried to make the installation of the application as simple as possible

1 - Download Geopromote-sdk  Download

2 - Include class Geopromote

require_once "Geopromote.php";

3 - Add secret_key and api_key in array and create object from class Geopromote

$infoAccess = [
"secret_key"=>"r1lEgqi4kPyV5geyIE6kKk704GKoDSZnQWZhYFkZt3Ru6X8",
'api_key'=>"TxgsacvasghjfmFqv"
];
$Geo = new Geopromote($infoAccess);

 

1 - Get all your groups 

// Return array content information groups
$groups = $Geo->Group()->get();

 

2- Get users from group

// Return information users
$users = $Geo->Group()->getUsers($groupID ); // groupID is required
 You can get group id from variable $groups

 

3- Send notification 

 

// Send notification to groups or send specific group

$notifi = $Geo->Group()->sendNotification($title,$msg,$groupID)

$title and $msg is required $groupID optional 
if you want send notifi to specific group add id group 
Return array content count notifi , count error notifi and count success notifi

1- Get all your membrs

 

// Return array content information Members
$members = $Geo->Member()->get();

 

2- Send Notification to members 

 

// Return array content notifi count , error count and success count
$notifi = $Geo->Member()->sendNotification($title,$msg,$filter );
$title and msg is required $filter option 
$filter [email , identifire_id ]

 

// Filter by email
// Send notifi to email info@geopromote.com
$notifi = $Geo->Member()->sendNotification($title,$msg,["email"=>"info@geopromote.com"] );

 

// Filter by identifire_id
// Send notifi to identifire_id DFG_2010
$notifi = $Geo->Member()->sendNotification($title,$msg,["identifire_id"=>"DFG_2010"] );

 

3- Add New Member 

 

// Return true or fasle if success return true else return false
// param array is requred
$info = [
"email"=>"test@gmail.com", // Required
"first_name"=>"test", // Required
"last_name"=>"test", // Required
"identifier"=>"GFIO_200_20", // Required
"app_name"=>"ibspoint" // Required
];

$addMember = $Geo->Member()->addNewMembers($info)