def get_core(self): #パラメータ取得 method="" if(self.request.get("method")): method=self.request.get("method"); user_id="" if(self.request.get("user_id")): user_id=self.request.get("user_id") #返り値 dic={"method":method} #ユーザクラス if(method=="getUser"): dic=ApiUser.user_get_user(self,user_id) if(method=="getProfile"): dic=ApiUser.user_get_profile(self,user_id) if(method=="getFollow" or method=="getFollowFast"): dic=ApiUser.user_get_follow(self,user_id,method=="getFollowFast") if(method=="getFollower" or method=="getFollowerFast"): dic=ApiUser.user_get_follower(self,user_id,method=="getFollowerFast") if(method=="getBbsList"): dic=ApiUser.user_get_bbs_list(self,user_id) if(method=="getThreadList"): dic=ApiUser.user_get_thread_list(self,user_id) if(method=="getTimeline"): dic=ApiUser.user_get_timeline(self,user_id) if(method=="getHomeTimeline"): dic=ApiUser.user_get_home_timeline(self,user_id) return ApiObject.add_json_success_header(dic)
def get_core(self): #パラメータ取得 method="" if(self.request.get("method")): method=self.request.get("method"); user_id="" if(self.request.get("user_id")): user_id=self.request.get("user_id") #返り値 dic={"method":method} #フィードクラス if(method=="getThreadList"): offset=0 if(self.request.get("offset")): try: offset=int(self.request.get("offset")) except: return {"status":"failed","message":"offset must be integer"} limit=10 if(self.request.get("limit")): try: limit=int(self.request.get("limit")) except: return {"status":"failed","message":"limit must be integer"} order=self.request.get("order") dic=ApiFeed.feed_get_thread_list(self,order,offset,limit) if(dic==None): return {"status":"failed","message":"bbs not found"} #return {"status":"failed","message":"debug error message"} dic=ApiObject.add_json_success_header(dic) return dic
def get_core(self): #パラメータ取得 method="" if(self.request.get("method")): method=self.request.get("method"); user_id="" if(self.request.get("user_id")): user_id=self.request.get("user_id") #返り値 dic={"method":method} #ブックマーククラス if(method=="getThreadList"): dic=ApiBookmark.bookmark_get_thread_list(self,user_id) if(method=="getBbsList"): dic=ApiBookmark.bookmark_get_bbs_list(self,user_id) if(method=="getAppList"): dic=ApiBookmark.bookmark_get_app_list(self,user_id) if(method=="getBbsUserList"): dic=ApiBookmark.bookmark_get_bbs_user_list(self) if(method=="getThreadUserList"): dic=ApiBookmark.bookmark_get_thread_user_list(self) if(method=="getAppUserList"): dic=ApiBookmark.bookmark_get_app_user_list(self) if(dic==None): dic={"status":"failed","message":"ブックマークの取得に失敗しました。"} else: dic=ApiObject.add_json_success_header(dic) return dic