My favorites | Sign in
Project Logo
                
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
<?php

$nick_name = 'johndoe';
$password = 'secret!';

require 'RLPlurkAPI.php';

$plurk = new RLPlurkAPI();
$plurk->login($nick_name, $password);

// these are my friends/fans
print_r($plurk->friends);


//echo "\n\n------ getAlerts ------\n";
//echo "These are the friend requests you have:\n";
//$alerts = $plurk->getAlerts();
//print_r($alerts);

// these are my blocked users
//print_r($plurk->getBlockedUsers());

// Uncomment to accept all friend requests from the alert queue.
//$plurk->befriend($alerts, true);
// ... or make them fans instead.
//$plurk->denyFriendMakeFan($alerts);

// block users x, y (x, and y are the user ids, which are integers).
//$plurk->blockUser(array(x, y));

// unblock users x, y (x, and y are the user ids, which are integers).
//$plurk->unblockUser(array(x, y));


/*
* Get my plurks.
*/
//echo "\n\n------ getUnreadPlurks ------\n";
//print_r($plurk->getUnreadPlurks(true));

//echo "\n\n------ getPlurks ------\n";
//print_r($plurk->getPlurks($plurk->uid));

// get plurks with responses from a certain time.
//print_r($plurk->getPlurks($plurk->uid, '2008-02-01T01:10:00', '2008-02-01T01:00:00'));

//echo "\n\n------ getGlobalPlurks ------\n";
//print_r($plurk->getGlobalPlurks($plurk->uid,null,null,null,null,124292,TRUE));

//echo "\n\n------ getCountries (list of countries) ------\n";
//print_r($plurk->getCountries($plurk->uid));

//echo "\n\n------ getRegions (list within a country) ------\n";
//print_r($plurk->getRegions($plurk->uid,59));

//echo "\n\n------ getCities (list within a region) ------\n";
//print_r($plurk->getCities($plurk->uid,3534));

//echo "\n\n------ addPlurk ------\n";
//$plurk->addPlurk('en', 'is', 'tired (:');

// mute a plurk
// $plurk->mutePlurk(RLPlurkAPI::permalinkToPlurkID('http://www.plurk.com/p/ajd4'), true);

// unmute a plurk
// $plurk->mutePlurk(RLPlurkAPI::permalinkToPlurkID('http://www.plurk.com/p/ajd4'), false);

//echo "\n\n------ deletePlurk ------\n";
//$plurk->deletePlurk(RLPlurkAPI::permalinkToPlurkID('http://www.plurk.com/p/o1k2'));

//echo "\n\n------ respondToPlurk ------\n";
//echo $plurk->respondToPlurk(RLPlurkAPI::permalinkToPlurkID('http://www.plurk.com/p/ajd4'), 'en', 'says', 'test from RLPlurkAPI');


//echo "\n\n------ getResponses ------\n";
//print_r($plurk->getResponses(491656));
//print_r($plurk->getResponses(RLPlurkAPI::permalinkToPlurkID('http://www.plurk.com/p/ajd4'))); // same thing


//$response = $plurk->respondToPlurk(RLPlurkAPI::permalinkToPlurkID("http://www.plurk.com/p/ajd4"), 'en', 'says', 'reply test from RLPlurkAPI');
//var_dump($response);


//$permalink = "http://www.plurk.com/p/ajd4";
//echo "Plurk id of $permalink: " . RLPlurkAPI::permalinkToPlurkID($permalink) . "\n\n";

//echo "\n\n------ uidToUserinfo ------\n";
// print_r($plurk->uidToUserinfo(58));
// print_r($plurk->uidToUserinfo(77777777));

//echo "\n\n------ nicknameToUid ------\n";
//echo $plurk->nicknameToUid('ryanlim');
//echo $plurk->nicknameToUid('ryanlimryanlimryanlim');
?>
Show details Hide details

Change log

r23 by lwh.ryan on Aug 18, 2008   Diff
We've now have the Plurk
countries/regions/cities list - a big
thank you to biggorilla!
Go to: 
Project members, sign in to write a code review

Older revisions

r16 by lwh.ryan on Jun 24, 2008   Diff
 * Thanks to Adduc, we now have
nicknameToUid().
 * Adduc had also suggested looking at
http://www.plurk.com/Users/fetchUserIn
fo to resolve uids to nick_names.
r9 by lwh.ryan on Jun 23, 2008   Diff
New code, moved our pear stuff out to
the current directory.
r6 by lwh.ryan on Jun 12, 2008   Diff
 * Goodbye pecl_http, hello
HTTP_Client.
 * Code updates to handle plurk's
internal code changes.
 * addPlurk
...
All revisions of this file

File info

Size: 2992 bytes, 94 lines
Hosted by Google Code