Audiovox P965 Datasheet Page 189

  • Download
  • Add to my manuals
  • Print
  • Page
    / 280
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 188
API Ruby class
186
API Ruby class
Ruby GEM
The API Ruby class(es) are now packaged together as a Ruby GEM. The latest GEM is available for download from
the author's web site. The current version is 4.0.0 available here:
mtik-4.0.0.gem
[1]
Or you can simply do:
gem install mtik
RDoc Documentation
The author's site also hosts Ruby RDoc documents for the classes implementing this API. The link is:
http:/ / www. aarongifford. com/ computers/ mtik/ latest/ doc/
[2]
Examples
Several example scripts are included with the GEM or available for direct download from the author.
tikcli
[3]
- A command-line-like interactive ruby script. You can type MikroTik API commands and arguments
directly and have them executed.
tikcommand
[4]
- A non-interactive command-line script to execute a single MikroTik API command and return
the results to STDOUT.
tikfetch
[5]
- This non-interactive command-line script lets one instruct a MikroTik device to download one or
more files from the provided URL(s).
tikjson.rb
[6]
- Another non-interactive command-line script that executes a single MikroTik API command and
returns the results to STDOUT, however the results are encoded in JSON format. One could easily add CGI
handling to this script, install it on a web server, and use it via a web browser. (The author in fact has done
something like this for a JavaScript-based management web application that interacts with MikroTik devices via
the API.)
Interactive examples using gem-supplied utility scripts
Here is are several example runs of the tikcli utility script included in the gem:
user@bsdhost:~$ tikcli 10.20.30.1 admin wrongpassword
<<< '/login' (6)
<<< END-OF-SENTENCE
>>> '!done' (5)
>>> 'ret=bf41fd4286417870c5eb86674a3b8fe4' (36)
>>> '.tag=0' (6)
>>> END-OF SENTENCE
<<< '/login' (6)
<<< '=name=admin' (11)
<<< '=response=0003a042937d84ca4bc4cf7da50aadd507' (44)
Page view 188
1 2 ... 184 185 186 187 188 189 190 191 192 193 194 ... 279 280

Comments to this Manuals

No comments