Sha256: f38c22e5086ffd930e5a66c3b532bec38fb81749f6e103f560373b67d5d81b29

Contents?: true

Size: 382 Bytes

Versions: 9

Compression:

Stored size: 382 Bytes

Contents

module WhosDatedWho
  class Client
    def fetch(name)
      bing_results = BingClient.new.search("#{name} site:dating.famousfix.com")
      url = bing_results.first[:Web].first[:Url]
      resp = Faraday.get(url)
      if resp.success?
        Parser.new.parse(resp.body)
      end
    end

    private
    def normalize(name)
      name.gsub(/\s/, '-').downcase
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
whos_dated_who-0.3.0 lib/whos_dated_who/client.rb
whos_dated_who-0.2.7 lib/whos_dated_who/client.rb
whos_dated_who-0.2.6 lib/whos_dated_who/client.rb
whos_dated_who-0.2.5 lib/whos_dated_who/client.rb
whos_dated_who-0.2.4 lib/whos_dated_who/client.rb
whos_dated_who-0.2.3 lib/whos_dated_who/client.rb
whos_dated_who-0.2.2 lib/whos_dated_who/client.rb
whos_dated_who-0.2.1 lib/whos_dated_who/client.rb
whos_dated_who-0.2.0 lib/whos_dated_who/client.rb