-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathInboxFirst.php
More file actions
52 lines (42 loc) · 1.63 KB
/
InboxFirst.php
File metadata and controls
52 lines (42 loc) · 1.63 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
<?php
/*
Author: Zachary J. Huberty
Date: April 12, 2016
Introduction:
This package takes the most essential API calls from InboxFirst
and packages them neatly so that the developer can integrate the
API into his/her applications more easily.
*/
namespace InboxFirst;
# Load Configuration file, if it exists
include("config.php");
# Check if the API Key and Organization ID are defined
if ( ! (defined(API_KEY) && defined(ORG_ID)) )
{
# If they are not defined, set a generic default value,
# this should make error handling more elegant.
@define("API_KEY", "");
@define("ORG_ID", 0);
}
# Load the rest of the modules
require("includes/Utilities.php");
require("includes/Subscribers.php");
require("includes/MailingLists.php");
require("includes/CustomFields.php");
require("includes/Campaigns.php");
require("includes/Users.php");
require("includes/InboxFirstRequest.php");
# TESTING GROUNDS
echo "<html>";
echo "<body>";
//Subscribers\create_subscriber(2677, "test1@test.com", array('first_name' => 'Zach', 'last_name' => 'Huberty'));
//prettyDump(Subscribers\get_subscribers(2677));
//prettyDump(CustomFields\get_custom_fields(2677));
//prettyDump(MailingLists\get_lists());
//prettyDump(Subscribers\get_subscriber(2677, 'test1@test.com'));
//prettyDump(Subscribers\update_subscriber(2677, "test1@test.com", array('first_name' => 'Zachhh', 'last_name' => 'Huberty')));
//prettyDump(CustomFields\create_custom_field(2677, 'test_field_3', 'boolean', 1));
//prettyDump(CustomFields\update_custom_field(2677, 10068, 'test_field_3', 'boolean', 1));
//prettyDump(CustomFields\delete_custom_field(2677, 10066));
echo "</body>";
echo "</html>";