Module: ESPN::Request

Included in:
Client
Defined in:
lib/espn/request.rb

Overview

Public: Make the request magic happen. This module gets included and only exposes one method to the public interface: #get.

Examples

class Client
  include ESPN::Request
end

Instance Method Summary collapse

Instance Method Details

#get(pattern, opts = {}) ⇒ Object

Public: Make an HTTP GET Request to the path, passing the opts as params in the query.

pattern - A String to build a URL from. opts - A Hash to send as query parameters (default: {}).

Returns a String.



24
25
26
27
# File 'lib/espn/request.rb', line 24

def get(pattern, opts={})
  path = build_url(pattern, opts)
  request(:get, path, opts)
end