Skip to content

Commit

Permalink
Bump up version to v1.0 and update README 😆
Browse files Browse the repository at this point in the history
  • Loading branch information
arai-ta committed Mar 4, 2018
1 parent 685a0d6 commit 3fb31c8
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 4 deletions.
29 changes: 27 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
chatwork-cli
============

`chatwork-cli` is simple command line tools for
[chatwork API](http://developer.chatwork.com).
`chatwork-cli` is a simple command line client for [chatwork API][1].

## Install

Expand All @@ -25,6 +24,30 @@ chatwork-cli
$ cw POST rooms "name=New room for topic X"
# ==> HTTP POST http://api.chatwork.com/v2/rooms

## Features

### Parameter Substitution

Edit `~/.chatwork.toml` file as following:

[values]
mychat = "17708368"

then you can do like this:

$ cw post rooms {mychat} messages "body=I'm hungry:("
# ==> HTTP POST https://api.chatwork.com/v2/rooms/17708368/messages

### Listing Available Endpoints

[chatwork API][1] is providing a [RAML definition][2].
`-endpoint` option will read definition and show list of available endpoints.

### Multiple Profiles

You can use API with multiple accounts by using configuration file.
See below.

## Configuration

It works with chatwork API token.
Expand All @@ -44,3 +67,5 @@ It works with chatwork API token.

This software is released under the MIT License.

[1]: http://developer.chatwork.com
[2]: https://github.com/chatwork/api
4 changes: 2 additions & 2 deletions cw/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (
const (
AppCommand = "cw"
AppName = "chatwork-cli/cw"
AppVersion = "0.9"
AppVersion = "1.0"
)

var (
Expand All @@ -35,7 +35,7 @@ func init() {
flag.StringVar(&optConfigFile, "f", "", "Specify `configfile` to use")
flag.BoolVar(&optVersion, "version", false, "Show version number")
flag.BoolVar(&optEndpoint, "endpoint", false, "List endpoints")
flag.StringVar(&optRamlFile, "raml", "", "Specify `ramlfile` url or path")
flag.StringVar(&optRamlFile, "raml", "", "Specify `ramlfile` url or path for -endpoint option")

// set up logger for error messaget
log.SetOutput(os.Stderr)
Expand Down

0 comments on commit 3fb31c8

Please sign in to comment.