-
Notifications
You must be signed in to change notification settings - Fork 2
GeekApk API v1b 1.0
GeekSpec DSL definition: https://github.com/duangsuse/GeekApk/blob/add-controller-template/geekspec_dsl_parser.pegjs
serverVersion() -> plain = /serverVersion
serverDescription() -> plain = /serverDescription
serverBoot() -> datetime = /serverBoot
serverDetail() -> object:string = /serverDetail
POST@createUser(username:String) -> object:GeekUser = /admin/makeUser
PUT@resetSharedHash(uid-path:UserId, shash:String?) -> plain = /admin/resetMetaHash/{uid}
DELETE@deleteUser(uid-path:UserId) -> object:GeekUser = /admin/dropUser/{uid}
PUT@flagUser(uid-path:UserId, flag:Int) -> object:GeekUser = /admin/flagUser/{uid}
POST@createCategory(name:String) -> object:Category = /admin/makeCategory
PUT@renameCategory(id-path:CategoryId, name:String) -> object:Category = /admin/nameCategory/{id}
DELETE@deleteCategory(id-path:CategoryId) -> object:Category = /admin/dropCategory/{id}
DELETE@deleteApp(aid-path:AppId) -> object:App = /admin/dropApp/{aid}
PUT@transferAppCategory(aid-path:AppId, cid:CategoryId) -> [$aid:number, $old:number, $new:number] = /admin/moveApp/{aid}
PUT@transferAppOwner(aid-path:AppId, uid:UserId) -> [$aid:number, $old:number, $new:number] = /admin/transferApp/{aid}
DELETE@deleteAppUpdate(aid-path:AppId, rev-path:Int) -> object:AppUpdate = /admin/dropAppUpdate/{aid}/{rev}
DELETE@deleteComment(cid-path:CommentId) -> [$cid:number, $deletedSubComments:number] = /admin/dropComment/{cid}
categoryList() -> array:Category = category/all
categoryName(id-path:CategoryId) -> plain = category/{id}
readUser(id-path:UserId) -> object:GeekUser = user/{id}
PUT@updateUser(id-path:UserId, prop:String{username, nickname, avatar, bio, metaApp}, value-body:String) -> [$user:number, $prop:string, $old:string, $new:string] = user/{id}
PUT@resetHash(id-path:UserId, shash:String, hash:String) -> [$id:number, $newShash:string, $newHash:string] = user/{id}/hash
checkHash(id-path:UserId, hash:String) -> [$valid:boolean, $message:string] = user/{id}/checkHash
listUser(sort:String?{created, followers}, sliceFrom:UserSize?, sliceTo:UserSize?) -> array:GeekUser = user/all
listMetaUser(sort:String?{created, followers}, sliceFrom:UserSize?, sliceTo:UserSize?) -> array:GeekUser = user/allHasMetaApp
searchUser(type:String?{username, nickname, bio}, kw-path:String, sort:String?{created, followers}) -> array:GeekUser = user/search/{kw}
PUT@updateOnlineTime(id-path:UserId) = user/{id}/online
readUserTimeline(uid-path:UserId, type:Int?, sliceFrom:TimelineSize?, sliceTo:TimelineSize?) -> array:Timeline = /timeline/{uid}
readAllTimeline(type:Int?, sliceFrom:TimelineSize?, sliceTo:TimelineSize?) -> array:Timeline = /timeline/all
bulkReadUserTimeline(uids-path:String, type:Int?, sliceFrom:TimelineSize?, sliceTo:TimelineSize?) -> array:Timeline = /timeline/bulk/{uids}
getUserTimelineCount(uid-path:UserId) -> number = /timeline/check/{uid}
getBulkUserTimelineCount(uids-path:String) -> number = /timeline/check/{uids}