示例#1
0
 def get_user_by_name(self):
     return bind_api(api=self,
                     path="/users/{username}/name",
                     model=User,
                     method="GET",
                     allowed_param=["username"],
                     require_auth=True)
示例#2
0
 def friend_status(self):
     return bind_api(api=self,
                     path="/user/{id}/friendStatus",
                     model=FriendStatus,
                     method="GET",
                     allowed_param=["id"],
                     require_auth=True)
示例#3
0
 def get_user_by_id(self):
     return bind_api(api=self,
                     path="/users/{id}",
                     model=User,
                     method="GET",
                     allowed_param=["id"],
                     require_auth=True)
示例#4
0
 def me(self):
     return bind_api(api=self,
                     path="/auth/user",
                     model=Player,
                     method="GET",
                     allowed_param=[],
                     require_auth=True)
示例#5
0
 def list_friends(self):
     return bind_api(api=self,
                     path="/auth/user/friends",
                     model=User,
                     method="GET",
                     allowed_param=["offset", "n", "offline"],
                     require_auth=True)
示例#6
0
 def get_instance(self):
     return bind_api(api=self,
                     path="/worlds/{id}/{instanceId}",
                     method="GET",
                     model=Instance,
                     allowed_param=["id", "instanceId"],
                     require_auth=True)
示例#7
0
 def remote_config(self):
     return bind_api(api=self,
                     path="/config",
                     method="GET",
                     model=Config,
                     allowed_param=[],
                     require_auth=False)
示例#8
0
 def get_world(self):
     return bind_api(api=self,
                     path="/worlds/{id}",
                     method="GET",
                     model=World,
                     allowed_param=["id"],
                     require_auth=True)
示例#9
0
 def delete_favorite(self):
     return bind_api(api=self,
                     path="/favorites/{id}",
                     model=Favorite,
                     method="DELETE",
                     allowed_param=["id"],
                     require_auth=True)
示例#10
0
 def list_favorite(self):
     return bind_api(api=self,
                     path="/favorites",
                     model=Favorite,
                     method="GET",
                     allowed_param=["type"],
                     require_auth=True)
示例#11
0
 def list_any_users(self):
     return bind_api(
         api=self,
         path="/users",
         model=User,
         method="GET",
         allowed_param=["search", "developerType", "n", "offset"],
         require_auth=True)
示例#12
0
 def list_favorites_worlds(self):
     return bind_api(api=self,
                     path="/worlds/favorites",
                     method="GET",
                     model=World,
                     allowed_param=[
                         "featured", "sort", "user", "userId", "n", "order",
                         "offset", "search", "tag", "notag",
                         "releaseStatus", "maxUnityVersion",
                         "minUnityVersion", "maxAssetVersion",
                         "minAssetVersion", "platform"
                     ],
                     require_auth=True)