@lap v0.3
# Machine-readable API spec. Each @endpoint block is one API call.
@api FORTNITE REST API
@base https://skynewz-api-fortnite.herokuapp.com/api
@version 3.1.5
@auth ApiKey Authorization in header
@endpoints 9
@toc oauth(1), check(1), news(1), user(1), stats(2), pve(2), store(1)

@group oauth
@endpoint POST /oauth/token
@desc Get a Bearer token
@required {email: any, password: any}
@returns(200) Your access token
@errors {401: Authentication failed, 404: Authentication failed. User not found}

@endgroup

@group check
@endpoint GET /check
@desc Get Fortnite game status
@returns(200) Fortnite is okay !

@endgroup

@group news
@endpoint GET /news
@desc Get Fortnite News
@returns(200) A JSON objects of current news

@endgroup

@group user
@endpoint GET /user/{plateform}/{username}
@desc Get a user by username
@required {plateform: any # Playing plateform, can be xb1, ps4 or pc, username: any # Player username}
@returns(200) JSON Object of user
@errors {404: User not found or not found on this plateform}

@endgroup

@group stats
@endpoint GET /stats/{plateform}/{username}
@desc Get user's stats by username
@required {plateform: any # Playing plateform, can be xb1, ps4 or pc, username: any # Player username}
@returns(200) JSON Object of user stats
@errors {400: Please precise a good platform: ps4/xb1/pc, 404: User not found or not found on this plateform}

@endpoint GET /stats/id/{plateform}/{id}
@desc Get user's stats by user id
@required {plateform: any # Playing plateform, can be xb1, ps4 or pc, id: any # Player ID}
@returns(200) JSON Object of user stats
@errors {400: Please precise a good platform: ps4/xb1/pc, 404: User not found or not found on this plateform}

@endgroup

@group pve
@endpoint GET /pve/user/{username}
@desc Get PVE Stat by given username
@required {username: any # Fortnite username}
@returns(200) All okay
@errors {404: User not found or not found on this plateform}

@endpoint GET /pve/info
@desc Get Fortnite PVE Info (storm, etc)
@returns(200) All okay

@endgroup

@group store
@endpoint GET /store
@desc Get Fortnite Store
@returns(200) Current store object

@endgroup

@end
