ParaWorld_Actionfeed
a central place per application for selling and buying tradable items.
Title |
a central place per application for selling and buying tradable items. |
Author(s) |
LiXizhi |
Date |
2008/1/21 |
File |
script/kids/3DMapSystemApp/API/paraworld.actionfeed.lua |
Description
Sample Code
NPL.load("(gl)script/kids/3DMapSystemApp/API/ParaworldAPI.lua");
Member Functions
paraworld.actionfeed.UploadScreenshot
create class
commonlib.setfield("paraworld.actionfeed", {});
[[Returns information on outstanding notifications for current session user.
]]
paraworld.CreateRESTJsonWrapper("paraworld.actionfeed.get", "http://actionfeed.paraengine.com/get.ashx", paraworld.prepLoginRequried);
[[
<summary>
Usually public messages visible to all visitors on the user's profile page
</summary>
<param name="msg">
msg = {
"sessionKey" = string (*) 褰撳墠鐧诲綍鐢ㄦ埛鐨勭敤鎴峰嚟璇?
"to_uids" = string(*) 浠ヨ嫳鏂囬€楀彿锛?锛夊垎闅旂殑鐢ㄦ埛ID闆嗗悎銆傚綋to_uids涓虹┖鏃惰〃绀哄彂缁欏綋鍓嶇櫥褰曠敤鎴疯嚜宸卞拰鍏舵墍鏈夊ソ鍙?
"story" = string (*)
}
</param>
<returns>
msg = {
"isSuccess" = boolean 鎿嶄綔鏄惁鎴愬姛
[ errorCode ] = int 閿欒鐮併€?锛氭棤寮傚父 500锛氭湭鐭ラ敊璇? 499锛氭彁渚涚殑鏁版嵁涓嶅畬鏁? 498锛氶潪娉曠殑璁块棶 497锛氭暟鎹笉瀛樺湪鎴栧凡琚垹闄?
}
</returns>
]]
paraworld.CreateRESTJsonWrapper("paraworld.actionfeed.PublishStoryToUser", "%ACTIONFEED%/PublishStoryToUser.ashx", paraworld.prepLoginRequried);
[[
<summary>
</summary>
<param name="msg">
msg = {
"sessionKey" = string (*) 褰撳墠鐧诲綍鐢ㄦ埛鐨勭敤鎴峰嚟璇?
"to_uids" = string(*) 浠ヨ嫳鏂囬€楀彿锛?锛夊垎闅旂殑鐢ㄦ埛ID闆嗗悎銆傚綋to_uids涓虹┖鏃惰〃绀哄彂缁欏綋鍓嶇櫥褰曠敤鎴疯嚜宸卞拰鍏舵墍鏈夊ソ鍙?
"action" = string (*)
}
</param>
<returns>
msg = {
"isSuccess" = boolean 鎿嶄綔鏄惁鎴愬姛
[ errorCode ] = int 閿欒鐮併€?锛氭棤寮傚父 500锛氭湭鐭ラ敊璇? 499锛氭彁渚涚殑鏁版嵁涓嶅畬鏁? 498锛氶潪娉曠殑璁块棶 497锛氭暟鎹笉瀛樺湪鎴栧凡琚垹闄?
}
</returns>
]]
paraworld.CreateRESTJsonWrapper("paraworld.actionfeed.PublishActionToUser", "%ACTIONFEED%/PublishActionToUser.ashx", paraworld.prepLoginRequried);
[[
<summary>
Usually private request messages only visible to the specified uid. such as friend request message.
</summary>
<param name="msg">
msg = {
"sessionKey" = string (*) 褰撳墠鐧诲綍鐢ㄦ埛鐨勭敤鎴峰嚟璇?
"to_uids" = string(*) 浠ヨ嫳鏂囬€楀彿锛?锛夊垎闅旂殑鐢ㄦ埛ID闆嗗悎銆傚綋to_uids涓虹┖鏃惰〃绀哄彂缁欏綋鍓嶇櫥褰曠敤鎴疯嚜宸卞拰鍏舵墍鏈夊ソ鍙?
"request" = string (*)
}
</param>
<returns>
msg = {
"isSuccess" = boolean 鎿嶄綔鏄惁鎴愬姛
[ errorCode ] = int 閿欒鐮併€?锛氭棤寮傚父 500锛氭湭鐭ラ敊璇? 499锛氭彁渚涚殑鏁版嵁涓嶅畬鏁? 498锛氶潪娉曠殑璁块棶 497锛氭暟鎹笉瀛樺湪鎴栧凡琚垹闄?
}
</returns>
]]
paraworld.CreateRESTJsonWrapper("paraworld.actionfeed.PublishRequestToUser", "%ACTIONFEED%/PublishRequestToUser.ashx", paraworld.prepLoginRequried);
[[
<summary>
Usually private messages only visible to the specified uid. such as poke message.
</summary>
<param name="msg">
msg = {
"sessionKey" = string (*) 褰撳墠鐧诲綍鐢ㄦ埛鐨勭敤鎴峰嚟璇?
"to_uids" = string(*) 浠ヨ嫳鏂囬€楀彿锛?锛夊垎闅旂殑鐢ㄦ埛ID闆嗗悎銆傚綋to_uids涓虹┖鏃惰〃绀哄彂缁欏綋鍓嶇櫥褰曠敤鎴疯嚜宸卞拰鍏舵墍鏈夊ソ鍙?
"message" = string (*)
}
</param>
<returns>
msg = {
"isSuccess" = boolean 鎿嶄綔鏄惁鎴愬姛
[ errorCode ] = int 閿欒鐮併€?锛氭棤寮傚父 500锛氭湭鐭ラ敊璇? 499锛氭彁渚涚殑鏁版嵁涓嶅畬鏁? 498锛氶潪娉曠殑璁块棶 497锛氭暟鎹笉瀛樺湪鎴栧凡琚垹闄?
}
</returns>
]]
paraworld.CreateRESTJsonWrapper("paraworld.actionfeed.PublishMessageToUser", "%ACTIONFEED%/PublishMessageToUser.ashx", paraworld.prepLoginRequried);
[[
<summary>
</summary>
<param name="msg">
msg = {
"sessionKey" = string (*) 褰撳墠鐧诲綍鐢ㄦ埛鐨勭敤鎴峰嚟璇?
"to_uids" = string(*) 浠ヨ嫳鏂囬€楀彿锛?锛夊垎闅旂殑鐢ㄦ埛ID闆嗗悎銆傚綋to_uids涓虹┖鏃惰〃绀哄彂缁欏綋鍓嶇櫥褰曠敤鎴疯嚜宸卞拰鍏舵墍鏈夊ソ鍙?
"item" = string (*)
}
</param>
<returns>
msg = {
"isSuccess" = boolean 鎿嶄綔鏄惁鎴愬姛
[ errorCode ] = int 閿欒鐮併€?锛氭棤寮傚父 500锛氭湭鐭ラ敊璇? 499锛氭彁渚涚殑鏁版嵁涓嶅畬鏁? 498锛氶潪娉曠殑璁块棶 497锛氭暟鎹笉瀛樺湪鎴栧凡琚垹闄?
}
</returns>
]]
paraworld.CreateRESTJsonWrapper("paraworld.actionfeed.PublishItemToUser", "%ACTIONFEED%/PublishItemToUser.ashx", paraworld.prepLoginRequried);
[[
<summary>
浣跨敤绯荤粺鏈嶅姟閭鍙戦€佺數瀛愰偖浠讹紙鍙彲缁欏綋鍓嶇櫥褰曠敤鎴风殑濂藉弸鍙戦€侀偖浠讹級
</summary>
<param name="msg">
msg = {
"sessionKey" (*) //鐢ㄦ埛鍑瘉
"to" = string (*) //浠ヨ嫳鏂囬€楀彿锛?锛夊垎闅旂殑鐢ㄦ埛ID闆嗗悎
"title" = string (*) //閭欢鏍囬
"body" = string (*) //閭欢姝f枃
[ "isBodyHtml" ] = boolean //閭欢姝f枃鏄惁涓篐TML鏍煎紡銆傞粯璁ゅ€间负true
}
</param>
<returns>
msg = {
isSuccess = boolean //鍙戦€侀偖浠舵槸鍚︽垚鍔?
errorCode = int //閿欒鐮併€?锛氭棤寮傚父 500锛氭湭鐭ラ敊璇? 499锛氭彁渚涚殑鏁版嵁涓嶅畬鏁? 498锛氶潪娉曠殑璁块棶
}
</returns>
]]
paraworld.CreateRESTJsonWrapper("paraworld.actionfeed.sendEmail", "%ACTIONFEED%/sendEmail.ashx", paraworld.prepLoginRequried);
[[ TODO: move from kids movie site to Pala5.com, remove the number of files that can be uploaded by paraworld
Upload screenshot to ParaWorld in KidsMovieSite.
msg = {
"sessionKey" (*) //鐢ㄦ埛鍑瘉
"ImgIn" = file, REQUIRED FIELD
"username" = KidsMoive username, default to "paraworld"
"password" = KidsMoive password, default "paraworld"
"FileName" = file path, default to "auto.jpg"
Overwrite = whether overwrite, default to true
}
<returns>
msg = {
fileURL = string
}
]]
syntax
function paraworld.actionfeed.UploadScreenshot()
paraworld.actionfeed.SubmitArticle
[[ TODO: move from kids movie site to Pala5.com
Submit an article to KidsMovieSite.
msg = {
"sessionKey" (*) //鐢ㄦ埛鍑瘉
ImageURL = fileURL, REQUIRED FIELD
"username" = KidsMoive username, default to "paraworld"
"password" = KidsMoive password, default "paraworld"
category = 101,102, ... Default to 101
Title = string, default to paraworld title
Abstract = string, default to paraworld abstract
}
<returns>
msg = {
id = article id, needs to >0
articleURL = "",
}
]]
syntax
function paraworld.actionfeed.SubmitArticle()
Topic revision: r1 - 2008-02-29
- LiXizhi