Sha256: 8406819bff0a0b34dba8a8df90d9fe4ba72201f0375cc86f45833c2ae8b0858f

Contents?: true

Size: 607 Bytes

Versions: 11

Compression:

Stored size: 607 Bytes

Contents

module Gowalla
  module Trips

    # List of trips
    #
    # @return [<Hashie::Mash>] trip info
    def trips(options={})
      if user_id = options.delete(:user_id)
        options[:user_url] = "/users/#{user_id}"
      end
      query = format_geo_options(options)
      response = connection.get do |req|
        req.url "/trips", query
      end
      response.body.trips
    end

    # Retrieve information about a specific trip
    #
    # @param [Integer] trip_id Trip ID
    # @return [Hashie::Mash] trip info
    def trip(trip_id)
      connection.get("/trips/#{trip_id}").body
    end

  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
gowalla-0.5.8 lib/gowalla/trips.rb
gowalla-0.5.7 lib/gowalla/trips.rb
gowalla-0.5.6 lib/gowalla/trips.rb
gowalla-0.5.5 lib/gowalla/trips.rb
gowalla-0.5.4 lib/gowalla/trips.rb
gowalla-0.5.3 lib/gowalla/trips.rb
gowalla-0.5.2 lib/gowalla/trips.rb
gowalla-0.5.1 lib/gowalla/trips.rb
gowalla-0.4.2 lib/gowalla/trips.rb
gowalla-0.4.1 lib/gowalla/trips.rb
gowalla-0.4.0 lib/gowalla/trips.rb