decor

Command for displaying various information on terminal.

decor

Command for displaying various information on terminal.

Usage

% crystal build runner.cr
% ./runner get --immediately --config ./config.json
% ./runner puts

Gmail requires authentication by code. To do the authentication, execute with the with-auth option.

% ./runner get --immediately --with-auth --config ./config.json

Config.json

  • service
    • Service name. "gmail" or "twitter".
  • key
    • Unique key.
  • expires_in
    • The expiration date of the data. Not used when immediately option is specified.
  • path
    • Absolute path of the directory containing client_secret file.

Example

{
    "order": [
        {
            "service": "gmail",
            "key": "gmail",
            "expires_in": 600,
            "path": "/your/env/dir/gmail/"
        },
        {
            "service": "twitter",
            "key": "twitter",
            "expires_in": 600,
            "path": "/your/env/dir/twitter/"
        },
        {
            "service": "twitter",
            "key": "<unique key>",
            "arg": "u:<Twitter screen name>",
            "expires_in": 600,
            "path": "/your/env/dir/twitter/"
        },
        {
            "service": "twitter",
            "key": "<unique key>",
            "arg": "s:<Search word of Twitter>",
            "expires_in": 600,
            "path": "/your/env/dir/twitter/"
        }
    ]
}

client secret

The client_secret file is required for operation.

Gmail

Please download the client_secret file from the authentication information of Google Cloud Platform console.

Twitter

{
    "consumer_key": "your consumer key",
    "consumer_secret": "your consumer secret",
    "token": "your token",
    "token_secret": "your token secret"
}
Owner
github statistic
  • 0
  • 0
  • 0
  • 0
  • about 2 years ago
  • January 12, 2017
License

Apache License 2.0

Links
Synced at

Mon, 02 Aug 2021 08:52:40 GMT