<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>gem on chrismoos</title>
    <link>/tags/gem/</link>
    <description>Recent content in gem on chrismoos</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en-us</language>
    <copyright>&amp;copy; 2020 Chris Moos</copyright>
    <lastBuildDate>Mon, 23 Feb 2009 14:28:35 +0000</lastBuildDate><atom:link href="/tags/gem/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>MoosTrax Ruby Library</title>
      <link>/2009/02/23/moostrax-ruby-library/</link>
      <pubDate>Mon, 23 Feb 2009 14:28:35 +0000</pubDate>
      
      <guid>/2009/02/23/moostrax-ruby-library/</guid>
      <description>You can now access MoosTrax with Ruby.
Install the gem $ wget http://www.moostrax.com/static/MoosTrax-0.1.gem $ sudo gem install MoosTrax-0.1.gem Try out this demo script make sure to fill your API_KEY in.
require &amp;#39;rubygems&amp;#39; require &amp;#39;moostrax&amp;#39; require &amp;#39;time&amp;#39; def get_local_date(date_str) Time.parse(date_str + &amp;#39; UTC&amp;#39;).getlocal.asctime end mt = MoosTrax.new(&amp;#39;API_KEY&amp;#39;) begin devices = mt.devices devices.each do |device| info = mt.device_info(device) puts &amp;#34;Device ID: #{info[&amp;#39;device_id&amp;#39;]}\n&amp;#34; puts &amp;#34;Device Name: #{info[&amp;#39;device_name&amp;#39;]}\n&amp;#34; puts &amp;#34;Last Contact: #{get_local_date(info[&amp;#39;last_contact&amp;#39;])}\n&amp;#34; puts &amp;#34;Date Added: #{get_local_date(info[&amp;#39;date_added&amp;#39;])}\n&amp;#34; location = mt.</description>
    </item>
    
  </channel>
</rss>
