lib/john_stamos/client.rb in john_stamos-0.0.2 vs lib/john_stamos/client.rb in john_stamos-0.0.3

- old
+ new

@@ -1,7 +1,5 @@ -require 'logger' - class JohnStamos::Client attr_accessor :proxy def initialize(options={}) default_options = { proxy: nil } @@ -34,10 +32,12 @@ response = make_json_request(url, params) JSON.parse(response) end + + private def make_request(url, params={}, accept_json=false) request_headers = build_request_headers(accept_json) response = pinterest_connection.get do |req| @@ -63,10 +63,10 @@ headers end def pinterest_connection - pinterest_url = 'http://pinterest.com' + pinterest_url = 'http://www.pinterest.com' @pinterest_connection ||= @proxy.nil? ? Faraday.new(url: pinterest_url) : Faraday.new(url: pinterest_url, proxy: @proxy) end end \ No newline at end of file