{"id":1019,"date":"2025-02-05T13:25:22","date_gmt":"2025-02-05T19:25:22","guid":{"rendered":"http:\/\/www.multitech.net\/developer\/?page_id=1019"},"modified":"2025-02-05T13:27:42","modified_gmt":"2025-02-05T19:27:42","slug":"ruby-example-code","status":"publish","type":"page","link":"https:\/\/www.multitech.net\/developer\/software\/faxfinder\/ruby-example-code\/","title":{"rendered":"Ruby Example Code"},"content":{"rendered":"<h4>Overview<\/h4>\n<hr \/>\n<ul>\n<li>\n<div style=\"text-align: left\">A very basic Ruby code sample that will allows to send a fax to the Multitech Fax Finder device \u00a0using API interface.<\/div>\n<\/li>\n<\/ul>\n<h4>Prerequisites<\/h4>\n<hr \/>\n<ul>\n<li>This should work on any Ruby version 1.8.6 or newer. This was tested with Ruby Interpreter 1.9.2-p0 RubyInstaller on Windows at <a href=\"http:\/\/www.ruby-lang.org\/en\/downloads\/\">http:\/\/www.ruby-lang.org\/en\/downloads\/<\/a> <strong>(Please test this)<\/strong><\/li>\n<li>Download the Ruby sample source code SendFax-Ruby.zip <a href=\"https:\/\/webfiles.multitech.com\/engineering\/sample-code\/fax-finder\/ruby\/\">here<\/a>. <strong>(Use CGIT instead)<\/strong><\/li>\n<\/ul>\n<p>Notes:\u00a0The SendFax-Ruby.zip contained two files:<\/p>\n<ul>\n<li>sendfax.rb.<\/li>\n<li>schedule.xml.<\/li>\n<\/ul>\n<h4>Modify schedule.xml<\/h4>\n<hr \/>\n<p>Load the schedule.xml file into your favorite editor, find the section below, and modify the fax number to point to your recipient fax number:<\/p>\n<p><code><br \/>\n&lt;recipient&gt;<br \/>\n...<br \/>\n&lt;fax_number&gt;<em><strong>5138<\/strong><\/em><strong> <\/strong>&lt;\/fax_number&gt;<br \/>\n&lt;\/recipient&gt;<br \/>\n<\/code><\/p>\n<p>Save it.<\/p>\n<h4>Run sendfax.rb<\/h4>\n<hr \/>\n<p><strong>Change the script so that it takes parameters for hostname and username and password. <\/strong><\/p>\n<p><strong>Then just say to run it from the command line like:<\/strong><\/p>\n<p><strong>ruby sendfax.rb ip_address username password<br \/>\n<\/strong><\/p>\n<p>Now, if you web into your FaxFinder device and go to Status &amp; Log -&gt; Fax Status, you should be able to see the Fax Finder is sending out a fax.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Overview A very basic Ruby code sample that will allows to send a fax to the Multitech Fax Finder device \u00a0using API interface. Prerequisites This should work on any Ruby version 1.8.6 or newer. This was tested with Ruby Interpreter 1.9.2-p0 RubyInstaller on Windows at http:\/\/www.ruby-lang.org\/en\/downloads\/ (Please test this) Download the Ruby sample source code [&hellip;]<\/p>\n","protected":false},"author":16,"featured_media":0,"parent":131,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_topic_count_hidden":0,"_bbp_reply_count_hidden":0,"_bbp_forum_subforum_count":0,"footnotes":""},"class_list":["post-1019","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/www.multitech.net\/developer\/wp-json\/wp\/v2\/pages\/1019","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.multitech.net\/developer\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.multitech.net\/developer\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.multitech.net\/developer\/wp-json\/wp\/v2\/users\/16"}],"replies":[{"embeddable":true,"href":"https:\/\/www.multitech.net\/developer\/wp-json\/wp\/v2\/comments?post=1019"}],"version-history":[{"count":59,"href":"https:\/\/www.multitech.net\/developer\/wp-json\/wp\/v2\/pages\/1019\/revisions"}],"predecessor-version":[{"id":1184,"href":"https:\/\/www.multitech.net\/developer\/wp-json\/wp\/v2\/pages\/1019\/revisions\/1184"}],"up":[{"embeddable":true,"href":"https:\/\/www.multitech.net\/developer\/wp-json\/wp\/v2\/pages\/131"}],"wp:attachment":[{"href":"https:\/\/www.multitech.net\/developer\/wp-json\/wp\/v2\/media?parent=1019"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}