-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtoken.js
88 lines (82 loc) · 2.1 KB
/
token.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
/**
* @api {get} token Get List
* @apiVersion 1.0.0
* @apiName GetTokenList
* @apiGroup Token
*
* @apiDescription This will return a list of all tokens.
*
* @apiSuccess {Object[]} tokenList Array of all tokens
* @apiSuccess {String} tokenList.token The token
* @apiSuccess {String} tokenList.name The name of the token
* @apiSuccess {Int} tokenList.createStamp Unix time stamp of create time
*
* @apiSuccessExample {json} Success-Response:
* HTTP/1.1 200 OK
* "tokenList": [
* {
* "token": "KAJFDA7GFTRE87FDS78F7",
* "name": "Super Saiyan",
* "createStamp": "1415637736",
* },
* ...
* ]
* }
*/
/**
* @api {post} token Create
* @apiVersion 1.0.0
* @apiName PostToken
* @apiGroup Token
*
* @apiDescription Create a token.
*
* @apiParam {String} name The name of the feed
*
* @apiSuccess {String} token The token
* @apiSuccess {String} name The name of the token
* @apiSuccess {Int} createStamp Unix time stamp of create time
*
* @apiSuccessExample {json} Success-Response:
* HTTP/1.1 200 OK
* {
* "token": "KAJFDA7GFTRE87FDS78F7",
* "name": "Super Saiyan",
* "createStamp": "1415637736",
* }
*/
/**
* @api {get} token/:token Get
* @apiVersion 1.0.0
* @apiName GetToken
* @apiGroup Token
*
* @apiDescription This will return a specific token.
*
* @apiParam {String} token The token
*
* @apiSuccess {String} token The token
* @apiSuccess {String} name The name of the token
* @apiSuccess {Int} createStamp Unix time stamp of create time
*
* @apiSuccessExample {json} Success-Response:
* HTTP/1.1 200 OK
* {
* "token": "KAJFDA7GFTRE87FDS78F7",
* "name": "Super Saiyan",
* "createStamp": "1415637736",
* }
*/
/**
* @api {delete} token/:token Delete
* @apiVersion 1.0.0
* @apiName DeleteToken
* @apiGroup Token
*
* @apiDescription Delete a specific token.
*
* @apiParam {String} token The token
*
* @apiSuccessExample {json} Success-Response:
* HTTP/1.1 200 OK
*/