Class: BleacherApi
- Inherits:
-
Object
- Object
- BleacherApi
- Includes:
- HTTParty
- Defined in:
- lib/bleacher_api.rb,
lib/bleacher_api/gems.rb,
lib/bleacher_api/config.rb
Defined Under Namespace
Modules: Config, Gems Classes: Article, Authenticate, Front, Geolocation, Related, Stream, User
Class Method Summary collapse
Class Method Details
.call(type, path, data = nil, ssl = false) ⇒ Object
15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/bleacher_api.rb', line 15 def call(type, path, data=nil, ssl=false) base_uri BleacherApi::Config.url(nil, ssl) data, old_data = {}, data data[type == :get ? :query : :body] = old_data output = send(type, "/api/#{path}.json", data) if output.code == 200 output else false end end |