Class: Myflickr::Query

Inherits:
Object
  • Object
show all
Defined in:
lib/myflickr/query.rb

Overview

:nodoc:

Class Method Summary collapse

Class Method Details

.api_call(method, resource_uri = '') ⇒ Object

:nodoc:



3
4
5
6
7
8
9
# File 'lib/myflickr/query.rb', line 3

def self.api_call(method, resource_uri='') #:nodoc:
  resource = "#{API_BASE}/?method=#{method}&api_key=#{API_KEY}&user_id=#{USER_ID}"
  resource += "&#{resource_uri}" unless resource_uri.empty?
  
  # Create a Hpricot object
  Hpricot.XML(open(resource).read)
end