forked from jeroendesloovere/wunderlist-php-api
-
Notifications
You must be signed in to change notification settings - Fork 0
/
example.php
104 lines (73 loc) · 1.63 KB
/
example.php
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
<?php
/**
* Wunderlist
*
* This Wunderlist PHP Class connects to the Wunderlist API.
*
* @author Jeroen Desloovere <[email protected]>
*/
// add your own credentials in this file
require_once __DIR__ . '/credentials.php';
// required to load (only when not using an autoloader)
require_once __DIR__ . '/../vendor/autoload.php';
use JeroenDesloovere\Wunderlist\Wunderlist;
// define API
$api = new Wunderlist($username, $password);
/*
* Profile
*/
// get profile
$items = $api->getProfile();
// get settings
//$items = $api->getSettings();
/*
* Lists
*/
// get all lists
//$items = $api->getLists();
// get a list
//$items = $api->getList('ENTER_YOUR_LIST_ID_HERE');
// get shares for a list
//$items = $api->getListShares('ENTER_YOUR_LIST_ID_HERE');
/*
* Tasks
*/
// get all tasks
//$items = $api->getTasks();
// get all tasks from inbox
//$items = $api->getTasksFromInbox();
// get a task
//$items = $api->getTask('ENTER_YOUR_TASK_ID_HERE');
// get all task messages
//$items = $api->getTaskMessages('ENTER_YOUR_TASK_ID_HERE');
/*
* Other
*/
// get all events
//$items = $api->getEvents();
// get all friends
//$items = $api->getFriends();
// get all reminders
//$items = $api->getReminders();
// get all shares
//$items = $api->getShares();
// get all services
//$items = $api->getServices();
/*
* Inserts
*/
$listId = '';
//$taskId = '';
// insert a list
//$items = $api->insertList('NEW');
// insert a task
//$items = $api->insertTask('NEW TASK', $listId);
/*
* Deletes
*/
// delete list
//$items = $api->deleteList($listId);
// delete task
//$items = $api->deleteTask($taskId);
// dump items
print_r($items);