This is a demo application of the Imgur API. It can be used to interrogate the Imgur API and examine its responses, as a simple command line utility, and it can be used as a library for working with the Imgur API.
You must register your client with the Imgur API, and provide the client ID to do any request to the API. If you want to perform actions on accounts, the user will have to authorize it through OAuth. The secret field is required for OAuth.
Usage: python main.py (action) [options...]
credits
View the rate limit information for this clientauthorize
Start the authorization processauthorize [pin]
Get an access token after starting authorizationrefresh [refresh-token]
Return a new OAuth access token after it's expiredupload [file]
Anonymously upload a filelist-comments [hash]
Get the comments (raw JSON) for a gallery postget-album [id]
Get information (raw JSON) about an albumget-comment [id]
Get a particular comment (raw JSON) for a gallery commentget-gallery [hash]
Get information (raw JSON) about a gallery postupload-auth [access-token]
Upload a file to your accountcomment [access-token] [hash] [text ...]
Comment on a gallery postvote-gallery [token] [hash] [direction]
Vote on a gallery post. Direction either 'up', 'down', or 'veto'vote-comment [token] [id] [direction]
Vote on a gallery comment. Direction either 'up', 'down', or 'veto'
Configuration is done through the config.json file in JSON format. The contents of the file should be a JSON object with the following properties:
Key: 'client_id'
Type: String [16 characters]
Description: The client ID you got when you registered. Required for any API call.
Key: 'secret'
Type: String [40 characters]
Description: The client secret you got when you registered, if you want to do OAuth authentication.
Key: 'token_store'
Type: Object
Description: Future configuration to control where the tokens are stored for persistent insecure storage of refresh tokens.