Module: Feedlr::Gateway::Search

Included in:
Client
Defined in:
lib/feedlr/gateway/search.rb

Overview

Search API

Instance Method Summary collapse

Instance Method Details

#search_feeds(query, options = {}) ⇒ Feedlr::Base

Find feeds based on title , url or #topic

Parameters:

  • query (String)
  • options (Hash) (defaults to: {})

Options Hash (options):

  • :n (String)

    number of results. default value is 20

  • :locale (String)

    hint the search engine to return feeds in that locale (e.g. "pt" , "fr_FR")

Returns:

See Also:



16
17
18
# File 'lib/feedlr/gateway/search.rb', line 16

def search_feeds(query , options = {})
  build_object(:get , '/search/feeds' , { q: query }.merge(options))
end

#search_stream(stream_id, query, options = {}) ⇒ Feedlr::Base

Search the content of a stream (Pro only)

Parameters:

  • stream_id (String)
  • query (String)
  • options (Hash) (defaults to: {})

Options Hash (options):

  • :count (String)

    number of entries to return

  • :newerThan (String)

    timestamp in ms

  • :continuation (String)

    a continuation id is used to page through the content

  • :unreadOnly (String)

    boolean , default is false

  • :fields (String)

    a comma-separated list of fields

  • :minMatches (String)

    minimum number of search terms to match before

Returns:

See Also:



35
36
37
38
# File 'lib/feedlr/gateway/search.rb', line 35

def search_stream(stream_id , query , options = {})
  build_object(:get , '/search/contents',
               { q: query , streamId: stream_id }.merge(options))
end