PostmanOpenAPIContact usSign up
  • 概述
    • 介绍
  • API 参考
LogoLogo
PostmanOpenAPIContact usSign up
API 参考Users

PUT
https://koudashijie.com/api/users/:handle/shorten-subscription
PUT
/api/users/:handle/shorten-subscription
1curl -X PUT https://koudashijie.com/api/users/:handle/shorten-subscription \
2 -H "Content-Type: application/json" \
3 -u "<username>:<password>" \
4 -d '{
5 "ends": "string"
6}'
Try it
200Updated
1{
2 "_id": "string",
3 "email": "string",
4 "name": "string",
5 "slug": "string",
6 "role": "string",
7 "stats": {
8 "gamesCompleted": 1,
9 "concepts": {
10 "string": 1
11 },
12 "playTime": 1
13 },
14 "oAuthIdentities": [
15 {
16 "provider": "string",
17 "id": "string"
18 }
19 ],
20 "subscription": {
21 "ends": "string",
22 "active": true
23 },
24 "license": {
25 "ends": "string",
26 "active": true
27 }
28}
Was this page helpful?
Previous

格兰特“课堂”版

Next
Built with
如果用户在一段时间已经有了高级访问权限,这将缩短/撤销他的高级访问权限。 如果结束时间少于或者等于现在时间,将撤销订阅权限并将结束时间设置为现在时间,否则将缩短订阅时间。

撤销他的高级访问权限

Authentication

AuthorizationBasic

Basic authentication of the form Basic <username:password>.

Path parameters

handlestringRequired

文件中的 _id 或者 slug.

Request

This endpoint expects an object.
endsstringRequired

Response

This endpoint returns an object.
_idstring or null
emailstring or null
namestring or null
slugstring or null
rolestring or null

通常这是指"teacher"(“老师”)或者"student"(“学生”)

statsobject or null
oAuthIdentitieslist of objects or null
subscriptionobject or null
licenseobject or null

格兰特“课堂”版

如果用户在一段时间已经有了高级访问权限,这将缩短/撤销他的高级访问权限。 如果结束时间少于或者等于现在时间,将撤销订阅权限并将结束时间设置为现在时间,否则将缩短订阅时间。