Sha256: 9e75c5e679dbe7397b9b88b218be6bf53bdf6a5f651da609b02cfb82c4c04108

Contents?: true

Size: 351 Bytes

Versions: 4

Compression:

Stored size: 351 Bytes

Contents

require 'httparty'

module Socialinvestigator
  module Client
    class Hn
      include HTTParty
      base_uri 'https://hn.algolia.com/api/v1/'

      def search_by_date( query, tags = nil )
        params = {query: query }
        params[:tags] = tags if tags
        self.class.get '/search_by_date', { query: params }
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
socialinvestigator-0.0.6 lib/socialinvestigator/client/hn.rb
socialinvestigator-0.0.4 lib/socialinvestigator/client/hn.rb
socialinvestigator-0.0.3 lib/socialinvestigator/client/hn.rb
socialinvestigator-0.0.1 lib/socialinvestigator/client/hn.rb