Module: FoursquareNext

Defined in:
lib/foursquare_next.rb,
lib/foursquare_next/tips.rb,
lib/foursquare_next/lists.rb,
lib/foursquare_next/pages.rb,
lib/foursquare_next/users.rb,
lib/foursquare_next/client.rb,
lib/foursquare_next/events.rb,
lib/foursquare_next/photos.rb,
lib/foursquare_next/venues.rb,
lib/foursquare_next/checkins.rb,
lib/foursquare_next/settings.rb,
lib/foursquare_next/specials.rb,
lib/foursquare_next/api_error.rb,
lib/foursquare_next/campaigns.rb,
lib/foursquare_next/venuegroups.rb,
lib/foursquare_next/hash_wrapper.rb,
lib/foursquare_next/mashify_wrapper.rb

Defined Under Namespace

Modules: Campaigns, Checkins, Events, Lists, Pages, Photos, Settings, Specials, Tips, Users, Venuegroups, Venues Classes: APIError, Client, HashWrapper, MashifyWrapper

Constant Summary collapse

FIELDS =
[:client_id, :client_secret, :api_version, :ssl, :connection_middleware, :locale].freeze

Class Method Summary collapse

Class Method Details

.configure {|_self| ... } ⇒ Object

Yields:

  • (_self)

Yield Parameters:



20
21
22
23
# File 'lib/foursquare_next.rb', line 20

def configure
  yield self
  true
end

.filter(tips, term) ⇒ Object



12
13
14
15
16
17
18
# File 'lib/foursquare_next.rb', line 12

def filter(tips, term)
  tip = []
  tips&.items&.each do |check_tip|
    tip << check_tip if check_tip.text.downcase.include? term.downcase
  end
  HashWrapper.new(count: tip.count, items: tip)
end