-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathOPTIONS
107 lines (89 loc) · 2.79 KB
/
OPTIONS
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
-> Create a new paste;
[Required]
api_dev_key (access key)
api_option (set as 'paste')
api_paste_code (text)
[Optional]
api_user_key (user posting the paste, if blank posts as guest)
api_paste_name (paste name)
api_paste_format (syntax highlighting)
api_paste_private (public, unlisted, private)
api_paste_expire_date (expiration time)
On success
returns: paste link
On error, returns
Bad API request, invalid api_option
Bad API request, invalid api_dev_key
Bad API request, IP blocked
Bad API request, maximum number of 25 unlisted pastes for your free account
Bad API request, maximum number of 10 private pastes for your free account
Bad API request, api_paste_code was empty
Bad API request, maximum paste file size exceeded
Bad API request, invalid api_expire_date
Bad API request, invalid api_paste_private
Bad API request, invalid api_paste_format
Bad API request, invalid api_user_key
Bad API request, invalid or expired api_user_key
-> Get api_user_key
[Required]
api_dev_key (access key)
api_user_name (username)
api_user_password (password)
On success
returns: api_user_key
On error, returns
Bad API request, use POST request, not GET
Bad API request, invalid api_dev_key
Bad API request, invalid login
Bad API request, account not active
Bad API request, invalid POST parameters
-> Listing pastes created by an user
[Required]
api_dev_key (access_key)
api_user_key (user key)
api_results_limit (max number of results)
api_option (set as 'list')
On success:
returns: pasting list
returns: 'No pastes found'
On error, returns:
Bad API request, invalid api_option
Bad API request, invalid api_dev_key
Bad API request, invalid api_user_key
-> Deleting a paste created by an user
[Required]
api_dev_key (access_key)
api_user_key (user key)
api_paste_key (unique key of the paste that will be deleted)
api_option (set as 'delete')
On sucess:
returns: Paste Removed
On error, returns:
Bad API request, invalid api_option
Bad API request, invalid api_dev_key
Bad API request, invalid api_user_key
Bad API request, invalid permission to remove paste
-> Getting user information and settings
[Required]
api_dev_key (access_key)
api_user_key (user key)
api_option (set as 'userdetails')
On success:
returns: user info
On error, returns:
Bad API request, invalid api_option
Bad API request, invalid api_dev_key
Bad API request, invalid api_user_key
-> Getting raw paste of
[Required]
api_dev_key (access_key)
api_user_key (user key)
api_paste_key (key for paste to be obtained)
api_option (set as 'show_paste')
On success:
returns: raw paste content
On error, returns:
Bad API request, invalid api_option
Bad API request, invalid api_dev_key
Bad API request, invalid api_user_key
Bad API request, invalid permission to view this paste or invalid api_paste_key