Class: PodcastIndex::Api::Search

Inherits:
Object
  • Object
show all
Extended by:
Request
Defined in:
lib/podcast_index/api/search.rb

Class Method Summary collapse

Methods included from Request

get

Class Method Details

.by_person(person:, fulltext: nil, max: nil) ⇒ Object



20
21
22
23
# File 'lib/podcast_index/api/search.rb', line 20

def by_person(person:, fulltext: nil, max: nil)
  response = get("/search/byperson", q: person, fulltext: fulltext, max: max)
  JSON.parse(response.body)
end

.by_term(term:, val: nil, aponly: nil, clean: nil, fulltext: nil, max: nil) ⇒ Object



8
9
10
11
12
# File 'lib/podcast_index/api/search.rb', line 8

def by_term(term:, val: nil, aponly: nil, clean: nil, fulltext: nil, max: nil)
  response = get("/search/byterm", q: term, val: val, aponly: aponly, clean: clean, fulltext: fulltext,
                                   max: max)
  JSON.parse(response.body)
end

.by_title(title:, val: nil, clean: nil, fulltext: nil, similar: nil, max: nil) ⇒ Object



14
15
16
17
18
# File 'lib/podcast_index/api/search.rb', line 14

def by_title(title:, val: nil, clean: nil, fulltext: nil, similar: nil, max: nil)
  response = get("/search/bytitle", q: title, val: val, clean: clean, fulltext: fulltext, similar: similar,
                                    max: max)
  JSON.parse(response.body)
end

.music_by_term(term:, val: nil, aponly: nil, clean: nil, fulltext: nil, max: nil) ⇒ Object



25
26
27
28
29
# File 'lib/podcast_index/api/search.rb', line 25

def music_by_term(term:, val: nil, aponly: nil, clean: nil, fulltext: nil, max: nil)
  response = get("/search/music/byterm", q: term, val: val, aponly: aponly, clean: clean, fulltext: fulltext,
                                         max: max)
  JSON.parse(response.body)
end