blob: bcff9942baf79d53a67ab0474e05b4c62b3e3f41 (
plain) (
blame)
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
|
basePath: /api
definitions:
main.Credentials:
description: User's credentials
properties:
Password:
type: string
Username:
type: string
type: object
info:
contact:
email: mitch@riedstra.dev
name: Mitchell Riedstra
url: https://riedstra.dev
description: User's credentials
license:
name: ISC
title: Simple Pastebin API
version: "1.0"
paths:
/v0/del/{id}:
delete:
description: Remove a paste from the filesystem
parameters:
- description: Paste ID
in: path
name: id
required: true
type: string
produces:
- text/plain
responses: {}
summary: Deletes a paste for a given ID
tags:
- v0
/v0/view/{id}:
get:
description: Fetches the contents of a paste if given an ID
parameters:
- description: Paste ID
in: path
name: id
required: true
type: string
produces:
- text/plain
responses: {}
summary: View a paste for a given ID
tags:
- v0
/v1/del/{id}:
delete:
description: Remove a paste from the filesystem
parameters:
- description: Paste ID
in: path
name: id
required: true
type: string
produces:
- application/json
responses: {}
summary: Deletes a paste for a given ID
tags:
- v1
/v1/getToken:
post:
consumes:
- application/json
description: Returns an API key that's valid for a pre-determined amount of
hours
parameters:
- description: User Credentials
in: body
name: request
required: true
schema:
$ref: '#/definitions/main.Credentials'
produces:
- application/json
responses: {}
summary: Get an API key with valid credentials
tags:
- v1
/v1/view/{id}:
get:
description: Fetches the contents of a paste if given an ID
parameters:
- description: Paste ID
in: path
name: id
required: true
type: string
produces:
- application/json
responses: {}
summary: View a paste for a given ID
tags:
- v1
securityDefinitions:
"":
in: header
name: Authorization
type: apiKey
BasicAuth:
type: basic
swagger: "2.0"
|