client

command module
v0.0.0-...-e6a2c38 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 18, 2016 License: GPL-3.0 Imports: 1 Imported by: 0

README

clinot.es client CircleCI

This is a little side-project to learn Go and write a command line application using Cobra with a remote API endpoint deployed using Heroku.

The client uses the backend at api.clinot.es per default, but you can host the server by yourself, it works fine with Heroku and the default PostgreSQL add-on.

Make sure to set CLINOTES_API_HOSTNAME in your environment after setting up a custom endpoint, or just configure your API endpoint within the ~/.clinotes.yaml configuration file.

License

Feel free to use the client code, it's released using the GPLv3 license.

Contributors

Install

Homebrew on MacOS
$ > brew tap clinotes/cn
$ > brew install cn
Binaries

Commands

General
  • auth - Authorize client
  • auth request - Request new authorization token
  • config - Show client configuration
  • signup - Create new account
  • signup verify - Verify created account
  • version - Show client version
Account
  • me - Show information for your account
  • subscribe - Subscribe account to paid plan
Notes
  • add - Add note - not available yet
  • start - Start timer - not available yet
  • stop - Stop timer - not available yet
  • today - Show today's notes - not available yet
  • yesterday - Show yesterday's notes - not available yet

Usage

Create account

Configure CLINOTES_API_HOSTNAME if you do not want to use the default API endpoint https://api.clinot.es for your requests.

$ > cn signup --mail "[email protected]"

You wil receive an email at the provided address with a token to verify your account.

Verify account
$ > cn signup verify --mail "[email protected]" --token "leOhEHjDJh"

Together with the token from the verification request mail you can now verify that you are the owner of the provided email address.

Token

You need a valid token to use the clinot.es command line application. After verifying your account, just request a new token:

$ > cn auth request --mail "[email protected]"

The token will be delivered right into your mailbox again.

Authorization
$ > cn auth --mail "[email protected]" --token "ncMqN4VXSN"

If the provided token is valid to authorize access to your account, the configuration will be stored in your ~/.clinotes.yaml file and you are ready to use cn for writing notes.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL