Skip to content
Client component for https://clinot.es service API
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
Godeps
cmd
vendor
.gitignore
.goxc.json
LICENSE.md
Makefile
README.md
circle.yml
main.go

README.md

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 "mail@example.com"

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

Verify account

$ > cn signup verify --mail "mail@example.com" --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 "mail@example.com"

The token will be delivered right into your mailbox again.

Authorization

$ > cn auth --mail "mail@example.com" --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.

You can’t perform that action at this time.