获取用户列表
开发中
GET
/api/v2/user/list
请求参数
Query 参数
roles
string
可选
verified
integer
认证状态
gender
number
可选
1 未设置 / 2 男 / 3 女
createDate
string
可选
createDateGt
string
可选
createDateLt
string
可选
likeCountGt
number
点赞数大于
likeCountLt
number
点赞数小于
dislikeCountGt
number
点踩数大于
dislikeCountLt
number
点踩数小于
followCountGt
number
关注数大于
followCountLt
number
关注数小于
blockCountGt
number
屏蔽数大于
blockCountLt
number
屏蔽数小于
postCountGt
number
发帖数大于
postCountLt
number
发帖数小于
commentCountGt
number
发评论数大于
commentCountLt
number
发评论数小于
postDigestCountGt
number
精华帖数大于
postDigestCountLt
number
精华帖数小于
commentDigestCountGt
number
精华评论数大于
commentDigestCountLt
number
精华评论数小于
extcredits1CountGt
number
可选
extcredits1CountLt
number
可选
extcredits2CountGt
number
可选
extcredits2CountLt
number
可选
extcredits3CountGt
number
可选
extcredits3CountLt
number
可选
extcredits4CountGt
number
可选
extcredits4CountLt
number
可选
extcredits5CountGt
number
可选
extcredits5CountLt
number
可选
orderType
string
可选
createDate,like,dislike,follow,block
post,comment,postDigest,commentDigest
extcredits1,extcredits2,extcredits3,extcredits4,extcredits5
orderDirection
string
可选
asc,desc
whitelistKeys
string
可选
多个以英文逗号隔开,支持「点表示法」表示多维数组
blacklistKeys
string
可选
多个以 英文逗号隔开,支持「点表示法」表示多维数组
pageSize
number
可选
page
number
页码(默认 1)
Header 参数
X-Fresns-App-Id
string
必需
密钥位置:控制面板->应用中心->应用密钥
默认值:
{{appId}}
X-Fresns-Client-Platform-Id
integer
必需
默认值:
{{clientPlatformId}}
X-Fresns-Client-Version
string
必需
默认值:
{{clientVersion}}
X-Fresns-Client-Device-Info
string
必需
压缩 Object 信息为字符串传参
默认值:
{{clientDeviceInfo}}
X-Fresns-Aid
string
可选
默认值:
{{aid}}
X-Fresns-Aid-Token
string
可选
默认值:
{{aidToken}}
X-Fresns-Uid
integer
可选
默认值:
{{uid}}
X-Fresns-Uid-Token
string
可选
默认值:
{{uidToken}}
X-Fresns-Signature
string
签名
X-Fresns-Signature-Timestamp
string
必需
示例代码
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request GET 'http://localhost:8080/api/v2/user/list?roles=&verified=&gender=&createDate=&createDateGt=&createDateLt=&likeCountGt=&likeCountLt=&dislikeCountGt=&dislikeCountLt=&followCountGt=&followCountLt=&blockCountGt=&blockCountLt=&postCountGt=&postCountLt=&commentCountGt=&commentCountLt=&postDigestCountGt=&postDigestCountLt=&commentDigestCountGt=&commentDigestCountLt=&extcredits1CountGt=&extcredits1CountLt=&extcredits2CountGt=&extcredits2CountLt=&extcredits3CountGt=&extcredits3CountLt=&extcredits4CountGt=&extcredits4CountLt=&extcredits5CountGt=&extcredits5CountLt=&orderType=&orderDirection=&whitelistKeys=&blacklistKeys=&pageSize=&page=' \
--header 'X-Fresns-App-Id;' \
--header 'X-Fresns-Client-Platform-Id;' \
--header 'X-Fresns-Client-Version;' \
--header 'X-Fresns-Client-Device-Info;' \
--header 'X-Fresns-Aid: ' \
--header 'X-Fresns-Aid-Token: ' \
--header 'X-Fresns-Uid: ' \
--header 'X-Fresns-Uid-Token: ' \
--header 'X-Fresns-Signature;' \
--header 'X-Fresns-Signature-Timestamp;'
返回响应
🟢200成功
application/json
Body
code
integer
必需
message
string
必需
data
object
必需
paginate
object
必需
list
array [object {49}]
必需
示例
{
"code": 0,
"message": "成功",
"data": {
"paginate": {
"total": 2,
"pageSize": 15,
"currentPage": 1,
"lastPage": 1
},
"list": [
{
"fsid": "UK1IPBVI",
"uid": 20422,
"username": "UK1IPBVI",
"url": "/u/UK1IPBVI",
"nickname": "赵勇",
"avatar": "http://localhost:8080/static/images/default-avatar.png",
"decorate": null,
"banner": null,
"gender": 1,
"birthday": null,
"bio": null,
"location": null,
"conversationLimit": 1,
"commentLimit": 1,
"timezone": "+8",
"verifiedStatus": false,
"verifiedIcon": null,
"verifiedDesc": null,
"verifiedDateTime": null,
"expired": false,
"expiryDateTime": null,
"lastPublishPost": null,
"lastPublishComment": null,
"lastEditUsername": null,
"lastEditNickname": null,
"registerDate": "2023-03-22 17:41:45",
"hasPassword": false,
"rankState": 1,
"status": true,
"waitDelete": false,
"waitDeleteDateTime": null,
"bioHtml": "",
"nicknameColor": null,
"rid": 4,
"roleName": "普通会员",
"roleNameDisplay": false,
"roleIcon": null,
"roleIconDisplay": false,
"roleExpiryDateTime": null,
"roleRankState": 1,
"rolePermissions": {
"rid": 4,
"content_view": true,
"conversation": true,
"content_link_handle": 2,
"post_publish": true,
"post_review": false,
"post_email_verify": false,
"post_phone_verify": false,
"post_real_name_verify": false,
"post_limit_status": false,
"post_limit_type": 1,
"post_limit_period_start": "2022-06-01 22:30:00",
"post_limit_period_end": "2022-06-06 08:00:00",
"post_limit_cycle_start": "23:00:00",
"post_limit_cycle_end": "08:30:00",
"post_limit_rule": 1,
"post_second_interval": 60,
"post_draft_count": 10,
"comment_publish": true,
"comment_review": false,
"comment_email_verify": false,
"comment_phone_verify": false,
"comment_real_name_verify": false,
"comment_limit_status": false,
"comment_limit_type": 1,
"comment_limit_period_start": "2022-06-01 22:30:00",
"comment_limit_period_end": "2022-06-06 08:00:00",
"comment_limit_cycle_start": "23:00:00",
"comment_limit_cycle_end": "08:30:00",
"comment_limit_rule": 1,
"comment_second_interval": 60,
"comment_draft_count": 10,
"post_editor_image": true,
"post_editor_image_upload_number": 9,
"post_editor_video": true,
"post_editor_video_upload_number": 1,
"post_editor_audio": true,
"post_editor_audio_upload_number": 2,
"post_editor_document": true,
"post_editor_document_upload_number": 10,
"comment_editor_image": true,
"comment_editor_image_upload_number": 9,
"comment_editor_video": false,
"comment_editor_video_upload_number": 1,
"comment_editor_audio": false,
"comment_editor_audio_upload_number": 2,
"comment_editor_document": false,
"comment_editor_document_upload_number": 10,
"image_max_size": 5,
"video_max_size": 50,
"video_max_time": 60,
"audio_max_size": 50,
"audio_max_time": 60,
"document_max_size": 10,
"follow_user_max_count": 500,
"block_user_max_count": 500,
"download_file_count": 10
},
"roleStatus": true,
"stats": {
"likeUserCount": null,
"likeGroupCount": null,
"likeHashtagCount": null,
"likePostCount": null,
"likeCommentCount": null,
"dislikeUserCount": null,
"dislikeGroupCount": null,
"dislikeHashtagCount": null,
"dislikePostCount": null,
"dislikeCommentCount": null,
"followUserCount": 0,
"followGroupCount": 0,
"followHashtagCount": null,
"followPostCount": null,
"followCommentCount": null,
"blockUserCount": null,
"blockGroupCount": null,
"blockHashtagCount": null,
"blockPostCount": null,
"blockCommentCount": null,
"likeMeCount": 0,
"dislikeMeCount": null,
"followMeCount": 0,
"blockMeCount": null,
"postPublishCount": 0,
"postDigestCount": 0,
"postLikeCount": 0,
"postDislikeCount": null,
"postFollowCount": 0,
"postBlockCount": null,
"commentPublishCount": 0,
"commentDigestCount": 0,
"commentLikeCount": 0,
"commentDislikeCount": null,
"commentFollowCount": 0,
"commentBlockCount": null,
"extcredits1": null,
"extcredits1Status": 1,
"extcredits1Name": null,
"extcredits1Unit": null,
"extcredits2": null,
"extcredits2Status": 1,
"extcredits2Name": null,
"extcredits2Unit": null,
"extcredits3": null,
"extcredits3Status": 1,
"extcredits3Name": null,
"extcredits3Unit": null,
"extcredits4": null,
"extcredits4Status": 1,
"extcredits4Name": null,
"extcredits4Unit": null,
"extcredits5": null,
"extcredits5Status": 1,
"extcredits5Name": null,
"extcredits5Unit": null
},
"archives": [],
"operations": {
"customizes": [],
"buttonIcons": [],
"diversifyImages": [],
"tips": []
},
"extends": {
"textBox": [],
"infoBox": [],
"interactionBox": []
},
"roles": [
{
"rid": 4,
"isMain": true,
"nicknameColor": null,
"name": "普通会员",
"nameDisplay": false,
"icon": null,
"iconDisplay": false,
"expiryDateTime": null,
"rankState": 1,
"status": true
}
],
"interaction": {
"userName": "用户",
"userUidName": "用户号",
"userUsernameName": "用户名",
"userNicknameName": "昵称",
"userRoleName": "角色",
"userBioName": "简介",
"followSetting": true,
"followName": "关注",
"likeSetting": false,
"likeName": "喜欢",
"dislikeSetting": false,
"dislikeName": "不喜欢",
"blockSetting": false,
"blockName": "拉黑",
"publishPostName": "发帖",
"publishCommentName": "回复",
"likeStatus": false,
"dislikeStatus": false,
"followStatus": false,
"followMeStatus": false,
"followNote": null,
"followExpired": true,
"followExpiryDateTime": null,
"blockStatus": false,
"blockMeStatus": false,
"blockNote": null
},
"conversation": {
"status": false,
"code": 36600,
"message": "对话功能未启用,无法使用"
}
},
{
"fsid": "admin",
"uid": 11182,
"username": "admin",
"url": "/u/admin",
"nickname": "Admin",
"avatar": "http://localhost:8080/static/images/default-avatar.png",
"decorate": null,
"banner": null,
"gender": 1,
"birthday": null,
"bio": null,
"location": null,
"conversationLimit": 1,
"commentLimit": 1,
"timezone": "+8",
"verifiedStatus": false,
"verifiedIcon": null,
"verifiedDesc": null,
"verifiedDateTime": null,
"expired": false,
"expiryDateTime": null,
"lastPublishPost": null,
"lastPublishComment": null,
"lastEditUsername": null,
"lastEditNickname": null,
"registerDate": "2023-03-19 12:47:04",
"hasPassword": false,
"rankState": 1,
"status": true,
"waitDelete": false,
"waitDeleteDateTime": null,
"bioHtml": "",
"nicknameColor": null,
"rid": 1,
"roleName": "管理员",
"roleNameDisplay": false,
"roleIcon": null,
"roleIconDisplay": false,
"roleExpiryDateTime": null,
"roleRankState": 1,
"rolePermissions": {
"rid": 1,
"content_view": true,
"conversation": true,
"content_link_handle": 3,
"post_publish": true,
"post_review": false,
"post_email_verify": false,
"post_phone_verify": false,
"post_real_name_verify": false,
"post_limit_status": false,
"post_limit_type": 1,
"post_limit_period_start": "2022-06-01 22:30:00",
"post_limit_period_end": "2022-06-06 08:00:00",
"post_limit_cycle_start": "23:00:00",
"post_limit_cycle_end": "08:30:00",
"post_limit_rule": 1,
"post_second_interval": 60,
"post_draft_count": 10,
"comment_publish": true,
"comment_review": false,
"comment_email_verify": false,
"comment_phone_verify": false,
"comment_real_name_verify": false,
"comment_limit_status": false,
"comment_limit_type": 1,
"comment_limit_period_start": "2022-06-01 22:30:00",
"comment_limit_period_end": "2022-06-06 08:00:00",
"comment_limit_cycle_start": "23:00:00",
"comment_limit_cycle_end": "08:30:00",
"comment_limit_rule": 1,
"comment_second_interval": 60,
"comment_draft_count": 10,
"post_editor_image": true,
"post_editor_image_upload_number": 9,
"post_editor_video": true,
"post_editor_video_upload_number": 1,
"post_editor_audio": true,
"post_editor_audio_upload_number": 2,
"post_editor_document": true,
"post_editor_document_upload_number": 10,
"comment_editor_image": true,
"comment_editor_image_upload_number": 9,
"comment_editor_video": false,
"comment_editor_video_upload_number": 1,
"comment_editor_audio": false,
"comment_editor_audio_upload_number": 2,
"comment_editor_document": false,
"comment_editor_document_upload_number": 10,
"image_max_size": 5,
"video_max_size": 50,
"video_max_time": 60,
"audio_max_size": 50,
"audio_max_time": 60,
"document_max_size": 10,
"follow_user_max_count": 500,
"block_user_max_count": 500,
"download_file_count": 10
},
"roleStatus": true,
"stats": {
"likeUserCount": 0,
"likeGroupCount": 0,
"likeHashtagCount": 0,
"likePostCount": 0,
"likeCommentCount": 0,
"dislikeUserCount": 0,
"dislikeGroupCount": 0,
"dislikeHashtagCount": 0,
"dislikePostCount": 0,
"dislikeCommentCount": 0,
"followUserCount": 0,
"followGroupCount": 0,
"followHashtagCount": 0,
"followPostCount": 0,
"followCommentCount": 0,
"blockUserCount": 0,
"blockGroupCount": 0,
"blockHashtagCount": 0,
"blockPostCount": 0,
"blockCommentCount": 0,
"likeMeCount": 0,
"dislikeMeCount": null,
"followMeCount": 0,
"blockMeCount": null,
"postPublishCount": 0,
"postDigestCount": 0,
"postLikeCount": 0,
"postDislikeCount": null,
"postFollowCount": 0,
"postBlockCount": null,
"commentPublishCount": 0,
"commentDigestCount": 0,
"commentLikeCount": 0,
"commentDislikeCount": null,
"commentFollowCount": 0,
"commentBlockCount": null,
"extcredits1": null,
"extcredits1Status": 1,
"extcredits1Name": null,
"extcredits1Unit": null,
"extcredits2": null,
"extcredits2Status": 1,
"extcredits2Name": null,
"extcredits2Unit": null,
"extcredits3": null,
"extcredits3Status": 1,
"extcredits3Name": null,
"extcredits3Unit": null,
"extcredits4": null,
"extcredits4Status": 1,
"extcredits4Name": null,
"extcredits4Unit": null,
"extcredits5": null,
"extcredits5Status": 1,
"extcredits5Name": null,
"extcredits5Unit": null
},
"archives": [],
"operations": {
"customizes": [],
"buttonIcons": [],
"diversifyImages": [],
"tips": []
},
"extends": {
"textBox": [],
"infoBox": [],
"interactionBox": []
},
"roles": [
{
"rid": 1,
"isMain": true,
"nicknameColor": null,
"name": "管理员",
"nameDisplay": false,
"icon": null,
"iconDisplay": false,
"expiryDateTime": null,
"rankState": 1,
"status": true
}
],
"interaction": {
"userName": "用户",
"userUidName": "用户号",
"userUsernameName": "用户名",
"userNicknameName": "昵称",
"userRoleName": "角色",
"userBioName": "简介",
"followSetting": true,
"followName": "关注",
"likeSetting": false,
"likeName": "喜欢",
"dislikeSetting": false,
"dislikeName": "不喜欢",
"blockSetting": false,
"blockName": "拉黑",
"publishPostName": "发帖",
"publishCommentName": "回复",
"likeStatus": false,
"dislikeStatus": false,
"followStatus": false,
"followMeStatus": false,
"followNote": null,
"followExpired": true,
"followExpiryDateTime": null,
"blockStatus": false,
"blockMeStatus": false,
"blockNote": null
},
"conversation": {
"status": false,
"code": 36600,
"message": "对话功能未启用,无法使用"
}
}
]
}
}
修改于 2023-03-28 07:32:48