Module: BWAPI::Client::Projects::PreviewSearch

Included in:
BWAPI::Client::Projects
Defined in:
lib/bwapi/client/projects/preview_search.rb

Overview

PreviewSearch module for projects/projectId/previewsearch endpoints

Instance Method Summary collapse

Instance Method Details

#project_preview_search_author(project_id, opts = {}) ⇒ Hash

Create a project preview search for author

Parameters:

  • project_id (Integer)

    Id of project

  • opts (Hash) (defaults to: {})

    options hash of parameters

Options Hash (opts):

  • author (String)

    The mentions author

  • endDate (String)

    The mentions end date

  • startDate (String)

    The mentions start date

  • exclusionSnippets (Array)

    The array with snippets exclussion

  • languageAgnostic (Boolean)

    The agnostic language

  • languages (Array)

    The query language

  • queryString (String)

    The query string content

  • queryType (String)

    The query type

  • resultsPage (Integer)

    The results page

  • resultsPageSize (Integer)

    The results page size

Returns:

  • (Hash)

    Author



39
40
41
# File 'lib/bwapi/client/projects/preview_search.rb', line 39

def project_preview_search_author(project_id, opts = {})
  post "/projects/#{project_id}/previewsearch/author", opts
end

#project_preview_search_dailymentions(project_id, opts = {}) ⇒ Hash

Create a project preview search for daily mentions

Parameters:

  • project_id (Integer)

    Id of project

  • opts (Hash) (defaults to: {})

    options hash of parameters

Options Hash (opts):

  • day (String)

    The mention day

  • endDate (String)

    The mentions end date

  • startDate (String)

    The mentions start date

  • exclusionSnippets (Array)

    The array with snippets exclussion

  • languageAgnostic (Boolean)

    The agnostic language

  • languages (Array)

    The query language

  • queryString (String)

    The query string content

  • queryType (String)

    The query type

  • resultsPage (Integer)

    The results page

  • resultsPageSize (Integer)

    The results page size

Returns:

  • (Hash)

    Daily mentions



58
59
60
# File 'lib/bwapi/client/projects/preview_search.rb', line 58

def project_preview_search_dailymentions(project_id, opts = {})
  post "/projects/#{project_id}/previewsearch/dailymentions", opts
end

#project_preview_search_history(project_id, opts = {}) ⇒ Hash

Create a project preview search for history tab

Parameters:

  • project_id (Integer)

    Id of project

  • opts (Hash) (defaults to: {})

    options hash of parameters

Options Hash (opts):

  • endDate (String)

    The mentions end date

  • startDate (String)

    The mentions start date

  • exclusionSnippets (Array)

    The array with snippets exclussion

  • languageAgnostic (Boolean)

    The agnostic language

  • languages (Array)

    The query language

  • queryString (String)

    The query string content

  • queryType (String)

    The query type

  • resultsPage (Integer)

    The results page

  • resultsPageSize (Integer)

    The results page size

Returns:

  • (Hash)

    Mentions for history tab



76
77
78
# File 'lib/bwapi/client/projects/preview_search.rb', line 76

def project_preview_search_history(project_id, opts = {})
  post "/projects/#{project_id}/previewsearch/history", opts
end

#project_preview_search_mentions(project_id, opts = {}) ⇒ Hash

Create a project preview search for mentions

Parameters:

  • project_id (Integer)

    Id of project

  • opts (Hash) (defaults to: {})

    options hash of parameters

Options Hash (opts):

  • endDate (String)

    The mentions end date

  • startDate (String)

    The mentions start date

  • exclusionSnippets (Array)

    The array with snippets exclussion

  • languageAgnostic (Boolean)

    The agnostic language

  • languages (Array)

    The query language

  • queryString (String)

    The query string content

  • queryType (String)

    The query type

  • resultsPage (Integer)

    The results page

  • resultsPageSize (Integer)

    The results page size

Returns:

  • (Hash)

    Mentions



20
21
22
# File 'lib/bwapi/client/projects/preview_search.rb', line 20

def project_preview_search_mentions(project_id, opts = {})
  post "/projects/#{project_id}/previewsearch/mentions", opts
end

#project_preview_search_site(project_id, opts = {}) ⇒ Hash

Create a project preview search for site tab

Parameters:

  • project_id (Integer)

    Id of project

  • opts (Hash) (defaults to: {})

    options hash of parameters

Options Hash (opts):

  • endDate (String)

    The mentions end date

  • startDate (String)

    The mentions start date

  • exclusionSnippets (Array)

    The array with snippets exclussion

  • languageAgnostic (Boolean)

    The agnostic language

  • languages (Array)

    The query language

  • queryString (String)

    The query string content

  • queryType (String)

    The query type

  • site (String)

    The site

  • resultsPage (Integer)

    The results page

  • resultsPageSize (Integer)

    The results page size

Returns:

  • (Hash)

    Mentions for site tab



95
96
97
# File 'lib/bwapi/client/projects/preview_search.rb', line 95

def project_preview_search_site(project_id, opts = {})
  post "/projects/#{project_id}/previewsearch/site", opts
end

#project_preview_search_topauthors(project_id, opts = {}) ⇒ Hash

Create a project preview search for top authors

Parameters:

  • project_id (Integer)

    Id of project

  • opts (Hash) (defaults to: {})

    options hash of parameters

Options Hash (opts):

  • endDate (String)

    The mentions end date

  • startDate (String)

    The mentions start date

  • exclusionSnippets (Array)

    The array with snippets exclussion

  • languageAgnostic (Boolean)

    The agnostic language

  • languages (Array)

    The query language

  • queryString (String)

    The query string content

  • queryType (String)

    The query type

Returns:

  • (Hash)

    Mentions for top authors tab



112
113
114
# File 'lib/bwapi/client/projects/preview_search.rb', line 112

def project_preview_search_topauthors(project_id, opts = {})
  post "/projects/#{project_id}/previewsearch/topauthors", opts
end

#project_preview_search_topic(project_id, opts = {}) ⇒ Hash

Create a project preview search for topic

Parameters:

  • project_id (Integer)

    Id of project

  • opts (Hash) (defaults to: {})

    options hash of parameters

Options Hash (opts):

  • author (String)

    The mentions author

  • topic (String)

    The topic

  • endDate (String)

    The mentions end date

  • startDate (String)

    The mentions start date

  • exclusionSnippets (Array)

    The array with snippets exclussion

  • languageAgnostic (Boolean)

    The agnostic language

  • languages (Array)

    The query language

  • queryString (String)

    The query string content

  • queryType (String)

    The query type

  • resultsPage (Integer)

    The results page

  • resultsPageSize (Integer)

    The results page size

Returns:

  • (Hash)

    Topic for topic tab



133
134
135
# File 'lib/bwapi/client/projects/preview_search.rb', line 133

def project_preview_search_topic(project_id, opts = {})
  post "/projects/#{project_id}/previewsearch/topic", opts
end

#project_preview_search_topics(project_id, opts = {}) ⇒ Hash

Create a project preview search for topics

Parameters:

  • project_id (Integer)

    Id of project

  • opts (Hash) (defaults to: {})

    options hash of parameters

Options Hash (opts):

  • endDate (String)

    The mentions end date

  • startDate (String)

    The mentions start date

  • exclusionSnippets (Array)

    The array with snippets exclussion

  • languageAgnostic (Boolean)

    The agnostic language

  • languages (Array)

    The query language

  • queryString (String)

    The query string content

  • queryType (String)

    The query type

Returns:

  • (Hash)

    Topics for topic tab



150
151
152
# File 'lib/bwapi/client/projects/preview_search.rb', line 150

def project_preview_search_topics(project_id, opts = {})
  post "/projects/#{project_id}/previewsearch/topics", opts
end

#project_preview_search_topsites(project_id, opts = {}) ⇒ Hash

Create a project preview search for top sites

Parameters:

  • project_id (Integer)

    Id of project

  • opts (Hash) (defaults to: {})

    options hash of parameters

Options Hash (opts):

  • endDate (String)

    The mentions end date

  • startDate (String)

    The mentions start date

  • exclusionSnippets (Array)

    The array with snippets exclussion

  • languageAgnostic (Boolean)

    The agnostic language

  • languages (Array)

    The query language

  • queryString (String)

    The query string content

  • queryType (String)

    The query type

Returns:

  • (Hash)

    Top sites for topsites tab



168
169
170
# File 'lib/bwapi/client/projects/preview_search.rb', line 168

def project_preview_search_topsites(project_id, opts = {})
  post "/projects/#{project_id}/previewsearch/topsites", opts
end