README.md in dingtalk-robot-0.1.0 vs README.md in dingtalk-robot-0.2.0
- old
+ new
@@ -1,8 +1,8 @@
-# Dingtalk::Robot
+# Dingtalk Robot
-A simple wrapper for [DingTalk Group Robot](https://open-doc.dingtalk.com/microapp/serverapi2/qf2nxq).
+A simple wrapper for [Dingtalk Group Robot](https://open-doc.dingtalk.com/microapp/serverapi2/qf2nxq).
[](https://rubygems.org/gems/dingtalk-robot)
[](https://travis-ci.org/pinewong/dingtalk-robot)
[](https://codecov.io/github/pinewong/dingtalk-robot?branch=master)
@@ -27,10 +27,23 @@
$ gem install dingtalk-robot
```
## Usage
-TODO: Write usage instructions here
+```ruby
+# Config api token and message template directory
+Dingtalk::Robot.config.tokens = { order: 'WEBHOOK...' }
+Dingtalk::Robot.config.template_dir = '.'
+system %q(echo 'hello, <%= @name %>' > order.text.erb)
+
+# Notify message
+robot = Dingtalk::Robot.new(:order) { @name = 'Pine Wong' }
+robot.notify
+```
+
+## Help and Docs
+
+* [RDoc](https://www.rubydoc.info/github/pinewong/dingtalk-robot)
## Development
After checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.