yipit 0.0.1 → 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.md +53 -1
- data/lib/yipit.rb +71 -8
- data/lib/yipit/version.rb +1 -1
- data/spec/businesses/businesses_spec.rb +28 -0
- data/spec/client/client_spec.rb +0 -48
- data/spec/deals/deals_spec.rb +107 -0
- data/spec/divisions/divisions_spec.rb +44 -0
- data/spec/sources/sources_spec.rb +44 -0
- data/spec/spec_helper.rb +1 -0
- data/spec/tags/tags_spec.rb +36 -0
- data/yipit.gemspec +1 -1
- metadata +13 -5
- data/spec/cassettes/Yipit_Client/api/search_deals.yml +0 -82
    
        data/README.md
    CHANGED
    
    | @@ -1 +1,53 @@ | |
| 1 | 
            -
             | 
| 1 | 
            +
            # Yipit
         | 
| 2 | 
            +
             | 
| 3 | 
            +
            Simple Ruby wrapper for the Yipit [API](http://yipit.com/about/api_overview/). [Yipit](http://yipit.com) features deals aggregated from a number of sources, includng Groupon, LivingSocial, Restaurants.com, and more.
         | 
| 4 | 
            +
             | 
| 5 | 
            +
            ## Under development
         | 
| 6 | 
            +
             | 
| 7 | 
            +
                This bitch ain't ready for production yet.  Recognize.
         | 
| 8 | 
            +
             | 
| 9 | 
            +
            ## Installation
         | 
| 10 | 
            +
             | 
| 11 | 
            +
                sudo gem install yipit
         | 
| 12 | 
            +
                
         | 
| 13 | 
            +
            ## Usage
         | 
| 14 | 
            +
             | 
| 15 | 
            +
            You'll need a Yipit [API key](http://yipit.com/account/login/?next=/about/api_key/).
         | 
| 16 | 
            +
             | 
| 17 | 
            +
            ### Instantiate
         | 
| 18 | 
            +
                require 'Yipit'
         | 
| 19 | 
            +
                client = Yipit::Client.new(YOUR_API_KEY)
         | 
| 20 | 
            +
                
         | 
| 21 | 
            +
            Yipit uses a [`Hashie::Mash`](https://github.com/intridea/hashie) for return values, providing a handy hash that supports dot notation:
         | 
| 22 | 
            +
             | 
| 23 | 
            +
                deal.title
         | 
| 24 | 
            +
                => "$100 Gift Certificate, Your Price $40"
         | 
| 25 | 
            +
                deal.division.name
         | 
| 26 | 
            +
                => "New York"
         | 
| 27 | 
            +
                
         | 
| 28 | 
            +
            ### Issues
         | 
| 29 | 
            +
              GitHub issue tracking sucks.  Submit issues to [`Lighthouse`](https://yipit.lighthouseapp.com)
         | 
| 30 | 
            +
             | 
| 31 | 
            +
            <a name="changelog"></a>
         | 
| 32 | 
            +
            ## Changelog
         | 
| 33 | 
            +
             | 
| 34 | 
            +
            ### 0.0.1 - March 14, 2011
         | 
| 35 | 
            +
             | 
| 36 | 
            +
            * Initial version
         | 
| 37 | 
            +
             | 
| 38 | 
            +
             | 
| 39 | 
            +
            ## Under the hood
         | 
| 40 | 
            +
            * [`Faraday`](https://github.com/technoweenie/faraday) REST client
         | 
| 41 | 
            +
            * [`Hashie::Mash`](http://github.com/intridea/hashie)  Magic
         | 
| 42 | 
            +
             | 
| 43 | 
            +
            ## How to contribute
         | 
| 44 | 
            +
             
         | 
| 45 | 
            +
            * Fork the project.
         | 
| 46 | 
            +
            * Make your feature addition or bug fix.
         | 
| 47 | 
            +
            * Add tests for it. This is important so I don't break it in a
         | 
| 48 | 
            +
              future version unintentionally.
         | 
| 49 | 
            +
            * Commit, do not mess with rakefile, version, or history.
         | 
| 50 | 
            +
              (if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)
         | 
| 51 | 
            +
            * Send me a pull request. Bonus points for topic branches.
         | 
| 52 | 
            +
             | 
| 53 | 
            +
            Copyright (c) 2011 [Josh Deeden](http://twitter.com/jdeeden). 
         | 
    
        data/lib/yipit.rb
    CHANGED
    
    | @@ -5,21 +5,84 @@ require 'core_ext/array' | |
| 5 5 | 
             
            module Yipit
         | 
| 6 6 | 
             
              class Client
         | 
| 7 7 | 
             
                attr_reader :api_key, :conn
         | 
| 8 | 
            -
             | 
| 9 | 
            -
             | 
| 10 | 
            -
             | 
| 8 | 
            +
             | 
| 9 | 
            +
                # Initialize the client.
         | 
| 10 | 
            +
                # TODO:  Document.
         | 
| 11 | 
            +
                def initialize(*args)
         | 
| 12 | 
            +
                  options = args.extract_options!
         | 
| 13 | 
            +
                  @api_key = args[0]
         | 
| 14 | 
            +
                  @conn = Faraday.new(:url => "http://api.yipit.com") do |builder|
         | 
| 11 15 | 
             
                    builder.adapter Faraday.default_adapter
         | 
| 12 | 
            -
                    builder.adapter  :logger
         | 
| 16 | 
            +
                    builder.adapter  :logger if options[:debug] == true
         | 
| 13 17 | 
             
                    builder.use Faraday::Response::ParseJson
         | 
| 14 18 | 
             
                    builder.use Faraday::Response::Mashify
         | 
| 15 19 | 
             
                  end
         | 
| 16 20 | 
             
                end
         | 
| 21 | 
            +
             | 
| 22 | 
            +
                # @overload deals(options={})
         | 
| 23 | 
            +
                #   Search for Deals
         | 
| 24 | 
            +
                #   @param [Hash] options A customizable set of options
         | 
| 25 | 
            +
                #   @option options [String] :lat Latitude of point to to sort deals by proximity to. Use with lon.  Uses radius.
         | 
| 26 | 
            +
                #   @option options [String] :lon Longitude of point to to sort deals by proximity to. Use with lat.  Uses radius.
         | 
| 27 | 
            +
                #   @option options [Fixnum] :radius Maximum distance of radius in miles to deal location from center point. Defaults to 10. Requires lat and lon
         | 
| 28 | 
            +
                #   @option options [String] :divisions One or more division slugs (comma separated). See Divisions API for more details.
         | 
| 29 | 
            +
                #   @option options [String] :source One or more source slugs (comma separated). See Sources API for more details.
         | 
| 30 | 
            +
                #   @option options [String] :phone Deals available at a business matching one of the phone numbers. See Businesses API for more details.
         | 
| 31 | 
            +
                #   @option options [String] :tag One or more tag slugs (comma separated). See Tags API for more details. Note: Specifying multiple tags returns deals matching any one of the tags, NOT all of them
         | 
| 32 | 
            +
                #   @option options [Boolean] :paid Shows deals filtered on paid status.  Defaults to false. Set to true if you would like to see all deals.
         | 
| 33 | 
            +
                #   @return [Array] An array of Hashie::Mash objects representing Yipit deals
         | 
| 34 | 
            +
                #   @example Search deals by latitude and longitude
         | 
| 35 | 
            +
                #       client.deals(:lat => "-37.74", :lon => "-76.00")
         | 
| 36 | 
            +
                #   @example Search deals within a 2 miles radius of latitude and longitude
         | 
| 37 | 
            +
                #       client.deals(:lat => "-37.74", :lon => "-76.00", :radius => 2)
         | 
| 38 | 
            +
                #   @example Search deals from Groupon
         | 
| 39 | 
            +
                #       client.deals(:source => "Groupon")
         | 
| 40 | 
            +
                #   @example Search deals based on phone number
         | 
| 41 | 
            +
                #       client.deals(:phone => "7185551212")
         | 
| 42 | 
            +
                #   @example Search deals based on tags
         | 
| 43 | 
            +
                #       client.deals(:tag => "restaurants,spa")
         | 
| 44 | 
            +
                #   @example Search deals based on paid status. (Defaults to false)
         | 
| 45 | 
            +
                #       client.deals(:paid => true)
         | 
| 46 | 
            +
                # @overload deals(deal_id)
         | 
| 47 | 
            +
                #   Get deal details
         | 
| 48 | 
            +
                #   @param [Fixnum] deal_id A Deal Id
         | 
| 49 | 
            +
                #   @return [Hashie::Mash] A Hashie::Mash object representing a Yipit deal
         | 
| 50 | 
            +
                def deals(*args)
         | 
| 51 | 
            +
                  super
         | 
| 52 | 
            +
                end
         | 
| 53 | 
            +
             | 
| 54 | 
            +
                # @overload sources(options={})
         | 
| 55 | 
            +
                #   Search for sources
         | 
| 56 | 
            +
                #   @param [Hash] options A customizable set of options
         | 
| 57 | 
            +
                #   @option options [String] :division One or more division slugs. See Divisions API for more details. Note: Specifying multiple divisions returns sources that exist in either of the divisions, NOT all of them.
         | 
| 58 | 
            +
                #   @option options [String] :paid When paid is true, only paid sources are returned. Defaults to false.
         | 
| 59 | 
            +
                # @overload sources(source_id)
         | 
| 60 | 
            +
                #   Get source details
         | 
| 61 | 
            +
                #   @param [String] slug A source slug
         | 
| 62 | 
            +
                #   @return [Hashie::Mash] A Hashie::Mash object representing a Yipit Deal Source
         | 
| 63 | 
            +
                def sources(*args)
         | 
| 64 | 
            +
                  super
         | 
| 65 | 
            +
                end
         | 
| 66 | 
            +
             | 
| 67 | 
            +
                # @overload tags(options={})
         | 
| 68 | 
            +
                #   This method returns a list of all tags. There are no parameters specific to tags.
         | 
| 69 | 
            +
                #   @param [Hash] options A customizable set of options
         | 
| 70 | 
            +
                #   @return [Array] An array of Hashie::Mash objects representing Yipit tags.
         | 
| 71 | 
            +
                def tags(*args)
         | 
| 72 | 
            +
                  super
         | 
| 73 | 
            +
                end
         | 
| 74 | 
            +
                def divisions(*args)
         | 
| 75 | 
            +
                  super
         | 
| 76 | 
            +
                end
         | 
| 77 | 
            +
                def businesses(*args)
         | 
| 78 | 
            +
                  super
         | 
| 79 | 
            +
                end
         | 
| 80 | 
            +
             | 
| 17 81 | 
             
                def method_missing(sym, *args, &block)
         | 
| 18 | 
            -
                   | 
| 19 | 
            -
                  options = args.extract_options!
         | 
| 20 | 
            -
                  options = options.merge(:key => api_key)
         | 
| 82 | 
            +
                  options = args.extract_options!.merge(:key => api_key)
         | 
| 21 83 | 
             
                  response = conn.get("/v1/#{sym.to_s}/#{args[0]}") { |req| req.params = options  }
         | 
| 22 | 
            -
                  response.body.response.send sym
         | 
| 84 | 
            +
                  ret = response.body.response.send sym
         | 
| 85 | 
            +
                  args[0].nil? ? ret : ret.first if ret
         | 
| 23 86 | 
             
                end
         | 
| 24 87 | 
             
              end
         | 
| 25 88 | 
             
            end
         | 
    
        data/lib/yipit/version.rb
    CHANGED
    
    
| @@ -0,0 +1,28 @@ | |
| 1 | 
            +
            require File.expand_path('../../spec_helper', __FILE__)
         | 
| 2 | 
            +
            describe Yipit::Client do
         | 
| 3 | 
            +
              context "api" do
         | 
| 4 | 
            +
                before(:all) do
         | 
| 5 | 
            +
                  api_key="XZgnp3v2vyrBr3eR"
         | 
| 6 | 
            +
                  @client = Yipit::Client.new(api_key)
         | 
| 7 | 
            +
                end
         | 
| 8 | 
            +
               context "businesses" do
         | 
| 9 | 
            +
                  context "search businesses" do
         | 
| 10 | 
            +
                    # use_vcr_cassette
         | 
| 11 | 
            +
                    before(:all) do
         | 
| 12 | 
            +
                      @businesses = @client.businesses
         | 
| 13 | 
            +
                    end
         | 
| 14 | 
            +
                    specify { @businesses.size.should > 1 }
         | 
| 15 | 
            +
                  end
         | 
| 16 | 
            +
                  # These don't work because the Yipit API is busted currently.
         | 
| 17 | 
            +
                  context "business details" do
         | 
| 18 | 
            +
                    before(:all) do
         | 
| 19 | 
            +
                      @business = @client.businesses("orpheum-theater")
         | 
| 20 | 
            +
                    end
         | 
| 21 | 
            +
                    subject { @business }
         | 
| 22 | 
            +
                    specify { should_not be_nil }
         | 
| 23 | 
            +
                    specify { should == "Orpheum Theatre" }
         | 
| 24 | 
            +
                  end
         | 
| 25 | 
            +
                end
         | 
| 26 | 
            +
              end
         | 
| 27 | 
            +
            end
         | 
| 28 | 
            +
             | 
    
        data/spec/client/client_spec.rb
    CHANGED
    
    | @@ -5,53 +5,5 @@ describe Yipit::Client do | |
| 5 5 | 
             
                  api_key="XZgnp3v2vyrBr3eR"
         | 
| 6 6 | 
             
                  @client = Yipit::Client.new(api_key)
         | 
| 7 7 | 
             
                end
         | 
| 8 | 
            -
                context "deals" do
         | 
| 9 | 
            -
                  context "search deals" do
         | 
| 10 | 
            -
                    # use_vcr_cassette
         | 
| 11 | 
            -
                    before do
         | 
| 12 | 
            -
                      @deals = @client.deals
         | 
| 13 | 
            -
                    end
         | 
| 14 | 
            -
                    specify { @deals.size.should == 20 }
         | 
| 15 | 
            -
                  end
         | 
| 16 | 
            -
                  context "deal details" do
         | 
| 17 | 
            -
                    before do
         | 
| 18 | 
            -
                      @deals = @client.deals("7238")
         | 
| 19 | 
            -
                    end
         | 
| 20 | 
            -
                    specify { @deals.size.should == 1 }
         | 
| 21 | 
            -
                  end
         | 
| 22 | 
            -
                end
         | 
| 23 | 
            -
                context "sources" do
         | 
| 24 | 
            -
                  context "search sources" do
         | 
| 25 | 
            -
                    # use_vcr_cassette
         | 
| 26 | 
            -
                    before do
         | 
| 27 | 
            -
                      @sources = @client.sources
         | 
| 28 | 
            -
                    end
         | 
| 29 | 
            -
                    specify { @sources.size.should == 20 }
         | 
| 30 | 
            -
                  end
         | 
| 31 | 
            -
                  context "source details" do
         | 
| 32 | 
            -
                    before do
         | 
| 33 | 
            -
                      @sources = @client.sources("groupon")
         | 
| 34 | 
            -
                    end
         | 
| 35 | 
            -
                    specify { @sources.size.should == 1 }
         | 
| 36 | 
            -
                    specify { @sources.first.name.should == "Groupon" }
         | 
| 37 | 
            -
                  end
         | 
| 38 | 
            -
                end
         | 
| 39 | 
            -
                context "businesses" do
         | 
| 40 | 
            -
                  context "search businesses" do
         | 
| 41 | 
            -
                    # use_vcr_cassette
         | 
| 42 | 
            -
                    before do
         | 
| 43 | 
            -
                      @businesses = @client.businesses
         | 
| 44 | 
            -
                    end
         | 
| 45 | 
            -
                    specify { @businesses.size.should > 1 }
         | 
| 46 | 
            -
                  end
         | 
| 47 | 
            -
                  context "business details" do
         | 
| 48 | 
            -
                    before do
         | 
| 49 | 
            -
                      @businesses = @client.businesses(18005)
         | 
| 50 | 
            -
                    end
         | 
| 51 | 
            -
                    specify { @businesses.size.should == 1 }
         | 
| 52 | 
            -
                    specify { @businesses.first.name.should == "Orpheum Theatre" }
         | 
| 53 | 
            -
                  end
         | 
| 54 | 
            -
                end
         | 
| 55 8 | 
             
              end
         | 
| 56 9 | 
             
            end
         | 
| 57 | 
            -
             | 
| @@ -0,0 +1,107 @@ | |
| 1 | 
            +
            require File.expand_path('../../spec_helper', __FILE__)
         | 
| 2 | 
            +
             | 
| 3 | 
            +
            describe Yipit::Client do
         | 
| 4 | 
            +
              context "api" do
         | 
| 5 | 
            +
                before(:all) do
         | 
| 6 | 
            +
                  api_key="XZgnp3v2vyrBr3eR"
         | 
| 7 | 
            +
                  @client = Yipit::Client.new(api_key)
         | 
| 8 | 
            +
                end
         | 
| 9 | 
            +
                context "deals" do
         | 
| 10 | 
            +
                  context "search" do
         | 
| 11 | 
            +
                    context "with no args" do
         | 
| 12 | 
            +
                      use_vcr_cassette
         | 
| 13 | 
            +
                      before(:all) do
         | 
| 14 | 
            +
                        @deals = @client.deals
         | 
| 15 | 
            +
                      end
         | 
| 16 | 
            +
                      subject { @deals }
         | 
| 17 | 
            +
                      it { should_not be_nil }
         | 
| 18 | 
            +
                      it { should be_an(Array) }
         | 
| 19 | 
            +
                      it { should have(20).items }
         | 
| 20 | 
            +
                    end
         | 
| 21 | 
            +
                    context "with Brooklyn, NY lat/long" do
         | 
| 22 | 
            +
                      before(:all) do
         | 
| 23 | 
            +
                        @deals = @client.deals(:lat => "40.7325859", :lon => "-73.9568557")
         | 
| 24 | 
            +
                      end
         | 
| 25 | 
            +
                      subject { @deals }
         | 
| 26 | 
            +
                      it { should_not be_nil }
         | 
| 27 | 
            +
                      subject { @deals.first.division.name }
         | 
| 28 | 
            +
                      it { should eql "New York" }
         | 
| 29 | 
            +
                      subject { @deals.last.division.name }
         | 
| 30 | 
            +
                      it { should eql "New York" }
         | 
| 31 | 
            +
                    end
         | 
| 32 | 
            +
                    # TODO:  Better test.
         | 
| 33 | 
            +
                    context "with Brooklyn, NY lat/long, scoped to a 2 mile radius" do
         | 
| 34 | 
            +
                      before(:all) do
         | 
| 35 | 
            +
                        @deals = @client.deals(:lat => "40.7325859", :lon => "-73.9568557", :radius => 2)
         | 
| 36 | 
            +
                      end
         | 
| 37 | 
            +
                      subject { @deals }
         | 
| 38 | 
            +
                      it { should_not be_nil }
         | 
| 39 | 
            +
                      subject { @deals.first.division.name }
         | 
| 40 | 
            +
                      it { should eql "New York" }
         | 
| 41 | 
            +
                      subject { @deals.last.division.name }
         | 
| 42 | 
            +
                      it { should eql "New York" }
         | 
| 43 | 
            +
                    end
         | 
| 44 | 
            +
                    context "from Groupon" do
         | 
| 45 | 
            +
                      before(:all) do
         | 
| 46 | 
            +
                        @deals = @client.deals(:source => "Groupon")
         | 
| 47 | 
            +
                      end
         | 
| 48 | 
            +
                      subject { @deals }
         | 
| 49 | 
            +
                      it { should_not be_nil }
         | 
| 50 | 
            +
                      context "source name" do
         | 
| 51 | 
            +
                        subject { @deals.first.source.name }
         | 
| 52 | 
            +
                        it { should eql "Groupon" }
         | 
| 53 | 
            +
                        subject { @deals.last.source.name }
         | 
| 54 | 
            +
                        it { should eql "Groupon" }
         | 
| 55 | 
            +
                      end
         | 
| 56 | 
            +
                    end
         | 
| 57 | 
            +
                    context "by phone number" do
         | 
| 58 | 
            +
                      before(:all) do
         | 
| 59 | 
            +
                        @deals = @client.deals(:phone => "858-581-9490")
         | 
| 60 | 
            +
                      end
         | 
| 61 | 
            +
                      subject { @deals }
         | 
| 62 | 
            +
                      it { should_not be_nil }
         | 
| 63 | 
            +
                      subject { @deals.first.business.name.strip }
         | 
| 64 | 
            +
                      it { should eql "Ocean's Pizzeria" }
         | 
| 65 | 
            +
                    end
         | 
| 66 | 
            +
                    context "tagged with 'restaurants'" do
         | 
| 67 | 
            +
                      before(:all) do
         | 
| 68 | 
            +
                        @deals = @client.deals(:tag => "restaurants")
         | 
| 69 | 
            +
                      end
         | 
| 70 | 
            +
                      subject { @deals }
         | 
| 71 | 
            +
                      it { should_not be_nil }
         | 
| 72 | 
            +
                      subject { @deals.first.tags.first.name }
         | 
| 73 | 
            +
                      it { should eql "Restaurants" }
         | 
| 74 | 
            +
                      subject { @deals.last.tags.first.name }
         | 
| 75 | 
            +
                      it { should eql "Restaurants" }
         | 
| 76 | 
            +
                    end
         | 
| 77 | 
            +
                    context "paid deals'" do
         | 
| 78 | 
            +
                      before(:all) do
         | 
| 79 | 
            +
                        @deals = @client.deals(:paid => "true")
         | 
| 80 | 
            +
                        require 'pp'
         | 
| 81 | 
            +
                        puts @deals.inspect
         | 
| 82 | 
            +
                      end
         | 
| 83 | 
            +
                      subject { @deals }
         | 
| 84 | 
            +
                      # This fails because the Yipit API itself is borked.
         | 
| 85 | 
            +
                      it { should_not be_nil }
         | 
| 86 | 
            +
                    end
         | 
| 87 | 
            +
                  end
         | 
| 88 | 
            +
                  context "details" do
         | 
| 89 | 
            +
                    before(:all) do
         | 
| 90 | 
            +
                      @deal = @client.deals(7238)
         | 
| 91 | 
            +
                    end
         | 
| 92 | 
            +
                    subject { @deal }
         | 
| 93 | 
            +
                    it { should_not be_nil }
         | 
| 94 | 
            +
                    it { should be_a(Hashie::Mash) }
         | 
| 95 | 
            +
                    it { should respond_to(:id) }
         | 
| 96 | 
            +
                    it { should respond_to(:title) }
         | 
| 97 | 
            +
                    it { should respond_to(:business) }
         | 
| 98 | 
            +
                    it { should respond_to(:images) }
         | 
| 99 | 
            +
                    it { should respond_to(:business) }
         | 
| 100 | 
            +
                    it { should respond_to(:division) }
         | 
| 101 | 
            +
                    it { should respond_to(:source) }
         | 
| 102 | 
            +
                    it { should respond_to(:tags) }
         | 
| 103 | 
            +
                    # etc...
         | 
| 104 | 
            +
                  end
         | 
| 105 | 
            +
                end
         | 
| 106 | 
            +
              end
         | 
| 107 | 
            +
            end
         | 
| @@ -0,0 +1,44 @@ | |
| 1 | 
            +
            require File.expand_path('../../spec_helper', __FILE__)
         | 
| 2 | 
            +
             | 
| 3 | 
            +
            describe Yipit::Client do
         | 
| 4 | 
            +
              context "api" do
         | 
| 5 | 
            +
                before(:all) do
         | 
| 6 | 
            +
                  api_key="XZgnp3v2vyrBr3eR"
         | 
| 7 | 
            +
                  @client = Yipit::Client.new(api_key)
         | 
| 8 | 
            +
                end
         | 
| 9 | 
            +
                context "divisions" do
         | 
| 10 | 
            +
                  context "search divisions" do
         | 
| 11 | 
            +
                    # use_vcr_cassette
         | 
| 12 | 
            +
                    context "all" do
         | 
| 13 | 
            +
                      before(:all) do
         | 
| 14 | 
            +
                        @divisions = @client.divisions
         | 
| 15 | 
            +
                      end
         | 
| 16 | 
            +
                      context "the results" do
         | 
| 17 | 
            +
                        subject { @divisions }
         | 
| 18 | 
            +
                        specify { should_not be_nil }
         | 
| 19 | 
            +
                        specify { should have_at_least(1).items }
         | 
| 20 | 
            +
                      end
         | 
| 21 | 
            +
                    end
         | 
| 22 | 
            +
                    context "by source" do
         | 
| 23 | 
            +
                      before(:all) do
         | 
| 24 | 
            +
                        @divisions = @client.divisions(:source => "groupon")
         | 
| 25 | 
            +
                        puts @divisions.size
         | 
| 26 | 
            +
                      end
         | 
| 27 | 
            +
                      subject { @divisions }
         | 
| 28 | 
            +
                      context "the results" do
         | 
| 29 | 
            +
                        specify { should_not be_nil }
         | 
| 30 | 
            +
                        specify { should have_at_least(20).items }
         | 
| 31 | 
            +
                      end
         | 
| 32 | 
            +
                    end
         | 
| 33 | 
            +
                  end
         | 
| 34 | 
            +
                  context "division details" do
         | 
| 35 | 
            +
                    before(:all) do
         | 
| 36 | 
            +
                      @division = @client.divisions("new-york")
         | 
| 37 | 
            +
                    end
         | 
| 38 | 
            +
                    context "name" do
         | 
| 39 | 
            +
                      specify { @division.name.should == "New York" }
         | 
| 40 | 
            +
                    end
         | 
| 41 | 
            +
                  end
         | 
| 42 | 
            +
                end
         | 
| 43 | 
            +
              end
         | 
| 44 | 
            +
            end
         | 
| @@ -0,0 +1,44 @@ | |
| 1 | 
            +
            require File.expand_path('../../spec_helper', __FILE__)
         | 
| 2 | 
            +
             | 
| 3 | 
            +
            describe Yipit::Client do
         | 
| 4 | 
            +
              context "api" do
         | 
| 5 | 
            +
                before(:all) do
         | 
| 6 | 
            +
                  api_key="XZgnp3v2vyrBr3eR"
         | 
| 7 | 
            +
                  @client = Yipit::Client.new(api_key)
         | 
| 8 | 
            +
                end
         | 
| 9 | 
            +
                context "sources" do
         | 
| 10 | 
            +
                  context "search sources" do
         | 
| 11 | 
            +
                    # use_vcr_cassette
         | 
| 12 | 
            +
                    context "all" do
         | 
| 13 | 
            +
                      before(:all) do
         | 
| 14 | 
            +
                        @sources = @client.sources
         | 
| 15 | 
            +
                      end
         | 
| 16 | 
            +
                      context "the results" do
         | 
| 17 | 
            +
                        subject { @sources }
         | 
| 18 | 
            +
                        specify { should_not be_nil }
         | 
| 19 | 
            +
                        specify { should have_at_least(1).items }
         | 
| 20 | 
            +
                      end
         | 
| 21 | 
            +
                    end
         | 
| 22 | 
            +
                    context "by division" do
         | 
| 23 | 
            +
                      before(:all) do
         | 
| 24 | 
            +
                        @sources = @client.sources(:divisions => "new-york")
         | 
| 25 | 
            +
                      end
         | 
| 26 | 
            +
                      subject { @sources }
         | 
| 27 | 
            +
                      context "the results" do
         | 
| 28 | 
            +
                        specify { should_not be_nil }
         | 
| 29 | 
            +
                        specify { should have_at_least(1).items }
         | 
| 30 | 
            +
                      end
         | 
| 31 | 
            +
                    end
         | 
| 32 | 
            +
                  end
         | 
| 33 | 
            +
                  context "source details" do
         | 
| 34 | 
            +
                    before(:all) do
         | 
| 35 | 
            +
                      @source = @client.sources("groupon")
         | 
| 36 | 
            +
                    end
         | 
| 37 | 
            +
                    context "name" do
         | 
| 38 | 
            +
                      specify { @source.name.should == "Groupon" }
         | 
| 39 | 
            +
                    end
         | 
| 40 | 
            +
                  end
         | 
| 41 | 
            +
                end
         | 
| 42 | 
            +
              end
         | 
| 43 | 
            +
            end
         | 
| 44 | 
            +
             | 
    
        data/spec/spec_helper.rb
    CHANGED
    
    
| @@ -0,0 +1,36 @@ | |
| 1 | 
            +
            require File.expand_path('../../spec_helper', __FILE__)
         | 
| 2 | 
            +
             | 
| 3 | 
            +
            describe Yipit::Client do
         | 
| 4 | 
            +
              context "api" do
         | 
| 5 | 
            +
                before(:all) do
         | 
| 6 | 
            +
                  api_key="XZgnp3v2vyrBr3eR"
         | 
| 7 | 
            +
                  @client = Yipit::Client.new(api_key)
         | 
| 8 | 
            +
                end
         | 
| 9 | 
            +
                context "tags" do
         | 
| 10 | 
            +
                  context "search tags" do
         | 
| 11 | 
            +
                    # use_vcr_cassette
         | 
| 12 | 
            +
                    context "all" do
         | 
| 13 | 
            +
                      before(:all) do
         | 
| 14 | 
            +
                        @tags = @client.tags
         | 
| 15 | 
            +
                      end
         | 
| 16 | 
            +
                      context "the results" do
         | 
| 17 | 
            +
                        subject { @tags }
         | 
| 18 | 
            +
                        specify { should_not be_nil }
         | 
| 19 | 
            +
                        specify { should have_at_least(1).items }
         | 
| 20 | 
            +
                      end
         | 
| 21 | 
            +
                    end
         | 
| 22 | 
            +
                  end
         | 
| 23 | 
            +
                  context "when passing params to tags" do
         | 
| 24 | 
            +
                    before(:all) do
         | 
| 25 | 
            +
                      @tag = @client.tags("restaurants")
         | 
| 26 | 
            +
                    end
         | 
| 27 | 
            +
                    context "the tag" do
         | 
| 28 | 
            +
                      subject { @tag }
         | 
| 29 | 
            +
                      specify { should be_nil }
         | 
| 30 | 
            +
                    end
         | 
| 31 | 
            +
                  end
         | 
| 32 | 
            +
                end
         | 
| 33 | 
            +
              end
         | 
| 34 | 
            +
            end
         | 
| 35 | 
            +
             | 
| 36 | 
            +
             | 
    
        data/yipit.gemspec
    CHANGED
    
    | @@ -8,7 +8,7 @@ Gem::Specification.new do |s| | |
| 8 8 | 
             
              s.platform    = Gem::Platform::RUBY
         | 
| 9 9 | 
             
              s.authors     = ["Josh Deeden"]
         | 
| 10 10 | 
             
              s.email       = ["jdeeden@gmail.com"]
         | 
| 11 | 
            -
              s.homepage    = "http://github.com/ | 
| 11 | 
            +
              s.homepage    = "http://github.com/gangster/yipit"
         | 
| 12 12 | 
             
              s.summary     = %q{A simple wrapper for the Yipit API}
         | 
| 13 13 | 
             
              s.description = %q{A simple wrapper for the Yipit API}
         | 
| 14 14 |  | 
    
        metadata
    CHANGED
    
    | @@ -2,7 +2,7 @@ | |
| 2 2 | 
             
            name: yipit
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version 
         | 
| 4 4 | 
             
              prerelease: 
         | 
| 5 | 
            -
              version: 0.0. | 
| 5 | 
            +
              version: 0.0.2
         | 
| 6 6 | 
             
            platform: ruby
         | 
| 7 7 | 
             
            authors: 
         | 
| 8 8 | 
             
            - Josh Deeden
         | 
| @@ -10,7 +10,7 @@ autorequire: | |
| 10 10 | 
             
            bindir: bin
         | 
| 11 11 | 
             
            cert_chain: []
         | 
| 12 12 |  | 
| 13 | 
            -
            date: 2011-03- | 
| 13 | 
            +
            date: 2011-03-15 00:00:00 -04:00
         | 
| 14 14 | 
             
            default_executable: 
         | 
| 15 15 | 
             
            dependencies: 
         | 
| 16 16 | 
             
            - !ruby/object:Gem::Dependency 
         | 
| @@ -163,12 +163,16 @@ files: | |
| 163 163 | 
             
            - lib/core_ext/array.rb
         | 
| 164 164 | 
             
            - lib/yipit.rb
         | 
| 165 165 | 
             
            - lib/yipit/version.rb
         | 
| 166 | 
            -
            - spec/ | 
| 166 | 
            +
            - spec/businesses/businesses_spec.rb
         | 
| 167 167 | 
             
            - spec/client/client_spec.rb
         | 
| 168 | 
            +
            - spec/deals/deals_spec.rb
         | 
| 169 | 
            +
            - spec/divisions/divisions_spec.rb
         | 
| 170 | 
            +
            - spec/sources/sources_spec.rb
         | 
| 168 171 | 
             
            - spec/spec_helper.rb
         | 
| 172 | 
            +
            - spec/tags/tags_spec.rb
         | 
| 169 173 | 
             
            - yipit.gemspec
         | 
| 170 174 | 
             
            has_rdoc: true
         | 
| 171 | 
            -
            homepage: http://github.com/ | 
| 175 | 
            +
            homepage: http://github.com/gangster/yipit
         | 
| 172 176 | 
             
            licenses: []
         | 
| 173 177 |  | 
| 174 178 | 
             
            post_install_message: 
         | 
| @@ -196,6 +200,10 @@ signing_key: | |
| 196 200 | 
             
            specification_version: 3
         | 
| 197 201 | 
             
            summary: A simple wrapper for the Yipit API
         | 
| 198 202 | 
             
            test_files: 
         | 
| 199 | 
            -
            - spec/ | 
| 203 | 
            +
            - spec/businesses/businesses_spec.rb
         | 
| 200 204 | 
             
            - spec/client/client_spec.rb
         | 
| 205 | 
            +
            - spec/deals/deals_spec.rb
         | 
| 206 | 
            +
            - spec/divisions/divisions_spec.rb
         | 
| 207 | 
            +
            - spec/sources/sources_spec.rb
         | 
| 201 208 | 
             
            - spec/spec_helper.rb
         | 
| 209 | 
            +
            - spec/tags/tags_spec.rb
         | 
| @@ -1,82 +0,0 @@ | |
| 1 | 
            -
            --- 
         | 
| 2 | 
            -
            - !ruby/struct:VCR::HTTPInteraction 
         | 
| 3 | 
            -
              request: !ruby/struct:VCR::Request 
         | 
| 4 | 
            -
                method: :get
         | 
| 5 | 
            -
                uri: http://api.yipit.com:80/deals/?key=XZgnp3v2vyrBr3eR
         | 
| 6 | 
            -
                body: 
         | 
| 7 | 
            -
                headers: 
         | 
| 8 | 
            -
              response: !ruby/struct:VCR::Response 
         | 
| 9 | 
            -
                status: !ruby/struct:VCR::ResponseStatus 
         | 
| 10 | 
            -
                  code: 404
         | 
| 11 | 
            -
                  message: NOT FOUND
         | 
| 12 | 
            -
                headers: 
         | 
| 13 | 
            -
                  server: 
         | 
| 14 | 
            -
                  - nginx/0.8.54
         | 
| 15 | 
            -
                  date: 
         | 
| 16 | 
            -
                  - Mon, 14 Mar 2011 20:57:15 GMT
         | 
| 17 | 
            -
                  content-type: 
         | 
| 18 | 
            -
                  - text/html; charset=utf-8
         | 
| 19 | 
            -
                  transfer-encoding: 
         | 
| 20 | 
            -
                  - chunked
         | 
| 21 | 
            -
                  connection: 
         | 
| 22 | 
            -
                  - keep-alive
         | 
| 23 | 
            -
                  vary: 
         | 
| 24 | 
            -
                  - Cookie
         | 
| 25 | 
            -
                  set-cookie: 
         | 
| 26 | 
            -
                  - session_id=ea15f233c3e6938bae1e82c96caae9be; Domain=.yipit.com; expires=Sat, 10-Sep-2011 20:57:15 GMT; Max-Age=15552000; Path=/
         | 
| 27 | 
            -
                  content-encoding: 
         | 
| 28 | 
            -
                  - gzip
         | 
| 29 | 
            -
                body: "\n\
         | 
| 30 | 
            -
                  <!DOCTYPE html>\n\
         | 
| 31 | 
            -
                  <html>\n\
         | 
| 32 | 
            -
                  <head>\n    <script type=\"text/javascript\">var _sf_startpt=(new Date()).getTime();</script>\n    <link rel=\"stylesheet\" type=\"text/css\" href=\"http://d22nv2k05ynu7x.cloudfront.net/css/yipit.min.2f59ba5d99a86487.css\" media=\"screen\">\n      \n    <!--[if lt IE 8]>\n        <link rel=\"stylesheet\" href=\"http://d22nv2k05ynu7x.cloudfront.net/css/ie.css\" type=\"text/css\" media=\"screen\">\n    <![endif]-->\n    <link rel=\"shortcut icon\" href=\"http://d22nv2k05ynu7x.cloudfront.net/img/favicon.ico\" type=\"image/x-icon\" />\n    <link rel=\"apple-touch-icon\" href=\"http://d22nv2k05ynu7x.cloudfront.net/img/iphone.png\"/>\n    <script type=\"text/javascript\" src=\"http://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js\"></script>\n    <script>!window.jQuery && document.write(unescape('%3Cscript src=\"http://d22nv2k05ynu7x.cloudfront.net/js/jquery.min.js\"%3E%3C/script%3E'))</script>\n    <script type=\"text/javascript\" src=\"http://d22nv2k05ynu7x.cloudfront.net/js/yipit.min.c12f4436be3b328d.js\"></script>\n\n    <title>Page Not Found | Yipit</title>\n    <meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />\n    <meta name=\"keywords\" content=\" Daily, Deals, Groupon, LivingSocial, Tippr\" />\n    <meta name=\"description\" content=\"Rur-roh.  We didn't find this page.\" />\n    <meta content=\"noarchive,noindex,follow\" name=\"robots\"/>\n    \n\n    \n    \n    <script type=\"text/javascript\">\n        var _gaq = _gaq || [];\n        _gaq.push(['_setAccount', 'UA-1967270-3']);\n        _gaq.push(['_trackPageview']);\n\n        (function() {\n         var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;\n         ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';\n         var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);\n        })();\n    </script>\n    \n    \n    \n\
         | 
| 33 | 
            -
                  <script type=\"text/javascript\">\n\n\
         | 
| 34 | 
            -
                  function get_screen_height() {\n    var myHeight = 0;\n    if( typeof( window.innerWidth ) == 'number' ) {\n        //Non-IE\n        myHeight = window.innerHeight;\n    } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {\n        //IE 6+ in 'standards compliant mode'\n        myHeight = document.documentElement.clientHeight;\n    }\n    return myHeight;\n\
         | 
| 35 | 
            -
                  }\n\n\
         | 
| 36 | 
            -
                  function fix_height() { \n    var screen_height = get_screen_height();\n    var wrapper_height = $(\"#wrapper\").height();\n    var footer_height = $(\"#footer\").height();\n    new_height = (footer_height + wrapper_height < screen_height) ? screen_height - footer_height : wrapper_height;\n    $(\"#wrapper\").css('min-height',new_height);\n\
         | 
| 37 | 
            -
                  }\n\n\
         | 
| 38 | 
            -
                  jQuery(document).ready(fix_height);\n\n\
         | 
| 39 | 
            -
                  window.onresize = fix_height;\n\n\
         | 
| 40 | 
            -
                  </script>\n\n\
         | 
| 41 | 
            -
                  </head>\n\
         | 
| 42 | 
            -
                  <body id=\"Something has gone horribly, horribly wrong...\" onload=\"\">\n    \n\
         | 
| 43 | 
            -
                  <div id=\"wrapper\">\n    <div class=\"wrap\">\n        <div id=\"header\" class=\"\">\n            \n            <div id=\"logo\"><a href=\"/\">Yipit</a></div>\n            \n            \n                <div class=\"location\"><a href=\"/ajax/city_list/\" class=\"fancyboxForm\">Looking for your city?</a></div>\n            \n            <div class=\"login\">\n                <a href=\"/\" class=\"formbutton buttonblue\">Sign Up</a>\n                <a href=\"/ajax/login_box/\" id=\"login_box_launch\">Login</a></div>\n            \n            <div class=\"clear\"></div>\n            \n            \n        </div><!-- end #header -->\n        \n    \n    \n    \n    <div id=\"content\">\n        <div class=\"box landing_page \">\n            <div class=\"breadcrumb\">\n                \n            </div><!-- end .breadrumb -->\n            \n\
         | 
| 44 | 
            -
                  <h2>Whooops!</h2>\n\
         | 
| 45 | 
            -
                  <img src=\"http://d22nv2k05ynu7x.cloudfront.net/img/404.jpg\">\n\
         | 
| 46 | 
            -
                  <h2>This page doesn't exist.</h2>\n\
         | 
| 47 | 
            -
                  <hr />\n\n            <div class=\"deal\">\n                \n            </div><!-- end .deal -->\n            <div class=\"sidebar\">\n                \n            </div><!-- end .sidebar -->\n            <div class=\"clear\"></div>\n        </div><!-- end box landing_page -->\n    </div><!-- end .content -->\n    <div class=\"clear\"></div> \n\n\n    </div><!-- end .wrap -->\n\
         | 
| 48 | 
            -
                  </div><!-- end #wrapper -->\n\
         | 
| 49 | 
            -
                  <div class='clear'></div>\n\
         | 
| 50 | 
            -
                  <div id=\"footer\">\n    <div class=\"wrap\">\n        \n        <div id=\"footer-menu\">\n            <h5>Cities</h5>\n            <ul>\n                \n                <li><a href=\"/atlanta/\">Atlanta</a></li>\n                \n                <li><a href=\"/austin/\">Austin</a></li>\n                \n                <li><a href=\"/baltimore/\">Baltimore</a></li>\n                \n                <li><a href=\"/boston/\">Boston</a></li>\n                \n                <li><a href=\"/brooklyn/\">Brooklyn </a></li>\n                \n                <li><a href=\"/charlotte/\">Charlotte</a></li>\n                \n                <li><a href=\"/chicago/\">Chicago</a></li>\n                \n                <li><a href=\"/cincinnati/\">Cincinnati</a></li>\n                \n                <li><a href=\"/cleveland/\">Cleveland</a></li>\n                \n                <li><a href=\"/columbus/\">Columbus</a></li>\n                \n                <li><a href=\"/dallas/\">Dallas</a></li>\n                \n                <li><a href=\"/denver/\">Denver</a></li>\n                \n                <li><a href=\"/houston/\">Houston</a></li>\n                \n                <li><a href=\"/indianapolis/\">Indianapolis</a></li>\n                \n                <li><a href=\"/las-vegas/\">Las Vegas</a></li>\n                \n                <li><a href=\"/london/\">London</a></li>\n                \n                <li><a href=\"/los-angeles/\">Los Angeles</a></li>\n                \n                <li><a href=\"/miami/\">Miami</a></li>\n                \n                <li><a href=\"/minneapolis/\">Minneapolis</a></li>\n                \n                <li><a href=\"/montreal/\">Montreal </a></li>\n                \n                <li><a href=\"/new-york/\">New York</a></li>\n                \n                <li><a href=\"/northern-va/\">Northern VA</a></li>\n                \n                <li><a href=\"/oakland/\">Oakland</a></li>\n                \n                <li><a href=\"/orange-county/\">Orange County</a></li>\n                \n                <li><a href=\"/philadelphia/\">Philadelphia</a></li>\n                \n                <li><a href=\"/phoenix/\">Phoenix</a></li>\n                \n                <li><a href=\"/portland/\">Portland</a></li>\n                \n                <li><a href=\"/raleigh-durham/\">Raleigh-Durham</a></li>\n                \n                <li><a href=\"/san-diego/\">San Diego</a></li>\n                \n                <li><a href=\"/san-francisco/\">San Francisco</a></li>\n                \n                <li><a href=\"/san-jose/\">San Jose</a></li>\n                \n                <li><a href=\"/seattle/\">Seattle</a></li>\n                \n                <li><a href=\"/st-louis/\">St. Louis</a></li>\n                \n                <li><a href=\"/toronto/\">Toronto</a></li>\n                \n                <li><a href=\"/vancouver/\">Vancouver</a></li>\n                \n                <li><a href=\"/washington-dc/\">Washington DC</a></li>\n                \n            </ul>\n\n            <h5>Deals</h5>\n            <ul>\n                \n                    <li><a href=\"/atlanta/deal_directory\">Atlanta</a></li>\n                \n                    <li><a href=\"/austin/deal_directory\">Austin</a></li>\n                \n                    <li><a href=\"/baltimore/deal_directory\">Baltimore</a></li>\n                \n                    <li><a href=\"/boston/deal_directory\">Boston</a></li>\n                \n                    \n                \n                    \n                \n                    <li><a href=\"/chicago/deal_directory\">Chicago</a></li>\n                \n                    \n                \n                    \n                \n                    \n                \n                    <li><a href=\"/dallas/deal_directory\">Dallas</a></li>\n                \n                    <li><a href=\"/denver/deal_directory\">Denver</a></li>\n                \n                    <li><a href=\"/houston/deal_directory\">Houston</a></li>\n                \n                    \n                \n                    <li><a href=\"/las-vegas/deal_directory\">Las Vegas</a></li>\n                \n                    \n                \n                    <li><a href=\"/los-angeles/deal_directory\">Los Angeles</a></li>\n                \n                    <li><a href=\"/miami/deal_directory\">Miami</a></li>\n                \n                    <li><a href=\"/minneapolis/deal_directory\">Minneapolis</a></li>\n                \n                    <li><a href=\"/montreal/deal_directory\">Montreal </a></li>\n                \n                    <li><a href=\"/new-york/deal_directory\">New York</a></li>\n                \n                    \n                \n                    \n                \n                    \n                \n                    <li><a href=\"/philadelphia/deal_directory\">Philadelphia</a></li>\n                \n                    <li><a href=\"/phoenix/deal_directory\">Phoenix</a></li>\n                \n                    <li><a href=\"/portland/deal_directory\">Portland</a></li>\n                \n                    \n                \n                    <li><a href=\"/san-diego/deal_directory\">San Diego</a></li>\n                \n                    <li><a href=\"/san-francisco/deal_directory\">San Francisco</a></li>\n                \n                    \n                \n                    <li><a href=\"/seattle/deal_directory\">Seattle</a></li>\n                \n                    <li><a href=\"/st-louis/deal_directory\">St. Louis</a></li>\n                \n                    <li><a href=\"/toronto/deal_directory\">Toronto</a></li>\n                \n                    <li><a href=\"/vancouver/deal_directory\">Vancouver</a></li>\n                \n                    <li><a href=\"/washington-dc/deal_directory\">Washington DC</a></li>\n                \n                \n            </ul>\n        </div><!-- end #footer-menu -->\n\n        <div id=\"footer-sitemap\">\n            <ul>\n                <li ><a href=\"/\">Home</a></li>\n                <li ><a href=\"/about/\">About</a></li>\n                <li ><a href=\"/nation/\">Nation</a></li>\n                <li><a href=\"http://blog.yipit.com\">Blog</a></li>\n                <li ><a href=\"/about/api/\">API</a></li>\n                <li ><a href=\"/data/\">Yipit Data</a></li>\n                <li ><a href=\"/about/businesses/\">Businesses</a></li>\n            </ul>\n            <ul>\n                <li ><a href=\"/about/daily_deal_sites/\">Daily Deal Sites</a></li>\n                <li ><a href=\"/about/jobs/\">Jobs</a></li>\n                <li ><a href=\"/about/press/\">Press</a></li>\n                <li ><a href=\"/about/terms/\">Terms</a></li>\n                <li ><a href=\"/about/privacy/\">Privacy</a></li>\n                <li ><a href=\"/about/faq/\">FAQ</a></li>\n                \n        </ul>\n        <p>Copyright © 2011 Yipit</p>\n    </div><!-- end #footer-sitemap -->\n    <div class=\"clear\"></div>\n    \n    </div><!-- end .wrap -->\n\
         | 
| 51 | 
            -
                  </div><!-- end #footer -->\n\n    \n    \n    <!-- Start Chartbeat-->\n    <script type=\"text/javascript\">\n        var _sf_async_config={uid:8463,domain:\"yipit.com\"};\n        (function(){\n          function loadChartbeat() {\n            window._sf_endpt=(new Date()).getTime();\n            var e = document.createElement('script');\n            e.setAttribute('language', 'javascript');\n            e.setAttribute('type', 'text/javascript');\n            e.setAttribute('src',\n               ((\"https:\" == document.location.protocol) ? \"https://s3.amazonaws.com/\" : \"http://\") +\n               \"static.chartbeat.com/js/chartbeat.js\");\n            document.body.appendChild(e);\n          }\n          var oldonload = window.onload;\n          window.onload = (typeof window.onload != 'function') ?\n             loadChartbeat : function() { oldonload(); loadChartbeat(); };\n        })();\n    </script>\n    <!-- End Chartbeat-->\n    <!-- Start Quantcast tag -->\n    <script type=\"text/javascript\">\n        _qoptions={\n        qacct:\"p-3dF18ONyTUxBQ\"\n        };\n    </script>\n    <script type=\"text/javascript\" src=\"http://edge.quantserve.com/quant.js\"></script>\n    <noscript>\n    <img src=\"http://pixel.quantserve.com/pixel/p-3dF18ONyTUxBQ.gif\" style=\"display: none;\" border=\"0\" height=\"1\" width=\"1\" alt=\"Quantcast\"/>\n    </noscript>\n    <!-- End Quantcast tag -->\n    \n    \n\
         | 
| 52 | 
            -
                  </body>\n\
         | 
| 53 | 
            -
                  </html>\n"
         | 
| 54 | 
            -
                http_version: "1.1"
         | 
| 55 | 
            -
            - !ruby/struct:VCR::HTTPInteraction 
         | 
| 56 | 
            -
              request: !ruby/struct:VCR::Request 
         | 
| 57 | 
            -
                method: :get
         | 
| 58 | 
            -
                uri: http://api.yipit.com:80/v1/deals/?key=XZgnp3v2vyrBr3eR
         | 
| 59 | 
            -
                body: 
         | 
| 60 | 
            -
                headers: 
         | 
| 61 | 
            -
              response: !ruby/struct:VCR::Response 
         | 
| 62 | 
            -
                status: !ruby/struct:VCR::ResponseStatus 
         | 
| 63 | 
            -
                  code: 200
         | 
| 64 | 
            -
                  message: OK
         | 
| 65 | 
            -
                headers: 
         | 
| 66 | 
            -
                  server: 
         | 
| 67 | 
            -
                  - nginx/0.8.54
         | 
| 68 | 
            -
                  date: 
         | 
| 69 | 
            -
                  - Mon, 14 Mar 2011 21:01:34 GMT
         | 
| 70 | 
            -
                  content-type: 
         | 
| 71 | 
            -
                  - application/json; charset=utf-8
         | 
| 72 | 
            -
                  transfer-encoding: 
         | 
| 73 | 
            -
                  - chunked
         | 
| 74 | 
            -
                  connection: 
         | 
| 75 | 
            -
                  - keep-alive
         | 
| 76 | 
            -
                  vary: 
         | 
| 77 | 
            -
                  - Authorization, Cookie
         | 
| 78 | 
            -
                  set-cookie: 
         | 
| 79 | 
            -
                  - session_id=95e28c298958507657e1723c72a8f15a; Domain=.yipit.com; expires=Sat, 10-Sep-2011 21:01:34 GMT; Max-Age=15552000; Path=/
         | 
| 80 | 
            -
                body: "{\n    \"meta\": {\n        \"code\": 200\n    }, \n    \"response\": {\n        \"deals\": [\n            {\n                \"id\": 54041, \n                \"date_added\": \"2011-03-14 13:46:19\", \n                \"end_date\": \"2011-03-16 05:00:00\", \n                \"active\": 1, \n                \"discount\": {\n                    \"raw\": 87, \n                    \"formatted\": \"87%\"\n                }, \n                \"price\": {\n                    \"raw\": \"89.00\", \n                    \"formatted\": \"$89\"\n                }, \n                \"value\": {\n                    \"raw\": \"700.00\", \n                    \"formatted\": \"$700\"\n                }, \n                \"purchased\": 5, \n                \"left\": null, \n                \"title\": \"$89 for 8 IPL Treatments at R\xC3\xAAve Soleil\", \n                \"yipit_title\": \"87% off 8 IPL Treatments\", \n                \"url\": \"http://yipit.com/aff/click/?deal=asReJyv8&key=WYjGuDFf\", \n                \"yipit_url\": \"http://yipit.com/montreal/team-buy/89-for-8-ipl-treatments-at-reve-soleil/\", \n                \"mobile_url\": \"http://m.yipit.com/montreal/team-buy/89-for-8-ipl-treatments-at-reve-soleil/\", \n                \"images\": {\n                    \"image_big\": \"http://d22nv2k05ynu7x.cloudfront.net/deal_images/deal/89-for-8-ipl-treatments-at-reve-soleil-1300110379_display_image.jpg\", \n                    \"image_small\": \"http://d22nv2k05ynu7x.cloudfront.net/deal_images/deal/89-for-8-ipl-treatments-at-reve-soleil-1300110379_small_image.jpg\"\n                }, \n                \"division\": {\n                    \"slug\": \"montreal\", \n                    \"name\": \"Montreal \", \n                    \"active\": 1, \n                    \"time_zone_diff\": -5, \n                    \"lat\": 45.299999999999997, \n                    \"lon\": -73.349999999999994, \n                    \"url\": \"http://yipit.com/montreal/\"\n                }, \n                \"tags\": [\n                    {\n                        \"name\": \"Dermatology\", \n                        \"slug\": \"dermatology\", \n                        \"url\": \"http://yipit.com/montreal/deals/dermatology/\"\n                    }\n                ], \n                \"business\": {\n                    \"id\": 34372, \n                    \"name\": \"R\xC3\xAAve Soleil\", \n                    \"url\": \"\", \n                    \"locations\": [\n                        {\n                            \"id\": 44448, \n                            \"address\": \"4699 Boulevard Lavoisier\", \n                            \"locality\": \"Saint-L\xC3\xA9onard\", \n                            \"phone\": \"514-325-3459\", \n                            \"lat\": 45.584130100000003, \n                            \"lon\": -73.611951700000006\n                        }\n                    ]\n                }, \n                \"source\": {\n                    \"name\": \"TeamBuy\", \n                    \"slug\": \"team-buy\", \n                    \"paid\": 0, \n                    \"url\": \"http://yipit.com/montreal/team-buy\"\n                }\n            }, \n            {\n                \"id\": 54040, \n                \"date_added\": \"2011-03-14 13:44:32\", \n                \"end_date\": \"2011-03-15 04:00:00\", \n                \"active\": 1, \n                \"discount\": {\n                    \"raw\": 80, \n                    \"formatted\": \"80%\"\n                }, \n                \"price\": {\n                    \"raw\": \"12.00\", \n                    \"formatted\": \"$12\"\n                }, \n                \"value\": {\n                    \"raw\": \"60.00\", \n                    \"formatted\": \"$60\"\n                }, \n                \"purchased\": null, \n                \"left\": null, \n                \"title\": \"$12 for Unlimited Pool + 1 Beverage and Meal at Sharx Pool Bar ($60 Value)\", \n                \"yipit_title\": \"80% off All You Can Play Pool and More\", \n                \"url\": \"http://yipit.com/aff/click/?deal=UqbwCAwk&key=WYjGuDFf\", \n                \"yipit_url\": \"http://yipit.com/montreal/steal-the-deal/12-for-unlimited-pool-1-beverage-and-meal-at-sharx-pool-bar-60-value-1/\", \n                \"mobile_url\": \"http://m.yipit.com/montreal/steal-the-deal/12-for-unlimited-pool-1-beverage-and-meal-at-sharx-pool-bar-60-value-1/\", \n                \"images\": {\n                    \"image_big\": \"http://d22nv2k05ynu7x.cloudfront.net/deal_images/deal/12-for-unlimited-pool-1-beverage-and-meal-at-sharx-pool-bar-60-value-1-1300110272_display_image.jpg\", \n                    \"image_small\": \"http://d22nv2k05ynu7x.cloudfront.net/deal_images/deal/12-for-unlimited-pool-1-beverage-and-meal-at-sharx-pool-bar-60-value-1-1300110272_small_image.jpg\"\n                }, \n                \"division\": {\n                    \"slug\": \"montreal\", \n                    \"name\": \"Montreal \", \n                    \"active\": 1, \n                    \"time_zone_diff\": -5, \n                    \"lat\": 45.299999999999997, \n                    \"lon\": -73.349999999999994, \n                    \"url\": \"http://yipit.com/montreal/\"\n                }, \n                \"tags\": [\n                    {\n                        \"name\": \"Bar & Club\", \n                        \"slug\": \"bar-club\", \n                        \"url\": \"http://yipit.com/montreal/deals/bar-club/\"\n                    }\n                ], \n                \"business\": {\n                    \"id\": 34371, \n                    \"name\": \"Sharx Pool Bar\", \n                    \"url\": \"\", \n                    \"locations\": []\n                }, \n                \"source\": {\n                    \"name\": \"Steal the Deal\", \n                    \"slug\": \"steal-the-deal\", \n                    \"paid\": 0, \n                    \"url\": \"http://yipit.com/montreal/steal-the-deal\"\n                }\n            }, \n            {\n                \"id\": 54039, \n                \"date_added\": \"2011-03-14 13:42:31\", \n                \"end_date\": \"2011-03-15 04:00:00\", \n                \"active\": 1, \n                \"discount\": {\n                    \"raw\": 51, \n                    \"formatted\": \"51%\"\n                }, \n                \"price\": {\n                    \"raw\": \"39.00\", \n                    \"formatted\": \"$39\"\n                }, \n                \"value\": {\n                    \"raw\": \"80.00\", \n                    \"formatted\": \"$80\"\n                }, \n                \"purchased\": 38, \n                \"left\": null, \n                \"title\": \"$39 for a 1 Hour Therapeutic Massage and More at Spa Bora Bora\", \n                \"yipit_title\": \"51% off a Therapeutic Massage and More\", \n                \"url\": \"http://yipit.com/aff/click/?deal=7AVAySvU&key=WYjGuDFf\", \n                \"yipit_url\": \"http://yipit.com/montreal/red-flag-deals/39-for-a-1-hour-therapeutic-massage-and-more-at-spa-bora-bora/\", \n                \"mobile_url\": \"http://m.yipit.com/montreal/red-flag-deals/39-for-a-1-hour-therapeutic-massage-and-more-at-spa-bora-bora/\", \n                \"images\": {\n                    \"image_big\": \"http://d22nv2k05ynu7x.cloudfront.net/deal_images/deal/39-for-a-1-hour-therapeutic-massage-and-more-at-spa-bora-bora-1300110150_display_image.jpg\", \n                    \"image_small\": \"http://d22nv2k05ynu7x.cloudfront.net/deal_images/deal/39-for-a-1-hour-therapeutic-massage-and-more-at-spa-bora-bora-1300110150_small_image.jpg\"\n                }, \n                \"division\": {\n                    \"slug\": \"montreal\", \n                    \"name\": \"Montreal \", \n                    \"active\": 1, \n                    \"time_zone_diff\": -5, \n                    \"lat\": 45.299999999999997, \n                    \"lon\": -73.349999999999994, \n                    \"url\": \"http://yipit.com/montreal/\"\n                }, \n                \"tags\": [\n                    {\n                        \"name\": \"Massage\", \n                        \"slug\": \"massage\", \n                        \"url\": \"http://yipit.com/montreal/deals/massage/\"\n                    }, \n                    {\n                        \"name\": \"Spa\", \n                        \"slug\": \"spa\", \n                        \"url\": \"http://yipit.com/montreal/deals/spa/\"\n                    }\n                ], \n                \"business\": {\n                    \"id\": 34370, \n                    \"name\": \"Spa Bora Bora\", \n                    \"url\": \"\", \n                    \"locations\": [\n                        {\n                            \"id\": 44447, \n                            \"address\": \"4800 Rue Ren\xC3\xA9 \xC3\x89mard\", \n                            \"locality\": \"Pierrefonds\", \n                            \"phone\": \"514-620-9620\", \n                            \"lat\": 45.491167599999997, \n                            \"lon\": -73.848158499999997\n                        }\n                    ]\n                }, \n                \"source\": {\n                    \"name\": \"Red Flag Deals\", \n                    \"slug\": \"red-flag-deals\", \n                    \"paid\": 0, \n                    \"url\": \"http://yipit.com/montreal/red-flag-deals\"\n                }\n            }, \n            {\n                \"id\": 54038, \n                \"date_added\": \"2011-03-14 12:56:41\", \n                \"end_date\": \"2011-03-15 09:00:00\", \n                \"active\": 1, \n                \"discount\": {\n                    \"raw\": 91, \n                    \"formatted\": \"91%\"\n                }, \n                \"price\": {\n                    \"raw\": \"44.00\", \n                    \"formatted\": \"$44\"\n                }, \n                \"value\": {\n                    \"raw\": \"495.00\", \n                    \"formatted\": \"$495\"\n                }, \n                \"purchased\": 51, \n                \"left\": null, \n                \"title\": \"$44 for a 45 Minute Dental Exam and Cleaning, Including Oral Cancer Screening, TMJ Evaluation, Full Mouth Panoramic X-ray, Fluoride Treatment and Take-Home Whitening Pen at ProDent NY Dr. Benjamin Schwartz ($495 Value)\", \n                \"yipit_title\": \"91% off a Dental Exam, Cleaning, and More\", \n                \"url\": \"http://yipit.com/aff/click/?deal=8bNPRMMc&key=WYjGuDFf\", \n                \"yipit_url\": \"http://yipit.com/new-york/deal-find/44-for-a-45-minute-dental-exam-and-cleaning-including-oral-cancer-screening-tmj-evaluation-full-mouth-panoramic-x-ray-fluoride-treatment-and/\", \n                \"mobile_url\": \"http://m.yipit.com/new-york/deal-find/44-for-a-45-minute-dental-exam-and-cleaning-including-oral-cancer-screening-tmj-evaluation-full-mouth-panoramic-x-ray-fluoride-treatment-and/\", \n                \"images\": {\n                    \"image_big\": \"http://d22nv2k05ynu7x.cloudfront.net/deal_images/deal/44-for-a-45-minute-dental-exam-and-cleaning-including-oral-cancer-screening-tmj-evaluation-full-mouth-panoramic-x-ray-fluoride-treatment-and-1300107401_display_image.jpg\", \n                    \"image_small\": \"http://d22nv2k05ynu7x.cloudfront.net/deal_images/deal/44-for-a-45-minute-dental-exam-and-cleaning-including-oral-cancer-screening-tmj-evaluation-full-mouth-panoramic-x-ray-fluoride-treatment-and-1300107401_small_image.jpg\"\n                }, \n                \"division\": {\n                    \"slug\": \"new-york\", \n                    \"name\": \"New York\", \n                    \"active\": 1, \n                    \"time_zone_diff\": -4, \n                    \"lat\": 40.714269000000002, \n                    \"lon\": -74.005972999999997, \n                    \"url\": \"http://yipit.com/new-york/\"\n                }, \n                \"tags\": [\n                    {\n                        \"name\": \"Teeth Whitening\", \n                        \"slug\": \"teeth-whitening\", \n                        \"url\": \"http://yipit.com/new-york/deals/teeth-whitening/\"\n                    }, \n                    {\n                        \"name\": \"Dental\", \n                        \"slug\": \"dental\", \n                        \"url\": \"http://yipit.com/new-york/deals/dental/\"\n                    }\n                ], \n                \"business\": {\n                    \"id\": 17621, \n                    \"name\": \"ProDent NY\", \n                    \"url\": \"http://www.prodentny.com/\", \n                    \"locations\": [\n                        {\n                            \"id\": 18739, \n                            \"address\": \"220 Madison Ave, #B\", \n                            \"locality\": \"New York\", \n                            \"phone\": \"212-213-6622\", \n                            \"lat\": 40.749557500000002, \n                            \"lon\": -73.981841500000002\n                        }\n                    ]\n                }, \n                \"source\": {\n                    \"name\": \"DealFind\", \n                    \"slug\": \"deal-find\", \n                    \"paid\": 0, \n                    \"url\": \"http://yipit.com/new-york/deal-find\"\n                }\n            }, \n            {\n                \"id\": 54037, \n                \"date_added\": \"2011-03-14 12:54:32\", \n                \"end_date\": \"2011-03-15 08:00:00\", \n                \"active\": 1, \n                \"discount\": {\n                    \"raw\": 60, \n                    \"formatted\": \"60%\"\n                }, \n                \"price\": {\n                    \"raw\": \"120.00\", \n                    \"formatted\": \"$120\"\n                }, \n                \"value\": {\n                    \"raw\": \"300.00\", \n                    \"formatted\": \"$300\"\n                }, \n                \"purchased\": 20, \n                \"left\": null, \n                \"title\": \"$120 for a Certified Bartending Course with Empire Bartending Corporation ($300 Value)\", \n                \"yipit_title\": \"60% off a Certified Bartending Course\", \n                \"url\": \"http://yipit.com/aff/click/?deal=DRSqmaXY&key=WYjGuDFf\", \n                \"yipit_url\": \"http://yipit.com/new-york/ny-daily-news/120-for-a-certified-bartending-course-with-empire-bartending-corporation-300-value/\", \n                \"mobile_url\": \"http://m.yipit.com/new-york/ny-daily-news/120-for-a-certified-bartending-course-with-empire-bartending-corporation-300-value/\", \n                \"images\": {\n                    \"image_big\": \"http://d22nv2k05ynu7x.cloudfront.net/deal_images/deal/120-for-a-certified-bartending-course-with-empire-bartending-corporation-300-value-1300107271_display_image.jpg\", \n                    \"image_small\": \"http://d22nv2k05ynu7x.cloudfront.net/deal_images/deal/120-for-a-certified-bartending-course-with-empire-bartending-corporation-300-value-1300107271_small_image.jpg\"\n                }, \n                \"division\": {\n                    \"slug\": \"new-york\", \n                    \"name\": \"New York\", \n                    \"active\": 1, \n                    \"time_zone_diff\": -4, \n                    \"lat\": 40.714269000000002, \n                    \"lon\": -74.005972999999997, \n                    \"url\": \"http://yipit.com/new-york/\"\n                }, \n                \"tags\": [\n                    {\n                        \"name\": \"Life Skills Classes\", \n                        \"slug\": \"life-skills-classes\", \n                        \"url\": \"http://yipit.com/new-york/deals/life-skills-classes/\"\n                    }\n                ], \n                \"business\": {\n                    \"id\": 34369, \n                    \"name\": \"Empire Bartending Academy\", \n                    \"url\": \"http://www.empirebartendingacademy.com/\", \n                    \"locations\": []\n                }, \n                \"source\": {\n                    \"name\": \"NY Daily News\", \n                    \"slug\": \"ny-daily-news\", \n                    \"paid\": 0, \n                    \"url\": \"http://yipit.com/new-york/ny-daily-news\"\n                }\n            }, \n            {\n                \"id\": 54036, \n                \"date_added\": \"2011-03-14 12:51:33\", \n                \"end_date\": \"2011-03-15 10:00:00\", \n                \"active\": 1, \n                \"discount\": {\n                    \"raw\": 67, \n                    \"formatted\": \"67%\"\n                }, \n                \"price\": {\n                    \"raw\": \"49.00\", \n                    \"formatted\": \"$49\"\n                }, \n                \"value\": {\n                    \"raw\": \"150.00\", \n                    \"formatted\": \"$150\"\n                }, \n                \"purchased\": 0, \n                \"left\": null, \n                \"title\": \"$49 for One Month of Unlimited CrossFit Classes by CrossFit Knockout at South Florida Boxing ($150 Value)\", \n                \"yipit_title\": \"67% off Unlimited CrossFit Classes\", \n                \"url\": \"http://yipit.com/aff/click/?deal=npmcVdgk&key=WYjGuDFf\", \n                \"yipit_url\": \"http://yipit.com/miami/dealtificate/49-for-one-month-of-unlimited-crossfit-classes-by-crossfit-knockout-at-south-florida-boxing-150-value/\", \n                \"mobile_url\": \"http://m.yipit.com/miami/dealtificate/49-for-one-month-of-unlimited-crossfit-classes-by-crossfit-knockout-at-south-florida-boxing-150-value/\", \n                \"images\": {\n                    \"image_big\": \"http://d22nv2k05ynu7x.cloudfront.net/deal_images/deal/49-for-one-month-of-unlimited-crossfit-classes-by-crossfit-knockout-at-south-florida-boxing-150-value-1300107093_display_image.jpg\", \n                    \"image_small\": \"http://d22nv2k05ynu7x.cloudfront.net/deal_images/deal/49-for-one-month-of-unlimited-crossfit-classes-by-crossfit-knockout-at-south-florida-boxing-150-value-1300107093_small_image.jpg\"\n                }, \n                \"division\": {\n                    \"slug\": \"miami\", \n                    \"name\": \"Miami\", \n                    \"active\": 1, \n                    \"time_zone_diff\": -4, \n                    \"lat\": 25.7889689, \n                    \"lon\": -80.226439299999996, \n                    \"url\": \"http://yipit.com/miami/\"\n                }, \n                \"tags\": [\n                    {\n                        \"name\": \"Fitness Class\", \n                        \"slug\": \"fitness-classes\", \n                        \"url\": \"http://yipit.com/miami/deals/fitness-classes/\"\n                    }\n                ], \n                \"business\": {\n                    \"id\": 10967, \n                    \"name\": \"South Florida Boxing\", \n                    \"url\": \"http://southfloridaboxing.com/\", \n                    \"locations\": [\n                        {\n                            \"id\": 11296, \n                            \"address\": \"715 Washington Ave\", \n                            \"locality\": \"Miami\", \n                            \"phone\": \"305-672-8262\", \n                            \"lat\": 25.726782100000001, \n                            \"lon\": -80.259598400000002\n                        }\n                    ]\n                }, \n                \"source\": {\n                    \"name\": \"dealtificate\", \n                    \"slug\": \"dealtificate\", \n                    \"paid\": 0, \n                    \"url\": \"http://yipit.com/miami/dealtificate\"\n                }\n            }, \n            {\n                \"id\": 54035, \n                \"date_added\": \"2011-03-14 12:49:16\", \n                \"end_date\": \"2011-03-15 10:00:00\", \n                \"active\": 1, \n                \"discount\": {\n                    \"raw\": 75, \n                    \"formatted\": \"75%\"\n                }, \n                \"price\": {\n                    \"raw\": \"49.00\", \n                    \"formatted\": \"$49\"\n                }, \n                \"value\": {\n                    \"raw\": \"200.00\", \n                    \"formatted\": \"$200\"\n                }, \n                \"purchased\": null, \n                \"left\": null, \n                \"title\": \"$49 for $200 Worth of Designer Prescription Eyewear from Eye Desire Eyecare\", \n                \"yipit_title\": \"75% off Designer Prescription Eyewear\", \n                \"url\": \"http://yipit.com/aff/click/?deal=CkLqKx2z&key=WYjGuDFf\", \n                \"yipit_url\": \"http://yipit.com/miami/couptessa/49-for-200-worth-of-designer-prescription-eyewear-from-eye-desire-eyecare/\", \n                \"mobile_url\": \"http://m.yipit.com/miami/couptessa/49-for-200-worth-of-designer-prescription-eyewear-from-eye-desire-eyecare/\", \n                \"images\": {\n                    \"image_big\": \"http://d22nv2k05ynu7x.cloudfront.net/deal_images/deal/49-for-200-worth-of-designer-prescription-eyewear-from-eye-desire-eyecare-1300106955_display_image.jpg\", \n                    \"image_small\": \"http://d22nv2k05ynu7x.cloudfront.net/deal_images/deal/49-for-200-worth-of-designer-prescription-eyewear-from-eye-desire-eyecare-1300106955_small_image.jpg\"\n                }, \n                \"division\": {\n                    \"slug\": \"miami\", \n                    \"name\": \"Miami\", \n                    \"active\": 1, \n                    \"time_zone_diff\": -4, \n                    \"lat\": 25.7889689, \n                    \"lon\": -80.226439299999996, \n                    \"url\": \"http://yipit.com/miami/\"\n                }, \n                \"tags\": [\n                    {\n                        \"name\": \"Eye & Vision\", \n                        \"slug\": \"eye-vision\", \n                        \"url\": \"http://yipit.com/miami/deals/eye-vision/\"\n                    }\n                ], \n                \"business\": {\n                    \"id\": 21890, \n                    \"name\": \"Eye Desire Eyecare & Optical Boutique \", \n                    \"url\": \"http://www.eyedesire.com/\", \n                    \"locations\": [\n                        {\n                            \"id\": 27852, \n                            \"address\": \"1211 17th St\", \n                            \"locality\": \"Miami Beach\", \n                            \"phone\": null, \n                            \"lat\": 25.792051099999998, \n                            \"lon\": -80.141986299999999\n                        }, \n                        {\n                            \"id\": 44440, \n                            \"address\": \"136 NE 2nd Ave\", \n                            \"locality\": \"Miami\", \n                            \"phone\": null, \n                            \"lat\": 25.775928799999999, \n                            \"lon\": -80.190344699999997\n                        }\n                    ]\n                }, \n                \"source\": {\n                    \"name\": \"CoupTessa\", \n                    \"slug\": \"couptessa\", \n                    \"paid\": 0, \n                    \"url\": \"http://yipit.com/miami/couptessa\"\n                }\n            }, \n            {\n                \"id\": 54034, \n                \"date_added\": \"2011-03-14 12:33:50\", \n                \"end_date\": \"2011-03-21 05:00:00\", \n                \"active\": 1, \n                \"discount\": {\n                    \"raw\": 50, \n                    \"formatted\": \"50%\"\n                }, \n                \"price\": {\n                    \"raw\": \"15.00\", \n                    \"formatted\": \"$15\"\n                }, \n                \"value\": {\n                    \"raw\": \"30.00\", \n                    \"formatted\": \"$30\"\n                }, \n                \"purchased\": 87, \n                \"left\": null, \n                \"title\": \"$15 for $30 Worth of Mexican Fare at Primo's Mexican Grill\", \n                \"yipit_title\": \"50% off at Primo's Mexican Grill\", \n                \"url\": \"http://yipit.com/aff/click/?deal=D9ByCdzQ&key=WYjGuDFf\", \n                \"yipit_url\": \"http://yipit.com/vancouver/wag-jag/15-for-30-worth-of-mexican-fare-at-primos-mexican-grill/\", \n                \"mobile_url\": \"http://m.yipit.com/vancouver/wag-jag/15-for-30-worth-of-mexican-fare-at-primos-mexican-grill/\", \n                \"images\": {\n                    \"image_big\": \"http://d22nv2k05ynu7x.cloudfront.net/deal_images/deal/15-for-30-worth-of-mexican-fare-at-primos-mexican-grill-1300106030_display_image.jpg\", \n                    \"image_small\": \"http://d22nv2k05ynu7x.cloudfront.net/deal_images/deal/15-for-30-worth-of-mexican-fare-at-primos-mexican-grill-1300106030_small_image.jpg\"\n                }, \n                \"division\": {\n                    \"slug\": \"vancouver\", \n                    \"name\": \"Vancouver\", \n                    \"active\": 1, \n                    \"time_zone_diff\": -8, \n                    \"lat\": 49.159999999999997, \n                    \"lon\": -123.06999999999999, \n                    \"url\": \"http://yipit.com/vancouver/\"\n                }, \n                \"tags\": [\n                    {\n                        \"name\": \"Restaurants\", \n                        \"slug\": \"restaurants\", \n                        \"url\": \"http://yipit.com/vancouver/deals/restaurants/\"\n                    }\n                ], \n                \"business\": {\n                    \"id\": 34368, \n                    \"name\": \"Primo's Mexican Grill\", \n                    \"url\": \"http://www.primoson12th.com/\", \n                    \"locations\": [\n                        {\n                            \"id\": 44435, \n                            \"address\": \"1509 W 12th Ave\", \n                            \"locality\": \"Vancouver\", \n                            \"phone\": null, \n                            \"lat\": 49.260894700000001, \n                            \"lon\": -123.1391588\n                        }\n                    ]\n                }, \n                \"source\": {\n                    \"name\": \"WagJag\", \n                    \"slug\": \"wag-jag\", \n                    \"paid\": 0, \n                    \"url\": \"http://yipit.com/vancouver/wag-jag\"\n                }\n            }, \n            {\n                \"id\": 54033, \n                \"date_added\": \"2011-03-14 12:31:02\", \n                \"end_date\": \"2011-03-16 00:00:00\", \n                \"active\": 1, \n                \"discount\": {\n                    \"raw\": 61, \n                    \"formatted\": \"61%\"\n                }, \n                \"price\": {\n                    \"raw\": \"21.00\", \n                    \"formatted\": \"$21\"\n                }, \n                \"value\": {\n                    \"raw\": \"55.00\", \n                    \"formatted\": \"$55\"\n                }, \n                \"purchased\": 4, \n                \"left\": null, \n                \"title\": \"$21 for a $55 Credit for Easy Off Wall Murals from InkShuffle.com\", \n                \"yipit_title\": \"61% off Wall Murals\", \n                \"url\": \"http://yipit.com/aff/click/?deal=Etv4D3gU&key=WYjGuDFf\", \n                \"yipit_url\": \"http://yipit.com/vancouver/team-buy/21-for-a-55-credit-for-easy-off-wall-murals-from-inkshufflecom/\", \n                \"mobile_url\": \"http://m.yipit.com/vancouver/team-buy/21-for-a-55-credit-for-easy-off-wall-murals-from-inkshufflecom/\", \n                \"images\": {\n                    \"image_big\": \"http://d22nv2k05ynu7x.cloudfront.net/deal_images/deal/21-for-a-55-credit-for-easy-off-wall-murals-from-inkshufflecom-1300105862_display_image.jpg\", \n                    \"image_small\": \"http://d22nv2k05ynu7x.cloudfront.net/deal_images/deal/21-for-a-55-credit-for-easy-off-wall-murals-from-inkshufflecom-1300105862_small_image.jpg\"\n                }, \n                \"division\": {\n                    \"slug\": \"vancouver\", \n                    \"name\": \"Vancouver\", \n                    \"active\": 1, \n                    \"time_zone_diff\": -8, \n                    \"lat\": 49.159999999999997, \n                    \"lon\": -123.06999999999999, \n                    \"url\": \"http://yipit.com/vancouver/\"\n                }, \n                \"tags\": [\n                    {\n                        \"name\": \"Home Services\", \n                        \"slug\": \"home-services\", \n                        \"url\": \"http://yipit.com/vancouver/deals/home-services/\"\n                    }\n                ], \n                \"business\": {\n                    \"id\": 34367, \n                    \"name\": \"Ink Shuffle\", \n                    \"url\": \"http://inkshuffle.com/\", \n                    \"locations\": []\n                }, \n                \"source\": {\n                    \"name\": \"TeamBuy\", \n                    \"slug\": \"team-buy\", \n                    \"paid\": 0, \n                    \"url\": \"http://yipit.com/vancouver/team-buy\"\n                }\n            }, \n            {\n                \"id\": 54032, \n                \"date_added\": \"2011-03-14 12:28:52\", \n                \"end_date\": \"2011-03-18 07:00:00\", \n                \"active\": 1, \n                \"discount\": {\n                    \"raw\": 50, \n                    \"formatted\": \"50%\"\n                }, \n                \"price\": {\n                    \"raw\": \"20.00\", \n                    \"formatted\": \"$20\"\n                }, \n                \"value\": {\n                    \"raw\": \"40.00\", \n                    \"formatted\": \"$40\"\n                }, \n                \"purchased\": null, \n                \"left\": null, \n                \"title\": \"$20 gets you $40 of Artisan Eco Jewelry from Spark Sustainable Jewelry\", \n                \"yipit_title\": \"50% off at Spark Jewelry\", \n                \"url\": \"http://yipit.com/aff/click/?deal=hSwLse3m&key=WYjGuDFf\", \n                \"yipit_url\": \"http://yipit.com/vancouver/ethical-deal/20-gets-you-40-of-artisan-eco-jewelry-from-spark-sustainable-jewelry/\", \n                \"mobile_url\": \"http://m.yipit.com/vancouver/ethical-deal/20-gets-you-40-of-artisan-eco-jewelry-from-spark-sustainable-jewelry/\", \n                \"images\": {\n                    \"image_big\": \"http://d22nv2k05ynu7x.cloudfront.net/deal_images/deal/20-gets-you-40-of-artisan-eco-jewelry-from-spark-sustainable-jewelry-1300105731_display_image.jpg\", \n                    \"image_small\": \"http://d22nv2k05ynu7x.cloudfront.net/deal_images/deal/20-gets-you-40-of-artisan-eco-jewelry-from-spark-sustainable-jewelry-1300105731_small_image.jpg\"\n                }, \n                \"division\": {\n                    \"slug\": \"vancouver\", \n                    \"name\": \"Vancouver\", \n                    \"active\": 1, \n                    \"time_zone_diff\": -8, \n                    \"lat\": 49.159999999999997, \n                    \"lon\": -123.06999999999999, \n                    \"url\": \"http://yipit.com/vancouver/\"\n                }, \n                \"tags\": [\n                    {\n                        \"name\": \"Women's Clothing\", \n                        \"slug\": \"women-s-clothing\", \n                        \"url\": \"http://yipit.com/vancouver/deals/women-s-clothing/\"\n                    }\n                ], \n                \"business\": {\n                    \"id\": 34366, \n                    \"name\": \"Spark Jewelry\", \n                    \"url\": \"http://sparkjewlery.myshopify.com/\", \n                    \"locations\": []\n                }, \n                \"source\": {\n                    \"name\": \"ethicalDeal\", \n                    \"slug\": \"ethical-deal\", \n                    \"paid\": 0, \n                    \"url\": \"http://yipit.com/vancouver/ethical-deal\"\n                }\n            }, \n            {\n                \"id\": 54031, \n                \"date_added\": \"2011-03-14 12:24:59\", \n                \"end_date\": \"2011-03-17 07:00:00\", \n                \"active\": 1, \n                \"discount\": {\n                    \"raw\": 55, \n                    \"formatted\": \"55%\"\n                }, \n                \"price\": {\n                    \"raw\": \"40.00\", \n                    \"formatted\": \"$40\"\n                }, \n                \"value\": {\n                    \"raw\": \"90.00\", \n                    \"formatted\": \"$90\"\n                }, \n                \"purchased\": 0, \n                \"left\": null, \n                \"title\": \"$40 for $90 Worth of Interior Gutter Cleaning - Residential or Commercial from Magic Clean Eco Solutions\", \n                \"yipit_title\": \"55% off Interior Gutter Cleaning\", \n                \"url\": \"http://yipit.com/aff/click/?deal=RRE6RZrV&key=WYjGuDFf\", \n                \"yipit_url\": \"http://yipit.com/vancouver/web-piggy/40-for-90-worth-of-interior-gutter-cleaning-residential-or-commercial-from-magic-clean-eco-solutions/\", \n                \"mobile_url\": \"http://m.yipit.com/vancouver/web-piggy/40-for-90-worth-of-interior-gutter-cleaning-residential-or-commercial-from-magic-clean-eco-solutions/\", \n                \"images\": {\n                    \"image_big\": \"http://d22nv2k05ynu7x.cloudfront.net/deal_images/deal/40-for-90-worth-of-interior-gutter-cleaning-residential-or-commercial-from-magic-clean-eco-solutions-1300105499_display_image.jpg\", \n                    \"image_small\": \"http://d22nv2k05ynu7x.cloudfront.net/deal_images/deal/40-for-90-worth-of-interior-gutter-cleaning-residential-or-commercial-from-magic-clean-eco-solutions-1300105499_small_image.jpg\"\n                }, \n                \"division\": {\n                    \"slug\": \"vancouver\", \n                    \"name\": \"Vancouver\", \n                    \"active\": 1, \n                    \"time_zone_diff\": -8, \n                    \"lat\": 49.159999999999997, \n                    \"lon\": -123.06999999999999, \n                    \"url\": \"http://yipit.com/vancouver/\"\n                }, \n                \"tags\": [\n                    {\n                        \"name\": \"Home Services\", \n                        \"slug\": \"home-services\", \n                        \"url\": \"http://yipit.com/vancouver/deals/home-services/\"\n                    }\n                ], \n                \"business\": {\n                    \"id\": 34365, \n                    \"name\": \"Magic Clean Eco Solutions\", \n                    \"url\": \"http://www.magicclean.ca/\", \n                    \"locations\": [\n                        {\n                            \"id\": 44425, \n                            \"address\": \"\", \n                            \"locality\": \"Vancouver\", \n                            \"phone\": \"604-628-3388\", \n                            \"lat\": 49.261226000000001, \n                            \"lon\": -123.1139268\n                        }\n                    ]\n                }, \n                \"source\": {\n                    \"name\": \"WebPiggy\", \n                    \"slug\": \"web-piggy\", \n                    \"paid\": 0, \n                    \"url\": \"http://yipit.com/vancouver/web-piggy\"\n                }\n            }, \n            {\n                \"id\": 54030, \n                \"date_added\": \"2011-03-14 12:24:50\", \n                \"end_date\": \"2011-03-16 02:00:00\", \n                \"active\": 1, \n                \"discount\": {\n                    \"raw\": 82, \n                    \"formatted\": \"82%\"\n                }, \n                \"price\": {\n                    \"raw\": \"29.99\", \n                    \"formatted\": \"$29.99\"\n                }, \n                \"value\": {\n                    \"raw\": \"170.00\", \n                    \"formatted\": \"$170\"\n                }, \n                \"purchased\": null, \n                \"left\": null, \n                \"title\": \"$29.99 for 2 Massages and Sugar Scrub Body Treatment from Pure Escape Spa ($170 Value)\", \n                \"yipit_title\": \"82% Off Two Massages and a Sugar Scrub\", \n                \"url\": \"http://yipit.com/aff/click/?deal=774gfeB5&key=WYjGuDFf\", \n                \"yipit_url\": \"http://yipit.com/seattle/icoupon/2999-for-2-massages-and-sugar-scrub-body-treatment-from-pure-escape-spa-170-value/\", \n                \"mobile_url\": \"http://m.yipit.com/seattle/icoupon/2999-for-2-massages-and-sugar-scrub-body-treatment-from-pure-escape-spa-170-value/\", \n                \"images\": {\n                    \"image_big\": \"http://d22nv2k05ynu7x.cloudfront.net/deal_images/deal/2999-for-2-massages-and-sugar-scrub-body-treatment-from-pure-escape-spa-170-value-1300105490_display_image.jpg\", \n                    \"image_small\": \"http://d22nv2k05ynu7x.cloudfront.net/deal_images/deal/2999-for-2-massages-and-sugar-scrub-body-treatment-from-pure-escape-spa-170-value-1300105490_small_image.jpg\"\n                }, \n                \"division\": {\n                    \"slug\": \"seattle\", \n                    \"name\": \"Seattle\", \n                    \"active\": 1, \n                    \"time_zone_diff\": -7, \n                    \"lat\": 47.606209499999999, \n                    \"lon\": -122.3320708, \n                    \"url\": \"http://yipit.com/seattle/\"\n                }, \n                \"tags\": [\n                    {\n                        \"name\": \"Massage\", \n                        \"slug\": \"massage\", \n                        \"url\": \"http://yipit.com/seattle/deals/massage/\"\n                    }, \n                    {\n                        \"name\": \"Spa\", \n                        \"slug\": \"spa\", \n                        \"url\": \"http://yipit.com/seattle/deals/spa/\"\n                    }\n                ], \n                \"business\": {\n                    \"id\": 34364, \n                    \"name\": \"Pure Escape Spa\", \n                    \"url\": \"http://www.thepureescapespa.com/\", \n                    \"locations\": [\n                        {\n                            \"id\": 44424, \n                            \"address\": \"24030 132nd Ave SE\", \n                            \"locality\": \"Kent\", \n                            \"phone\": \"253-630-1332\", \n                            \"lat\": 47.386731599999997, \n                            \"lon\": -122.1653737\n                        }\n                    ]\n                }, \n                \"source\": {\n                    \"name\": \"iCoupon\", \n                    \"slug\": \"icoupon\", \n                    \"paid\": 0, \n                    \"url\": \"http://yipit.com/seattle/icoupon\"\n                }\n            }, \n            {\n                \"id\": 54029, \n                \"date_added\": \"2011-03-14 12:24:32\", \n                \"end_date\": \"2011-03-18 17:00:00\", \n                \"active\": 1, \n                \"discount\": {\n                    \"raw\": 78, \n                    \"formatted\": \"78%\"\n                }, \n                \"price\": {\n                    \"raw\": \"33.00\", \n                    \"formatted\": \"$33\"\n                }, \n                \"value\": {\n                    \"raw\": \"150.00\", \n                    \"formatted\": \"$150\"\n                }, \n                \"purchased\": 3, \n                \"left\": null, \n                \"title\": \"$33 for your Choice of 3 Pilates Mat or Reformer Sessions at Hot Body Pilates (up to $150 value)\", \n                \"yipit_title\": \"78% off your Choice of 3 Pilates Mat or Reformer Sessions\", \n                \"url\": \"http://yipit.com/aff/click/?deal=2HUqBqY8&key=WYjGuDFf\", \n                \"yipit_url\": \"http://yipit.com/san-diego/kgb-deals/33-for-your-choice-of-3-pilates-mat-or-reformer-sessions-at-hot-body-pilates-up-to-150-value/\", \n                \"mobile_url\": \"http://m.yipit.com/san-diego/kgb-deals/33-for-your-choice-of-3-pilates-mat-or-reformer-sessions-at-hot-body-pilates-up-to-150-value/\", \n                \"images\": {\n                    \"image_big\": \"http://d22nv2k05ynu7x.cloudfront.net/deal_images/deal/33-for-your-choice-of-3-pilates-mat-or-reformer-sessions-at-hot-body-pilates-up-to-150-value-1300105472_display_image.jpg\", \n                    \"image_small\": \"http://d22nv2k05ynu7x.cloudfront.net/deal_images/deal/33-for-your-choice-of-3-pilates-mat-or-reformer-sessions-at-hot-body-pilates-up-to-150-value-1300105472_small_image.jpg\"\n                }, \n                \"division\": {\n                    \"slug\": \"san-diego\", \n                    \"name\": \"San Diego\", \n                    \"active\": 1, \n                    \"time_zone_diff\": -7, \n                    \"lat\": 32.715328999999997, \n                    \"lon\": -117.15725500000001, \n                    \"url\": \"http://yipit.com/san-diego/\"\n                }, \n                \"tags\": [\n                    {\n                        \"name\": \"Pilates\", \n                        \"slug\": \"pilates\", \n                        \"url\": \"http://yipit.com/san-diego/deals/pilates/\"\n                    }\n                ], \n                \"business\": {\n                    \"id\": 15683, \n                    \"name\": \"Hot Body Pilates\", \n                    \"url\": \"http://hotbodypilates.com/\", \n                    \"locations\": [\n                        {\n                            \"id\": 44437, \n                            \"address\": \"560 6th Ave\", \n                            \"locality\": \"San Diego\", \n                            \"phone\": \"858-220-1415\", \n                            \"lat\": 32.711153000000003, \n                            \"lon\": -117.1593561\n                        }\n                    ]\n                }, \n                \"source\": {\n                    \"name\": \"kgb deals\", \n                    \"slug\": \"kgb-deals\", \n                    \"paid\": 0, \n                    \"url\": \"http://yipit.com/san-diego/kgb-deals\"\n                }\n            }, \n            {\n                \"id\": 54028, \n                \"date_added\": \"2011-03-14 12:24:29\", \n                \"end_date\": \"2011-03-18 17:00:00\", \n                \"active\": 1, \n                \"discount\": {\n                    \"raw\": 63, \n                    \"formatted\": \"63%\"\n                }, \n                \"price\": {\n                    \"raw\": \"49.00\", \n                    \"formatted\": \"$49\"\n                }, \n                \"value\": {\n                    \"raw\": \"135.00\", \n                    \"formatted\": \"$135\"\n                }, \n                \"purchased\": 0, \n                \"left\": null, \n                \"title\": \"$49 for a 90-Minute Luxury Electric Boat Rental from Newport Fun Tours ($135 Rental)\", \n                \"yipit_title\": \"63% off Electric Boat Rentals\", \n                \"url\": \"http://yipit.com/aff/click/?deal=spLw3wg8&key=WYjGuDFf\", \n                \"yipit_url\": \"http://yipit.com/los-angeles/kgb-deals/49-for-a-90-minute-luxury-electric-boat-rental-from-newport-fun-tours-135-rental/\", \n                \"mobile_url\": \"http://m.yipit.com/los-angeles/kgb-deals/49-for-a-90-minute-luxury-electric-boat-rental-from-newport-fun-tours-135-rental/\", \n                \"images\": {\n                    \"image_big\": \"http://d22nv2k05ynu7x.cloudfront.net/deal_images/deal/49-for-a-90-minute-luxury-electric-boat-rental-from-newport-fun-tours-135-rental-1300105469_display_image.jpg\", \n                    \"image_small\": \"http://d22nv2k05ynu7x.cloudfront.net/deal_images/deal/49-for-a-90-minute-luxury-electric-boat-rental-from-newport-fun-tours-135-rental-1300105469_small_image.jpg\"\n                }, \n                \"division\": {\n                    \"slug\": \"los-angeles\", \n                    \"name\": \"Los Angeles\", \n                    \"active\": 1, \n                    \"time_zone_diff\": -7, \n                    \"lat\": 34.052233999999999, \n                    \"lon\": -118.243685, \n                    \"url\": \"http://yipit.com/los-angeles/\"\n                }, \n                \"tags\": [\n                    {\n                        \"name\": \"Outdoor Adventures\", \n                        \"slug\": \"outdoor-adventures\", \n                        \"url\": \"http://yipit.com/los-angeles/deals/outdoor-adventures/\"\n                    }\n                ], \n                \"business\": {\n                    \"id\": 9292, \n                    \"name\": \"Newport Fun Tours\", \n                    \"url\": \"http://newportfuntours.com/\", \n                    \"locations\": [\n                        {\n                            \"id\": 9502, \n                            \"address\": \"2122 Newport Blvd\", \n                            \"locality\": \"Newport Beach\", \n                            \"phone\": \"949-675-8433\", \n                            \"lat\": 33.609636999999999, \n                            \"lon\": -117.928128\n                        }\n                    ]\n                }, \n                \"source\": {\n                    \"name\": \"kgb deals\", \n                    \"slug\": \"kgb-deals\", \n                    \"paid\": 0, \n                    \"url\": \"http://yipit.com/los-angeles/kgb-deals\"\n                }\n            }, \n            {\n                \"id\": 54027, \n                \"date_added\": \"2011-03-14 12:24:25\", \n                \"end_date\": \"2011-03-18 17:00:00\", \n                \"active\": 1, \n                \"discount\": {\n                    \"raw\": 50, \n                    \"formatted\": \"50%\"\n                }, \n                \"price\": {\n                    \"raw\": \"39.00\", \n                    \"formatted\": \"$39\"\n                }, \n                \"value\": {\n                    \"raw\": \"79.00\", \n                    \"formatted\": \"$79\"\n                }, \n                \"purchased\": 11, \n                \"left\": null, \n                \"title\": \"$39 for a 60-Minute Full-Body Neuromuscular Massage at Massage Revolution ($79 Value)\", \n                \"yipit_title\": \"50% off a 60-Minute Neuromuscular Massage\", \n                \"url\": \"http://yipit.com/aff/click/?deal=ZFFEzdF7&key=WYjGuDFf\", \n                \"yipit_url\": \"http://yipit.com/los-angeles/kgb-deals/39-for-a-60-minute-full-body-neuromuscular-massage-at-massage-revolution-79-value/\", \n                \"mobile_url\": \"http://m.yipit.com/los-angeles/kgb-deals/39-for-a-60-minute-full-body-neuromuscular-massage-at-massage-revolution-79-value/\", \n                \"images\": {\n                    \"image_big\": \"http://d22nv2k05ynu7x.cloudfront.net/deal_images/deal/39-for-a-60-minute-full-body-neuromuscular-massage-at-massage-revolution-79-value-1300105465_display_image.jpg\", \n                    \"image_small\": \"http://d22nv2k05ynu7x.cloudfront.net/deal_images/deal/39-for-a-60-minute-full-body-neuromuscular-massage-at-massage-revolution-79-value-1300105465_small_image.jpg\"\n                }, \n                \"division\": {\n                    \"slug\": \"los-angeles\", \n                    \"name\": \"Los Angeles\", \n                    \"active\": 1, \n                    \"time_zone_diff\": -7, \n                    \"lat\": 34.052233999999999, \n                    \"lon\": -118.243685, \n                    \"url\": \"http://yipit.com/los-angeles/\"\n                }, \n                \"tags\": [\n                    {\n                        \"name\": \"Massage\", \n                        \"slug\": \"massage\", \n                        \"url\": \"http://yipit.com/los-angeles/deals/massage/\"\n                    }\n                ], \n                \"business\": {\n                    \"id\": 4023, \n                    \"name\": \"Massage Revolution\", \n                    \"url\": \"http://www.massagerevolution.com/\", \n                    \"locations\": [\n                        {\n                            \"id\": 4053, \n                            \"address\": \"500 S Sepulveda Blvd\", \n                            \"locality\": \"Manhattan Beach\", \n                            \"phone\": \"310-798-4263\", \n                            \"lat\": 33.875138999999997, \n                            \"lon\": -118.39530600000001\n                        }\n                    ]\n                }, \n                \"source\": {\n                    \"name\": \"kgb deals\", \n                    \"slug\": \"kgb-deals\", \n                    \"paid\": 0, \n                    \"url\": \"http://yipit.com/los-angeles/kgb-deals\"\n                }\n            }, \n            {\n                \"id\": 54026, \n                \"date_added\": \"2011-03-14 12:24:24\", \n                \"end_date\": \"2011-03-18 17:00:00\", \n                \"active\": 1, \n                \"discount\": {\n                    \"raw\": 50, \n                    \"formatted\": \"50%\"\n                }, \n                \"price\": {\n                    \"raw\": \"12.00\", \n                    \"formatted\": \"$12\"\n                }, \n                \"value\": {\n                    \"raw\": \"24.00\", \n                    \"formatted\": \"$24\"\n                }, \n                \"purchased\": 4, \n                \"left\": null, \n                \"title\": \"$12 for a Ticket to San Francisco\xE2\x80\x99s Championship for The 27th Annual Harmony Sweepstakes A Cappella Festival on March 19 ($24 Value)\", \n                \"yipit_title\": \"50% off a Ticket to the 27th Annual Harmony Sweepstakes A Cappella Festival\", \n                \"url\": \"http://yipit.com/aff/click/?deal=vkG58DY7&key=WYjGuDFf\", \n                \"yipit_url\": \"http://yipit.com/san-francisco/kgb-deals/12-for-a-ticket-to-san-franciscos-championship-for-the-27th-annual-harmony-sweepstakes-a-cappella-festival-on-march-19-24-value/\", \n                \"mobile_url\": \"http://m.yipit.com/san-francisco/kgb-deals/12-for-a-ticket-to-san-franciscos-championship-for-the-27th-annual-harmony-sweepstakes-a-cappella-festival-on-march-19-24-value/\", \n                \"images\": {\n                    \"image_big\": \"http://d22nv2k05ynu7x.cloudfront.net/deal_images/deal/12-for-a-ticket-to-san-franciscos-championship-for-the-27th-annual-harmony-sweepstakes-a-cappella-festival-on-march-19-24-value-1300105464_display_image.jpg\", \n                    \"image_small\": \"http://d22nv2k05ynu7x.cloudfront.net/deal_images/deal/12-for-a-ticket-to-san-franciscos-championship-for-the-27th-annual-harmony-sweepstakes-a-cappella-festival-on-march-19-24-value-1300105464_small_image.jpg\"\n                }, \n                \"division\": {\n                    \"slug\": \"san-francisco\", \n                    \"name\": \"San Francisco\", \n                    \"active\": 1, \n                    \"time_zone_diff\": -7, \n                    \"lat\": 37.774929999999998, \n                    \"lon\": -122.419415, \n                    \"url\": \"http://yipit.com/san-francisco/\"\n                }, \n                \"tags\": [\n                    {\n                        \"name\": \"Theater\", \n                        \"slug\": \"theater\", \n                        \"url\": \"http://yipit.com/san-francisco/deals/theater/\"\n                    }\n                ], \n                \"business\": {\n                    \"id\": 34363, \n                    \"name\": \"The 27th Annual Harmony Sweepstakes A Cappella Festival\", \n                    \"url\": \"\", \n                    \"locations\": [\n                        {\n                            \"id\": 44438, \n                            \"address\": \"3301 Lyon St\", \n                            \"locality\": \"San Francisco\", \n                            \"phone\": \"415-392-4400\", \n                            \"lat\": 37.801884000000001, \n                            \"lon\": -122.448249\n                        }\n                    ]\n                }, \n                \"source\": {\n                    \"name\": \"kgb deals\", \n                    \"slug\": \"kgb-deals\", \n                    \"paid\": 0, \n                    \"url\": \"http://yipit.com/san-francisco/kgb-deals\"\n                }\n            }, \n            {\n                \"id\": 54025, \n                \"date_added\": \"2011-03-14 12:22:10\", \n                \"end_date\": \"2011-03-15 07:00:00\", \n                \"active\": 1, \n                \"discount\": {\n                    \"raw\": 62, \n                    \"formatted\": \"62%\"\n                }, \n                \"price\": {\n                    \"raw\": \"89.00\", \n                    \"formatted\": \"$89\"\n                }, \n                \"value\": {\n                    \"raw\": \"240.00\", \n                    \"formatted\": \"$240\"\n                }, \n                \"purchased\": null, \n                \"left\": null, \n                \"title\": \"$89 for 4 week Complete BootCamp with Get P.H.A.T Bootcamp in April ($240 Value)\", \n                \"yipit_title\": \"62% off 4 Week Bootcamp\", \n                \"url\": \"http://yipit.com/aff/click/?deal=DhX8gqmr&key=WYjGuDFf\", \n                \"yipit_url\": \"http://yipit.com/vancouver/steal-the-deal/89-for-4-week-complete-bootcamp-with-get-phat-bootcamp-in-april-240-value/\", \n                \"mobile_url\": \"http://m.yipit.com/vancouver/steal-the-deal/89-for-4-week-complete-bootcamp-with-get-phat-bootcamp-in-april-240-value/\", \n                \"images\": {\n                    \"image_big\": \"http://d22nv2k05ynu7x.cloudfront.net/deal_images/deal/89-for-4-week-complete-bootcamp-with-get-phat-bootcamp-in-april-240-value-1300105329_display_image.jpg\", \n                    \"image_small\": \"http://d22nv2k05ynu7x.cloudfront.net/deal_images/deal/89-for-4-week-complete-bootcamp-with-get-phat-bootcamp-in-april-240-value-1300105329_small_image.jpg\"\n                }, \n                \"division\": {\n                    \"slug\": \"vancouver\", \n                    \"name\": \"Vancouver\", \n                    \"active\": 1, \n                    \"time_zone_diff\": -8, \n                    \"lat\": 49.159999999999997, \n                    \"lon\": -123.06999999999999, \n                    \"url\": \"http://yipit.com/vancouver/\"\n                }, \n                \"tags\": [\n                    {\n                        \"name\": \"Boot Camp\", \n                        \"slug\": \"boot-camp\", \n                        \"url\": \"http://yipit.com/vancouver/deals/boot-camp/\"\n                    }\n                ], \n                \"business\": {\n                    \"id\": 34362, \n                    \"name\": \"Get Phat Boot Camp\", \n                    \"url\": \"http://www.getphatbootcamp.com/\", \n                    \"locations\": [\n                        {\n                            \"id\": 44420, \n                            \"address\": \"19572 Fraser Way\", \n                            \"locality\": \"Pitt Meadows\", \n                            \"phone\": \"778-834-7424\", \n                            \"lat\": 49.202722100000003, \n                            \"lon\": -122.67973019999999\n                        }\n                    ]\n                }, \n                \"source\": {\n                    \"name\": \"Steal the Deal\", \n                    \"slug\": \"steal-the-deal\", \n                    \"paid\": 0, \n                    \"url\": \"http://yipit.com/vancouver/steal-the-deal\"\n                }\n            }, \n            {\n                \"id\": 54024, \n                \"date_added\": \"2011-03-14 12:21:30\", \n                \"end_date\": \"2011-03-16 11:00:00\", \n                \"active\": 1, \n                \"discount\": {\n                    \"raw\": 50, \n                    \"formatted\": \"50%\"\n                }, \n                \"price\": {\n                    \"raw\": \"35.00\", \n                    \"formatted\": \"$35\"\n                }, \n                \"value\": {\n                    \"raw\": \"70.00\", \n                    \"formatted\": \"$70\"\n                }, \n                \"purchased\": null, \n                \"left\": null, \n                \"title\": \"$35 for a Series of 6 Beginning Bellydancing Classes with Leslie Rosen ($70 Value)\", \n                \"yipit_title\": \"50% Off 6 Beginning Belly Dance Classes\", \n                \"url\": \"http://yipit.com/aff/click/?deal=MSj22ehR&key=WYjGuDFf\", \n                \"yipit_url\": \"http://yipit.com/seattle/townhog/35-for-a-series-of-6-beginning-bellydancing-classes-with-leslie-rosen-70-value-2/\", \n                \"mobile_url\": \"http://m.yipit.com/seattle/townhog/35-for-a-series-of-6-beginning-bellydancing-classes-with-leslie-rosen-70-value-2/\", \n                \"images\": {\n                    \"image_big\": \"http://d22nv2k05ynu7x.cloudfront.net/deal_images/deal/35-for-a-series-of-6-beginning-bellydancing-classes-with-leslie-rosen-70-value-2-1300105289_display_image.jpg\", \n                    \"image_small\": \"http://d22nv2k05ynu7x.cloudfront.net/deal_images/deal/35-for-a-series-of-6-beginning-bellydancing-classes-with-leslie-rosen-70-value-2-1300105289_small_image.jpg\"\n                }, \n                \"division\": {\n                    \"slug\": \"seattle\", \n                    \"name\": \"Seattle\", \n                    \"active\": 1, \n                    \"time_zone_diff\": -7, \n                    \"lat\": 47.606209499999999, \n                    \"lon\": -122.3320708, \n                    \"url\": \"http://yipit.com/seattle/\"\n                }, \n                \"tags\": [\n                    {\n                        \"name\": \"Dance Classes\", \n                        \"slug\": \"dance-classes\", \n                        \"url\": \"http://yipit.com/seattle/deals/dance-classes/\"\n                    }\n                ], \n                \"business\": {\n                    \"id\": 27663, \n                    \"name\": \"Leslie Rosen @ Youngstown Cultural Arts Center\", \n                    \"url\": \"http://townhog.com/c_ext/2412/aHR0cDovL3d3dy5sZXNsaWVyb3Nlbi5jb20v\", \n                    \"locations\": [\n                        {\n                            \"id\": 36146, \n                            \"address\": \"4408 Delridge Way SW\", \n                            \"locality\": \"Seattle\", \n                            \"phone\": \"206-696-1444\", \n                            \"lat\": 47.563775, \n                            \"lon\": -122.363035\n                        }\n                    ]\n                }, \n                \"source\": {\n                    \"name\": \"TownHog\", \n                    \"slug\": \"townhog\", \n                    \"paid\": 0, \n                    \"url\": \"http://yipit.com/seattle/townhog\"\n                }\n            }, \n            {\n                \"id\": 54023, \n                \"date_added\": \"2011-03-14 12:19:24\", \n                \"end_date\": \"2011-03-15 12:00:00\", \n                \"active\": 1, \n                \"discount\": {\n                    \"raw\": 64, \n                    \"formatted\": \"64%\"\n                }, \n                \"price\": {\n                    \"raw\": \"24.00\", \n                    \"formatted\": \"$24\"\n                }, \n                \"value\": {\n                    \"raw\": \"68.00\", \n                    \"formatted\": \"$68\"\n                }, \n                \"purchased\": 60, \n                \"left\": null, \n                \"title\": \"$24 for an Oil Change, Including Oil, Lube and Filter, Tire Rotation, Plus a 40 Point Inspection at H&A Service ($68 Value)\", \n                \"yipit_title\": \"64% off an Oil Change\", \n                \"url\": \"http://yipit.com/aff/click/?deal=RgYY4eP4&key=WYjGuDFf\", \n                \"yipit_url\": \"http://yipit.com/vancouver/deal-find/24-for-an-oil-change-including-oil-lube-and-filter-tire-rotation-plus-a-40-point-inspection-at-ha-service-68-value/\", \n                \"mobile_url\": \"http://m.yipit.com/vancouver/deal-find/24-for-an-oil-change-including-oil-lube-and-filter-tire-rotation-plus-a-40-point-inspection-at-ha-service-68-value/\", \n                \"images\": {\n                    \"image_big\": \"http://d22nv2k05ynu7x.cloudfront.net/deal_images/deal/24-for-an-oil-change-including-oil-lube-and-filter-tire-rotation-plus-a-40-point-inspection-at-ha-service-68-value-1300105164_display_image.jpg\", \n                    \"image_small\": \"http://d22nv2k05ynu7x.cloudfront.net/deal_images/deal/24-for-an-oil-change-including-oil-lube-and-filter-tire-rotation-plus-a-40-point-inspection-at-ha-service-68-value-1300105164_small_image.jpg\"\n                }, \n                \"division\": {\n                    \"slug\": \"vancouver\", \n                    \"name\": \"Vancouver\", \n                    \"active\": 1, \n                    \"time_zone_diff\": -8, \n                    \"lat\": 49.159999999999997, \n                    \"lon\": -123.06999999999999, \n                    \"url\": \"http://yipit.com/vancouver/\"\n                }, \n                \"tags\": [\n                    {\n                        \"name\": \"Automotive Services\", \n                        \"slug\": \"automotive-services\", \n                        \"url\": \"http://yipit.com/vancouver/deals/automotive-services/\"\n                    }\n                ], \n                \"business\": {\n                    \"id\": 34361, \n                    \"name\": \"H&A Service\", \n                    \"url\": \"http://www.haservice.ca/\", \n                    \"locations\": [\n                        {\n                            \"id\": 44414, \n                            \"address\": \"5678 199 St\", \n                            \"locality\": \"Langley\", \n                            \"phone\": null, \n                            \"lat\": 49.105925800000001, \n                            \"lon\": -122.6708802\n                        }\n                    ]\n                }, \n                \"source\": {\n                    \"name\": \"DealFind\", \n                    \"slug\": \"deal-find\", \n                    \"paid\": 0, \n                    \"url\": \"http://yipit.com/vancouver/deal-find\"\n                }\n            }, \n            {\n                \"id\": 54022, \n                \"date_added\": \"2011-03-14 12:19:10\", \n                \"end_date\": \"2011-03-15 08:00:00\", \n                \"active\": 1, \n                \"discount\": {\n                    \"raw\": 50, \n                    \"formatted\": \"50%\"\n                }, \n                \"price\": {\n                    \"raw\": \"10.00\", \n                    \"formatted\": \"$10\"\n                }, \n                \"value\": {\n                    \"raw\": \"20.00\", \n                    \"formatted\": \"$20\"\n                }, \n                \"purchased\": 7, \n                \"left\": null, \n                \"title\": \"$10 for $20 to Spend at Tenoch Mexican Grill\", \n                \"yipit_title\": \"50% Off at Tenoch Mexican Grill\", \n                \"url\": \"http://yipit.com/aff/click/?deal=DUZRJSF4&key=WYjGuDFf\", \n                \"yipit_url\": \"http://yipit.com/seattle/voice-deal-of-the-day/10-for-20-to-spend-at-tenoch-mexican-grill/\", \n                \"mobile_url\": \"http://m.yipit.com/seattle/voice-deal-of-the-day/10-for-20-to-spend-at-tenoch-mexican-grill/\", \n                \"images\": {\n                    \"image_big\": \"http://d22nv2k05ynu7x.cloudfront.net/deal_images/deal/10-for-20-to-spend-at-tenoch-mexican-grill-1300105150_display_image.jpg\", \n                    \"image_small\": \"http://d22nv2k05ynu7x.cloudfront.net/deal_images/deal/10-for-20-to-spend-at-tenoch-mexican-grill-1300105150_small_image.jpg\"\n                }, \n                \"division\": {\n                    \"slug\": \"seattle\", \n                    \"name\": \"Seattle\", \n                    \"active\": 1, \n                    \"time_zone_diff\": -7, \n                    \"lat\": 47.606209499999999, \n                    \"lon\": -122.3320708, \n                    \"url\": \"http://yipit.com/seattle/\"\n                }, \n                \"tags\": [\n                    {\n                        \"name\": \"Restaurants\", \n                        \"slug\": \"restaurants\", \n                        \"url\": \"http://yipit.com/seattle/deals/restaurants/\"\n                    }\n                ], \n                \"business\": {\n                    \"id\": 34360, \n                    \"name\": \"Tenoch Mexican Grill\", \n                    \"url\": \"http://www.tenochmexicangrill.com/\", \n                    \"locations\": [\n                        {\n                            \"id\": 44413, \n                            \"address\": \"2232 Queen Anne Ave N\", \n                            \"locality\": \"Seattle\", \n                            \"phone\": \"206-352-3271\", \n                            \"lat\": 47.639417999999999, \n                            \"lon\": -122.35660300000001\n                        }\n                    ]\n                }, \n                \"source\": {\n                    \"name\": \"VOICE Deal of the Day\", \n                    \"slug\": \"voice-deal-of-the-day\", \n                    \"paid\": 0, \n                    \"url\": \"http://yipit.com/seattle/voice-deal-of-the-day\"\n                }\n            }\n        ]\n    }\n\
         | 
| 81 | 
            -
                  }"
         | 
| 82 | 
            -
                http_version: "1.1"
         |