@@ -33,7 +33,7 @@ def get_comments(self, target_id: str, target_type: str, take: int = 16, skip: i
33
33
34
34
对应的协程风格的api:
35
35
```Python
36
- async def async_get_comments (self , target_id : str , target_type : str , take : int = 16 , skip : int = 0 )
36
+ async def async_get_comments (self , target_id : str , target_type : str , take : int = 16 , skip : int = 0 , comment_id : Optional[ str ] = None )
37
37
```
38
38
39
39
## 获取作品的详细信息, 物实第一次读取作品会使用此接口
@@ -83,7 +83,7 @@ async def async_get_message(self, message_id: str)
83
83
84
84
## 获取用户收到的消息
85
85
``` Python
86
- def get_messages (self , category_id : int = 0 , skip : int = 0 , take : int = 16 , no_templates : bool = True ) -> dict
86
+ def get_messages (self , category_id : int , skip : int = 0 , take : int = 16 , no_templates : bool = True ) -> dict
87
87
```
88
88
@ param category_id: 消息类型:
89
89
0 : 全部, 1 : 系统邮件, 2 : 关注和粉丝, 3 : 评论和回复, 4 : 作品通知, 5 : 管理记录
@@ -93,7 +93,7 @@ def get_messages(self, category_id: int = 0, skip: int = 0, take: int = 16, no_t
93
93
94
94
对应的协程风格的api:
95
95
```Python
96
- async def async_get_messages (self , category_id : int = 0 , skip : int = 0 , take : int = 16 , no_templates : bool = True )
96
+ async def async_get_messages (self , category_id : int , skip : int = 0 , take : int = 16 , no_templates : bool = True )
97
97
```
98
98
99
99
## 获取用户主页信息
@@ -159,13 +159,13 @@ async def async_get_user(self, user_id: Optional[str] = None, name: Optional[str
159
159
160
160
## 修改用户签名
161
161
``` Python
162
- def modify_info (self , target : str ) -> dict
162
+ def modify_information (self , target : str ) -> dict
163
163
```
164
164
@ param target: 新签名
165
165
166
166
对应的协程风格的api:
167
167
```Python
168
- async def async_modify_info (self , target : str )
168
+ async def async_modify_information (self , target : str )
169
169
```
170
170
171
171
## 发表评论
@@ -184,19 +184,20 @@ async def async_post_comment(self, target_id: str, target_type: str, content: st
184
184
185
185
# # 查询实验
186
186
```Python
187
- def query_experiments(self , category: physicsLab.enums.Category, tags: Optional[List[physicsLab.enums.Tag]] = None , exclude_tags: Optional[List[physicsLab.enums.Tag]] = None , languages: Optional[List[str ]] = None , user_id: Optional[str ] = None , take: int = 18 , skip: int = 0 ) -> dict
187
+ def query_experiments(self , category: physicsLab.enums.Category, tags: Optional[List[physicsLab.enums.Tag]] = None , exclude_tags: Optional[List[physicsLab.enums.Tag]] = None , languages: Optional[List[str ]] = None , exclude_languages: Optional[List[ str ]] = None , user_id: Optional[str ] = None , take: int = 18 , skip: int = 0 ) -> dict
188
188
```
189
189
@ param category: 实验区还是黑洞区
190
190
@param tags : 根据列表内的物实实验的标签进行对应的搜索
191
191
@param exclude_tags : 除了列表内的标签的实验都会被搜索到
192
192
@param languages : 根据列表内的语言进行对应的搜索
193
+ @param exclude_languages : 除了列表内的语言的实验都会被搜索到
193
194
@param user_id : 指定搜索的作品的发布者
194
195
@param take : 搜索数量
195
196
@param skip : 跳过搜索数量
196
197
197
198
对应的协程风格的api:
198
199
```Python
199
- async def async_query_experiments (self , category : physicsLab.enums.Category, tags : Optional[List[physicsLab.enums.Tag]] = None , exclude_tags : Optional[List[physicsLab.enums.Tag]] = None , languages : Optional[List[str ]] = None , user_id : Optional[str ] = None , take : int = 18 , skip : int = 0 )
200
+ async def async_query_experiments (self , category : physicsLab.enums.Category, tags : Optional[List[physicsLab.enums.Tag]] = None , exclude_tags : Optional[List[physicsLab.enums.Tag]] = None , languages : Optional[List[str ]] = None , exclude_languages : Optional[List[ str ]] = None , user_id : Optional[str ] = None , take : int = 18 , skip : int = 0 )
200
201
```
201
202
202
203
## 领取每日签到奖励
@@ -208,19 +209,19 @@ def receive_bonus(self, activity_id: str, index: int) -> dict
208
209
209
210
对应的协程风格的api:
210
211
```Python
211
- async def async_receive_bonus (self )
212
+ async def async_receive_bonus (self , activity_id : str , index : int )
212
213
```
213
214
214
215
## 删除评论
215
216
``` Python
216
- def remove_comment (self , CommentID : str , target_type : str ) -> dict
217
+ def remove_comment (self , comment_id : str , target_type : str ) -> dict
217
218
```
218
- @ param CommentID : 评论ID , 可以通过`get_comments` 获取
219
+ @ param comment_id : 评论ID , 可以通过`get_comments` 获取
219
220
@param target_type : User, Discussion, Experiment
220
221
221
222
对应的协程风格的api:
222
223
```Python
223
- async def async_remove_comment (self , CommentID : str , target_type : str )
224
+ async def async_remove_comment (self , comment_id : str , target_type : str )
224
225
```
225
226
226
227
## 修改用户昵称
@@ -234,31 +235,18 @@ def rename(self, nickname: str) -> dict
234
235
async def async_rename (self , nickname : str )
235
236
```
236
237
237
- ## 收藏某个实验
238
+ ## 收藏/支持 某个实验
238
239
``` Python
239
- def star (self , content_id : str , category : physicsLab.enums.Category, status : bool = True ) -> dict
240
+ def star_content (self , content_id : str , category : physicsLab.enums.Category, star_type : int , status : bool = True ) -> dict
240
241
```
241
242
@ param content_id: 实验ID
242
243
@param category : 实验区, 黑洞区
243
- @param status : True: 收藏, False: 取消收藏
244
+ @param star_type : 0: 收藏, 1: 使用金币支持实验
245
+ @param status : True: 收藏, False: 取消收藏 (对支持无作用)
244
246
245
247
对应的协程风格的api:
246
248
```Python
247
- async def async_star (self , content_id : str , category : physicsLab.enums.Category, status : bool = True )
248
- ```
249
-
250
- ## 使用金币支持某实验
251
- ``` Python
252
- def star_content (self , content_id : str , category : physicsLab.enums.Category, status : bool = True ) -> dict
253
- ```
254
- @ content_id: 实验id
255
- @category : 实验区还是黑洞区
256
- @status : 是否支持
257
- @ return : 返回的json数据
258
-
259
- 对应的协程风格的api:
260
- ```Python
261
- async def async_star_content (self , content_id : str , category : physicsLab.enums.Category, status : bool = True )
249
+ async def async_star_content (self , content_id : str , category : physicsLab.enums.Category, star_type : int , status : bool = True )
262
250
```
263
251
264
252
## 上传实验图片
0 commit comments