Module: Yelpify

Defined in:
lib/yelpify.rb,
lib/yelpify/utils.rb,
lib/yelpify/client.rb,
lib/yelpify/search.rb,
lib/yelpify/version.rb,
lib/yelpify/business.rb,
lib/yelpify/authorization.rb,
lib/yelpify/errors/invalid_credentials.rb

Defined Under Namespace

Classes: Authorization, Business, Client, InvalidCredentials, Search, Utils

Constant Summary collapse

VERSION =
"0.0.2"

Class Method Summary collapse

Class Method Details

.create_new(oauth_data = {}) ⇒ Object



18
19
20
21
22
23
24
25
26
# File 'lib/yelpify.rb', line 18

def self.create_new(oauth_data={})
  raise "No OAuth data!" if oauth_data.empty?
  
  search   = Yelpify::Search.new
  business = Yelpify::Business.new
  token    = Yelpify::Authorization.new(oauth_data)

  Yelpify::Client.new(token.access_token, search, business)
end