iwannagothere 0.0.3 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.rvmrc +1 -0
- data/Gemfile +11 -0
- data/Gemfile.lock +22 -0
- data/README.md +9 -9
- data/Rakefile +22 -0
- data/examples/all_methods.rb +6 -11
- data/iwannagothere.gemspec +83 -0
- data/lib/core_ext/hash.rb +5 -0
- data/lib/iwannagothere.rb +29 -9
- data/lib/iwannagothere/client.rb +3 -39
- data/lib/iwannagothere/configuration.rb +37 -0
- data/lib/iwannagothere/guide.rb +23 -0
- data/lib/iwannagothere/item.rb +21 -13
- data/lib/iwannagothere/photo.rb +11 -6
- data/lib/iwannagothere/place.rb +21 -18
- data/lib/iwannagothere/urls.rb +14 -21
- data/test/fixtures/3128760.json +32 -0
- data/test/fixtures/3128760_guides.json +79 -0
- data/test/fixtures/3128760_items.json +1 -0
- data/test/fixtures/3128760_photos.json +16 -0
- data/test/fixtures/item_1659.json +62 -0
- data/test/fixtures/route_215.json +18 -0
- data/test/fixtures/route_215_items.json +289 -0
- data/test/fixtures/routes_215_items.json +289 -0
- data/test/guide_test.rb +21 -0
- data/test/integration/smoke_test.rb +11 -0
- data/test/item_test.rb +16 -0
- data/test/photo_test.rb +12 -0
- data/test/place_test.rb +26 -0
- data/test/test_helper.rb +29 -0
- metadata +107 -56
- data/lib/iwannagothere/element.rb +0 -11
- data/lib/iwannagothere/item_route.rb +0 -11
- data/lib/iwannagothere/user.rb +0 -5
@@ -1,11 +0,0 @@
|
|
1
|
-
module IWannaGoThere
|
2
|
-
class ItemRoute < Element
|
3
|
-
attr_accessor :name, :nicename, :items_count, :id, :description, :user_id,
|
4
|
-
:long_guid, :created_at, :updated_at, :delta, :from, :to, :meta
|
5
|
-
|
6
|
-
def items(limit = 10)
|
7
|
-
r = IWannaGoThere.get(@urls[:guide_items].params({ :route_id => @id }), @options, { :limit => limit })
|
8
|
-
r['items'].collect{ |p| Item.new( p, @urls, @options ) }
|
9
|
-
end
|
10
|
-
end
|
11
|
-
end
|