=begin #CMS Site Search #Use these endpoints for searching content on your HubSpot hosted CMS website(s). The version of the OpenAPI document: v3 Generated by: https://openapi-generator.tech OpenAPI Generator version: 4.3.1 =end require 'spec_helper' require 'json' # Unit tests for Hubspot::Cms::SiteSearch::PublicApi # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe 'PublicApi' do before do # run before each test @api_instance = Hubspot::Cms::SiteSearch::PublicApi.new end after do # run after each test end describe 'test an instance of PublicApi' do it 'should create an instance of PublicApi' do expect(@api_instance).to be_instance_of(Hubspot::Cms::SiteSearch::PublicApi) end end # unit tests for get_by_id # Get indexed properties. # For a given account and document ID (page ID, blog post ID, HubDB row ID, etc.), return all indexed data for that document. This is useful when debugging why a particular document is not returned from a custom search. # @param content_id ID of the target document when searching for indexed properties. # @param [Hash] opts the optional parameters # @option opts [String] :type The type of document. Can be one of `SITE_PAGE`, `BLOG_POST`, or `KNOWLEDGE_ARTICLE`. # @return [IndexedData] describe 'get_by_id test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for search # Search your site. # Returns any website content matching the given search criteria for a given HubSpot account. Searches can be filtered by content type, domain, or URL path. # @param [Hash] opts the optional parameters # @option opts [String] :q The term to search for. # @option opts [Integer] :limit Specifies the number of results to be returned in a single response. Defaults to `10`. Maximum value is `100`. # @option opts [Integer] :offset Used to page through the results. If there are more results than specified by the `limit` parameter, you will need to use the value of offset returned in the previous request to get the next set of results. # @option opts [String] :language Specifies the language of content to be searched. This value must be a valid [ISO 639-1 language code](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) (e.g. `es` for Spanish) # @option opts [Boolean] :match_prefix Inverts the behavior of the pathPrefix filter when set to `false`. Defaults to `true`. # @option opts [Boolean] :autocomplete Specifies whether or not you are showing autocomplete results. Defaults to false. # @option opts [Float] :popularity_boost Specifies how strongly a result is boosted based on its view count. Defaults to 1.0. # @option opts [Float] :boost_limit Specifies the maximum amount a result will be boosted based on its view count. Defaults to 5.0. Read more about elasticsearch boosting [here](https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping-boost.html). # @option opts [String] :boost_recent Specifies a relative time window where scores of documents published outside this time window decay. This can only be used for blog posts. For example, boostRecent=10d will boost documents published within the last 10 days. Supported timeunits are ms (milliseconds), s (seconds), m (minutes), h (hours), d (days). # @option opts [Integer] :table_id Specifies a specific HubDB table to search. Only returns results from the specified table. Can be used in tandem with the `hubdbQuery` parameter to further filter results. # @option opts [String] :hubdb_query Specify a HubDB query to further filter the search results. # @option opts [Array] :domain A domain to match search results for. Multiple domains can be provided with &. # @option opts [Array] :type Specifies the type of content to search. Can be one or more of SITE_PAGE, LANDING_PAGE, BLOG_POST, LISTING_PAGE, and KNOWLEDGE_ARTICLE. Defaults to all content types except LANDING_PAGE and KNOWLEDGE_ARTICLE # @option opts [Array] :path_prefix Specifies a path prefix to filter search results. Will only return results with URL paths that start with the specified parameter. Can be used multiple times. # @option opts [Array] :property Specifies which properties to include in the search. Options include `title`, `description`, and `html`. All properties will be searched by default. # @option opts [String] :length Specifies the length of the search results. Can be set to `LONG` or `SHORT`. `SHORT` will return the first 128 characters of the content's meta description. `LONG` will build a more detailed content snippet based on the html/content of the page. # @option opts [Array] :group_id Specifies which blog(s) to be searched by blog ID. Can be used multiple times to search more than one blog. # @return [PublicSearchResults] describe 'search test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end end