-
Notifications
You must be signed in to change notification settings - Fork 3
/
README
78 lines (69 loc) · 2.91 KB
/
README
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
INSTALL
cd $TMPDIR
curl -O https://raw.github.com/oxys-net/curl-oauth/master/curl-oauth
chmod a+x curl-oauth
sudo mv curl-oauth /usr/local/bin/
sudo pip install oauth2
cd -
Optional :
- for json colorized output:
pip install pygments
- for https support:
pip install certifi
START
export API="http://example.com/api/oauth";
curl-oauth --domain example \
--request-token \
--consumer-secret Mq4As9xngJzyqQ2vRaYWGF9qRquvyBxI \
--consumer-key BQNmyk5sAb7m8vSvbA \
--request-token-url $API/request_token/ \
--request-token-callback http://example.com \
--request-token-authorize-url $API/authorize/
--request-token-access-token-url $API/access_token/
USAGE
usage: curl-oauth [-h] [--domain DOMAIN] [--list-domains]
[--consumer-key CONSUMER_KEY]
[--consumer-secret CONSUMER_SECRET] [--token-key TOKEN_KEY]
[--token-secret TOKEN_SECRET] [--request-token]
[--request-token-url REQUEST_TOKEN_URL]
[--request-token-callback REQUEST_TOKEN_CALLBACK]
[--request-token-authorize-url REQUEST_TOKEN_AUTHORIZE_URL]
[--request-token-access-token-url REQUEST_TOKEN_ACCESS_TOKEN_URL]
[--json] [-X HTTP_METHOD] [-H HEADERS] [-d DATA] [-T FILE_NAME]
[-I] [-i] [urls [urls ...]]
A curl like tool with oauth support
positional arguments:
urls
optional arguments:
-h, --help show this help message and exit
--domain DOMAIN config domain
--list-domains list available domains
--consumer-key CONSUMER_KEY, -ck CONSUMER_KEY
consumer key
--consumer-secret CONSUMER_SECRET, -cs CONSUMER_SECRET
consumer secret
--token-key TOKEN_KEY, -tk TOKEN_KEY
token key
--token-secret TOKEN_SECRET, -ts TOKEN_SECRET
token secret
--request-token create new token
--request-token-url REQUEST_TOKEN_URL
request token url
--request-token-callback REQUEST_TOKEN_CALLBACK
request token callback
--request-token-authorize-url REQUEST_TOKEN_AUTHORIZE_URL
request token authorize url
--request-token-access-token-url REQUEST_TOKEN_ACCESS_TOKEN_URL
request token access verify url
--json add content type and prettify output (install pygments
for colors)
-X HTTP_METHOD, --request HTTP_METHOD
Specify request command to use
-H HEADERS, --header HEADERS
Custom header to pass to server
-d DATA, --data DATA HTTP POST data
-t FILE_NAME, --upload-file FILE_NAME
Transfer a file in the body of the http request.
Defaults to PUT.
-I, --head Show document info only
-i, --include Include protocol headers in the output