The ant-client gem provides a simple way to access to Ant.com open API.
Install the lastest stable release:
[sudo] gem install ant-client
In rails, add it to you Gemfile:
gem 'ant-client', :require => 'ant_client'The ant-client gem includes a useful HMAC module that can generates and verify security tokens.
- The module Ant::HMAC can be mixed in another class or used as separate module with methods
Ant::HMAC.generate_secret
# generates random token secret 32 symbols length
Ant::HMAC.hmac secret, {id: 1, ts: Time.now.to_i}
# generates SHA1 token that can be verified later
# requires mandatory id and ts parameters
Ant::HMAC.verify? object, {id: 1, ts: timestamp, token: token}
# verifies token that was generated before
# requires object that should respond to api_key method which returns secret
# id, ts, token that were generated before
# returns object if tokens are equalAnt cmd line is cmd tool to manage Bookmarks, show Weblink and Library for Ant.com.
- show help and usage type:
ant
ant --help- create show weblink:
ant weblink create 1 izwkXcOeiyn4yWBCnnyaSmMUGvxp5h35 google.com --server localhost:3000
ant weblink show 1 izwkXcOeiyn4yWBCnnyaSmMUGvxp5h36 80 --server localhost:3000- create show library:
ant library create 1 izwkXcOeiyn4yWBCnnyaSmMUGvxp5h36 cmd_lib hello --server localhost:3000
ant library show 1 izwkXcOeiyn4yWBCnnyaSmMUGvxp5h36 1 --server localhost:3000- pending tests and tests for Ant::Client, Ant::Command
- add comments and generate documentation for Ant::Client and cmd
- add more restfool actions
- refactor code
Ant.com ruby client