Warning: sizeof(): Parameter must be an array or an object that implements Countable in /nfs/c02/h01/mnt/29515/domains/unterbahn.com/html/wp-content/plugins/wordpress-firewall/wordpress-firewall.php on line 245
Warning: sizeof(): Parameter must be an array or an object that implements Countable in /nfs/c02/h01/mnt/29515/domains/unterbahn.com/html/wp-content/plugins/wordpress-firewall/wordpress-firewall.php on line 245 Tutorials – Unterbahn
To offer OSM-JSON along with of OSM-XML, we added a route to accept a “.format” suffix, and split up the render call based on the params[:format] part of the route:
Here we actually batch import the messages, saving them in a local model. I also demonstrate a script to perform the imports, and set up a table to store key:value pairs for more advanced usage – I’ll finish that feature up in a subsequent tutorial.
Saving the messages locally is important for not exceeding the Twitter rate limit, as well as for performing more complex searches and manipulations with the data. It also provides a common message storage if you’re importing from multiple sources, say, FrontlineSMS, Clickatell, and Twitter.
In this tutorial I cover how to set up a basic Ruby on Rails 2.2.2 application and how to connect it to the Twitter API. Then I demonstrate receiving and sending Tweets, i.e. text messages through Twitter. I’ve also shared the code in Google Code.