Giter VIP home page Giter VIP logo

curl-oauth's Introduction

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

curl-oauth's People

Contributors

brondsem avatar dcharbonnier avatar jhpinson avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.