Plan your Nextstop from Ruby — or Twitter!

I stumbled across Nextstop this week, a community driven travel site where users can post destination guides and recommend places to explore, eat & drink, or just sleep. Since I’m an API junkie, when they announced their new API this week, I just had to write a Ruby wrapper.

Features

The Nextstop API is powerful yet simple and includes searching and retrieving detailed information for:

  • Places or Place Summaries
  • Guides and Related Guides
  • Recommendations
  • Related Website
  • Authors

Installation

sudo gem install gemcutter
gem tumble
sudo gem install nextstop

Usage

To use the API, you’ll need to sign up for an API Key.

# init the nextstop client with your api key
nextstop = Nextstop.new('OU812')

# search guides for Dallas
nextstop.search_guides(:q => 'Dallas')

# search guides for Dallas
nextstop.search_places(:q => 'Dallas')

# get detailed info for a guide
nextstop.guide('nzp9KFPK4ok')

# get detailed info for a place
nextstop.place('kgOslXII8bo')

Easy peasy. You can explore your own back yard right from your Ruby console. As always, you can grab the code on the hub.

Nextstop’s nifty Twitter bot

If you’re on the go and want to find your Nextstop from your phone, just send a tweet to @nextstopbot in the form of @nextstopbot [query] near [place].

Nextstopbot includes a link to the results in a handy mobile-friendly format. Too cool.

If you enjoyed this post, please consider leaving a comment or subscribing to the RSS feed to have future articles delivered to your feed reader.

Related posts:

  1. Twitter gem updates: So long Mash, hello Hashie
  2. New in the Twitter gem: Lists!
  3. Link LinkedIn into your next Ruby application
  4. The Twitter gem now supports Tumblr
  5. What makes a good API wrapper?
Bookmark the permalink. Both comments and trackbacks are currently closed.
blog comments powered by Disqus