Parse the Plurk JSON string into an array.
static
array
dejsonize
(string $data)
-
string
$data: The array of json data (must be surrounded by '[' and ']').
Convert a plurk ID to a permalink URL.
static
string
getPermalink
(int $plurk_id)
-
int
$plurk_id: The plurk ID number.
Convert a plurk permalink URL address to a plurk ID.
static
int
permalinkToPlurkID
(string $string_permalink)
-
string
$string_permalink: The plurk permalink URL address.
Constructor.
RLPlurkAPI
__construct
()
Add a new plurk.
bool
addPlurk
([string $string_lang = 'en'], [string $string_qualifier = 'says'], [string $string_content = ''], [bool $allow_comments = true], [array $array_limited_to = array()])
-
string
$string_lang: The plurk language.
-
string
$string_qualifier: The plurk qualifier.
-
string
$string_content: The content of the plurk to be posted.
-
bool
$allow_comments: true if this plurk allows comments, false otherwise.
-
array
$array_limited_to: The array of uids this plurk is visible to. If this array is of size 0, it is visible to everyone.
Befriend or decline a friend request.
bool
befriend
(array $array_uid, bool $bool_befriend)
-
array
$array_uid: The array of friend uids.
-
bool
$bool_befriend: If true, accept friend requests, decline otherwise.
Block users.
bool
blockUser
(array $array_uid)
-
array
$array_uid: The array of user ids to be blocked.
Deletes a plurks.
bool
deletePlurk
(array $int_plurk_id)
-
array
$int_plurk_id: The plurk id to be deleted.
Decline a friend request but make as friend instead.
bool
denyFriendMakeFan
(array $array_uid)
-
array
$array_uid: The array of friend requests uids.
Get alert notification for friend requests.
mixed
getAlerts
()
Get my list of blocked users.
array
getBlockedUsers
()
Get cities.
array
getCities
([int $int_uid = null], [int $int_region_id = null])
-
int
$int_uid: The user's UID to be passed to the getCities.
-
int
$int_region_id: The region's ID to be passed to the getCities.
Get thie list of countries.
array
getCountries
([int $int_uid = null])
-
int
$int_uid: The user's UID to be passed to the getCountries.
Gets Global plurks (browse). Only 25 plurks are fetched at a time as this is limited on the server.
The array returned is ordered most recent post first followed by previous posts.
array
getGlobalPlurks
([int $int_uid = null], [string $date_from = null], [string $date_offset = null], [int $country_id = null], [int $region_id = null], [int $city_id = null], [bool $fetch_responses = false])
-
int
$int_uid: The UID to fetch plurks for. (not required)
-
string
$date_from: The date/time to start fetching plurks. This must be in the <yyyy-mm-dd>T<hh:mm:ss> format assumed to be UTC time.
-
string
$date_offset: The date/time offset that fetches plurks earlier than this offset. The format is the same as $date_from.
-
int
$country_id: Country ID to get results from.
-
int
$region_id: Region ID to get results from. Takes precedence over Country ID.
-
int
$city_id: City ID to get results from. Takes precedence over Country ID and Region ID.
-
bool
$fetch_responses: If true, populate the responses_fetch value with the array of responses.
Gets the plurks for the user. Only 25 plurks are fetch at a time as this is limited on the server.
The array returned is ordered most recent post first followed by previous posts.
array
getPlurks
([int $int_uid = null], [string $date_from = null], [string $date_offset = null], [bool $fetch_responses = false])
-
int
$int_uid: The UID to fetch plurks for.
-
string
$date_from: The date/time to start fetching plurks. This must be in the <yyyy-mm-dd>T<hh:mm:ss> format assumed to be UTC time.
-
string
$date_offset: The date/time offset that fetches plurks earlier than this offset. The format is the same as $date_from.
-
bool
$fetch_responses: If true, populate the responses_fetch value with the array of responses.
Get the regions in a given country.
array
getRegions
([int $int_uid = null], [int $int_country_id = null])
-
int
$int_uid: The user's UID to be passed to the getRegions.
-
int
$int_country_id: The country's ID to be passed to the getRegions.
Get the responses of a plurk. This method will load "temporary" friends who have responded to the plurk.
array
getResponses
(int $int_plurk_id)
-
int
$int_plurk_id: The plurk ID
Get the unread plurks.
array
getUnreadPlurks
([bool $fetch_responses = false])
-
bool
$fetch_responses: If true, populate the responses_fetch value with the array of responses.
Are we logged in?
bool
isLoggedIn
()
Login to Plurk.
bool
login
(string $nick_name, string $password)
-
string
$nick_name: The nickname of the user to login as.
-
string
$password: The password for this user.
Mute or unmute plurks
bool
mutePlurk
(array $int_plurk_id, bool $bool_setmute)
-
array
$int_plurk_id: The plurk id to be muted/unmuted.
-
bool
$bool_setmute: If true, this plurk is to be muted, else, unmute it.
Retrieve a user's uid from given his/her plurk nick name.
int
nicknameToUid
(string $string_nick_name)
-
string
$string_nick_name: The nickname of the user to retrieve the uid from.
Respond to a plurk.
mixed
respondToPlurk
(int $int_plurk_id, string $string_lang, string $string_qualifier, string $string_content)
-
int
$int_plurk_id: The plurk ID number to respond to.
-
string
$string_lang: The plurk language.
-
string
$string_qualifier: The qualifier to use for this response.
-
string
$string_content: The content to be posted as a reply.
Translates a uid to the corresponding nickname.
string
uidToNickname
(int $uid)
-
int
$uid: The uid to be translated.
Retrieve a user's information given a plurk uid.
array
uidToUserinfo
(int $int_uid)
-
int
$int_uid: The uid of the plurk member.
Remove blocked users.
bool
unblockUser
(array $array_uid)
-
array
$array_uid: The array of user ids to be unblocked.