class Supportify::SupportifyApi

Attributes

api_client[RW]

Public Class Methods

new(api_client = ApiClient.default) click to toggle source
# File lib/supportify_client/api/supportify_api.rb, line 7
def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Public Instance Methods

create_faq(answer, author, question, opts = {}) click to toggle source

Create a new content entry and add it to the application. @param answer The body of the content entry. Can be an answer to a FAQ, a knowledge base entry, or any other type of string. This is a non-encoded string and may contain HTML. @param author The e-mail address of the user that created the content entry. This e-mail address must correspond to a user on your Supportify account. @param question The title of the content entry. Can be a question, a title, or any other type of string. This is a non-encoded string and may contain HTML. @param [Hash] opts the optional parameters @option opts [Array<String>] :categories The categories that the content entry belongs to. @option opts [String] :format The format of the content that has been posted. Currently, the only accepted values are &#39;markdown&#39; and &#39;html&#39;. @option opts [Array<String>] :tags The tags that the content entry belongs to. @return [nil]

# File lib/supportify_client/api/supportify_api.rb, line 230
def create_faq(answer, author, question, opts = {})
  create_faq_with_http_info(answer, author, question, opts)
  return nil
end
create_faq_with_http_info(answer, author, question, opts = {}) click to toggle source

Create a new content entry and add it to the application. @param answer The body of the content entry. Can be an answer to a FAQ, a knowledge base entry, or any other type of string. This is a non-encoded string and may contain HTML. @param author The e-mail address of the user that created the content entry. This e-mail address must correspond to a user on your Supportify account. @param question The title of the content entry. Can be a question, a title, or any other type of string. This is a non-encoded string and may contain HTML. @param [Hash] opts the optional parameters @option opts [Array<String>] :categories The categories that the content entry belongs to. @option opts [String] :format The format of the content that has been posted. Currently, the only accepted values are &#39;markdown&#39; and &#39;html&#39;. @option opts [Array<String>] :tags The tags that the content entry belongs to. @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers

# File lib/supportify_client/api/supportify_api.rb, line 245
def create_faq_with_http_info(answer, author, question, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: SupportifyApi#create_faq ..."
  end
  
  # verify the required parameter 'answer' is set
  fail "Missing the required parameter 'answer' when calling create_faq" if answer.nil?
  
  # verify the required parameter 'author' is set
  fail "Missing the required parameter 'author' when calling create_faq" if author.nil?
  
  # verify the required parameter 'question' is set
  fail "Missing the required parameter 'question' when calling create_faq" if question.nil?
  
  # resource path
  path = "/faqs".sub('{format}','json')

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  _header_accept = ['application/json']
  _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result

  # HTTP header 'Content-Type'
  _header_content_type = ['application/json']
  header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)

  # form parameters
  form_params = {}
  form_params["answer"] = answer
  form_params["author"] = author
  form_params["question"] = question
  form_params["categories"] = @api_client.build_collection_param(opts[:'categories'], :csv) if opts[:'categories']
  form_params["format"] = opts[:'format'] if opts[:'format']
  form_params["tags"] = @api_client.build_collection_param(opts[:'tags'], :csv) if opts[:'tags']

  # http body (model)
  post_body = nil
  

  auth_names = ['api_key', 'app_key']
  data, status_code, headers = @api_client.call_api(:POST, path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: SupportifyApi#create_faq\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_categories(opts = {}) click to toggle source

Returns all categories from the application. @param [Hash] opts the optional parameters @option opts [String] :categories A string expression of the form \&quot;Category 1 AND (Category 2 OR Category 3)\&quot; that will filter for categories attached to content with these categories. @option opts [Integer] :limit The maximum number of entries to return in the collection. @option opts [Integer] :skip The number of entries to skip over when returning the results. @option opts [BOOLEAN] :sort_asc A flag to indicate whether or not the results should be sorted in ascending order. @option opts [String] :sort_by The property by which the results are sorted. @option opts [String] :tags A string expression of the form \&quot;Tag 1 AND (Tag 2 OR Tag 3)\&quot; that will filter for categories attached to content with these tags. @return [Array<Category>]

# File lib/supportify_client/api/supportify_api.rb, line 21
def get_categories(opts = {})
  data, status_code, headers = get_categories_with_http_info(opts)
  return data
end
get_categories_with_http_info(opts = {}) click to toggle source

Returns all categories from the application. @param [Hash] opts the optional parameters @option opts [String] :categories A string expression of the form \&quot;Category 1 AND (Category 2 OR Category 3)\&quot; that will filter for categories attached to content with these categories. @option opts [Integer] :limit The maximum number of entries to return in the collection. @option opts [Integer] :skip The number of entries to skip over when returning the results. @option opts [BOOLEAN] :sort_asc A flag to indicate whether or not the results should be sorted in ascending order. @option opts [String] :sort_by The property by which the results are sorted. @option opts [String] :tags A string expression of the form \&quot;Tag 1 AND (Tag 2 OR Tag 3)\&quot; that will filter for categories attached to content with these tags. @return [Array<(Array<Category>, Fixnum, Hash)>] Array<Category> data, response status code and response headers

# File lib/supportify_client/api/supportify_api.rb, line 36
def get_categories_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: SupportifyApi#get_categories ..."
  end
  
  # resource path
  path = "/categories".sub('{format}','json')

  # query parameters
  query_params = {}
  query_params[:'categories'] = opts[:'categories'] if opts[:'categories']
  query_params[:'limit'] = opts[:'limit'] if opts[:'limit']
  query_params[:'skip'] = opts[:'skip'] if opts[:'skip']
  query_params[:'sort_asc'] = opts[:'sort_asc'] if opts[:'sort_asc']
  query_params[:'sort_by'] = opts[:'sort_by'] if opts[:'sort_by']
  query_params[:'tags'] = opts[:'tags'] if opts[:'tags']

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  _header_accept = ['application/json']
  _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result

  # HTTP header 'Content-Type'
  _header_content_type = ['application/json']
  header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  

  auth_names = ['api_key', 'app_key']
  data, status_code, headers = @api_client.call_api(:GET, path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'Array<Category>')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: SupportifyApi#get_categories\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_category_by_id(id, opts = {}) click to toggle source

Returns a category based on a single ID. @param id ID of category to fetch @param [Hash] opts the optional parameters @return [Category]

# File lib/supportify_client/api/supportify_api.rb, line 90
def get_category_by_id(id, opts = {})
  data, status_code, headers = get_category_by_id_with_http_info(id, opts)
  return data
end
get_category_by_id_with_http_info(id, opts = {}) click to toggle source

Returns a category based on a single ID. @param id ID of category to fetch @param [Hash] opts the optional parameters @return [Array<(Category, Fixnum, Hash)>] Category data, response status code and response headers

# File lib/supportify_client/api/supportify_api.rb, line 100
def get_category_by_id_with_http_info(id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: SupportifyApi#get_category_by_id ..."
  end
  
  # verify the required parameter 'id' is set
  fail "Missing the required parameter 'id' when calling get_category_by_id" if id.nil?
  
  # resource path
  path = "/categories/{id}".sub('{format}','json').sub('{' + 'id' + '}', id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  _header_accept = ['application/json']
  _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result

  # HTTP header 'Content-Type'
  _header_content_type = ['application/json']
  header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  

  auth_names = ['api_key', 'app_key']
  data, status_code, headers = @api_client.call_api(:GET, path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'Category')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: SupportifyApi#get_category_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_faq_by_id(id, opts = {}) click to toggle source

Returns a content entry based on a single ID. @param id ID of the content entry to fetch. @param [Hash] opts the optional parameters @return [Faq]

# File lib/supportify_client/api/supportify_api.rb, line 307
def get_faq_by_id(id, opts = {})
  data, status_code, headers = get_faq_by_id_with_http_info(id, opts)
  return data
end
get_faq_by_id_with_http_info(id, opts = {}) click to toggle source

Returns a content entry based on a single ID. @param id ID of the content entry to fetch. @param [Hash] opts the optional parameters @return [Array<(Faq, Fixnum, Hash)>] Faq data, response status code and response headers

# File lib/supportify_client/api/supportify_api.rb, line 317
def get_faq_by_id_with_http_info(id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: SupportifyApi#get_faq_by_id ..."
  end
  
  # verify the required parameter 'id' is set
  fail "Missing the required parameter 'id' when calling get_faq_by_id" if id.nil?
  
  # resource path
  path = "/faqs/{id}".sub('{format}','json').sub('{' + 'id' + '}', id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  _header_accept = ['application/json']
  _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result

  # HTTP header 'Content-Type'
  _header_content_type = ['application/json']
  header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  

  auth_names = ['api_key', 'app_key']
  data, status_code, headers = @api_client.call_api(:GET, path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'Faq')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: SupportifyApi#get_faq_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_faqs(opts = {}) click to toggle source

Returns all content entries from the application. @param [Hash] opts the optional parameters @option opts [String] :categories A string expression of the form \&quot;Category 1 AND (Category 2 OR Category 3)\&quot; that will filter for content with these categories. @option opts [Integer] :limit The maximum number of entries to return in the collection. @option opts [Integer] :skip The number of entries to skip over when returning the results. @option opts [BOOLEAN] :sort_asc A flag to indicate whether or not the results should be sorted in ascending order. @option opts [String] :sort_by The property by which the results are sorted. @option opts [String] :tags A string expression of the form \&quot;Tag 1 AND (Tag 2 OR Tag 3)\&quot; that will filter for content with these tags. @return [Array<Faq>]

# File lib/supportify_client/api/supportify_api.rb, line 156
def get_faqs(opts = {})
  data, status_code, headers = get_faqs_with_http_info(opts)
  return data
end
get_faqs_with_http_info(opts = {}) click to toggle source

Returns all content entries from the application. @param [Hash] opts the optional parameters @option opts [String] :categories A string expression of the form \&quot;Category 1 AND (Category 2 OR Category 3)\&quot; that will filter for content with these categories. @option opts [Integer] :limit The maximum number of entries to return in the collection. @option opts [Integer] :skip The number of entries to skip over when returning the results. @option opts [BOOLEAN] :sort_asc A flag to indicate whether or not the results should be sorted in ascending order. @option opts [String] :sort_by The property by which the results are sorted. @option opts [String] :tags A string expression of the form \&quot;Tag 1 AND (Tag 2 OR Tag 3)\&quot; that will filter for content with these tags. @return [Array<(Array<Faq>, Fixnum, Hash)>] Array<Faq> data, response status code and response headers

# File lib/supportify_client/api/supportify_api.rb, line 171
def get_faqs_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: SupportifyApi#get_faqs ..."
  end
  
  # resource path
  path = "/faqs".sub('{format}','json')

  # query parameters
  query_params = {}
  query_params[:'categories'] = opts[:'categories'] if opts[:'categories']
  query_params[:'limit'] = opts[:'limit'] if opts[:'limit']
  query_params[:'skip'] = opts[:'skip'] if opts[:'skip']
  query_params[:'sort_asc'] = opts[:'sort_asc'] if opts[:'sort_asc']
  query_params[:'sort_by'] = opts[:'sort_by'] if opts[:'sort_by']
  query_params[:'tags'] = opts[:'tags'] if opts[:'tags']

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  _header_accept = ['application/json']
  _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result

  # HTTP header 'Content-Type'
  _header_content_type = ['application/json']
  header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  

  auth_names = ['api_key', 'app_key']
  data, status_code, headers = @api_client.call_api(:GET, path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'Array<Faq>')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: SupportifyApi#get_faqs\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_info(opts = {}) click to toggle source

The Info endpoint returns an information object containing details of the application being accessed.nnThis endpoint is mostly used for diagnostic purposes. @param [Hash] opts the optional parameters @return [Info]

# File lib/supportify_client/api/supportify_api.rb, line 433
def get_info(opts = {})
  data, status_code, headers = get_info_with_http_info(opts)
  return data
end
get_info_with_http_info(opts = {}) click to toggle source

The Info endpoint returns an information object containing details of the application being accessed.nnThis endpoint is mostly used for diagnostic purposes. @param [Hash] opts the optional parameters @return [Array<(Info, Fixnum, Hash)>] Info data, response status code and response headers

# File lib/supportify_client/api/supportify_api.rb, line 442
def get_info_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: SupportifyApi#get_info ..."
  end
  
  # resource path
  path = "/info".sub('{format}','json')

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  _header_accept = ['application/json']
  _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result

  # HTTP header 'Content-Type'
  _header_content_type = ['application/json']
  header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  

  auth_names = ['api_key', 'app_key']
  data, status_code, headers = @api_client.call_api(:GET, path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'Info')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: SupportifyApi#get_info\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_tag_by_id(id, opts = {}) click to toggle source

Returns a tag based on a single ID. @param id ID of tag to fetch @param [Hash] opts the optional parameters @return [Tag]

# File lib/supportify_client/api/supportify_api.rb, line 638
def get_tag_by_id(id, opts = {})
  data, status_code, headers = get_tag_by_id_with_http_info(id, opts)
  return data
end
get_tag_by_id_with_http_info(id, opts = {}) click to toggle source

Returns a tag based on a single ID. @param id ID of tag to fetch @param [Hash] opts the optional parameters @return [Array<(Tag, Fixnum, Hash)>] Tag data, response status code and response headers

# File lib/supportify_client/api/supportify_api.rb, line 648
def get_tag_by_id_with_http_info(id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: SupportifyApi#get_tag_by_id ..."
  end
  
  # verify the required parameter 'id' is set
  fail "Missing the required parameter 'id' when calling get_tag_by_id" if id.nil?
  
  # resource path
  path = "/tags/{id}".sub('{format}','json').sub('{' + 'id' + '}', id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  _header_accept = ['application/json']
  _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result

  # HTTP header 'Content-Type'
  _header_content_type = ['application/json']
  header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  

  auth_names = ['api_key', 'app_key']
  data, status_code, headers = @api_client.call_api(:GET, path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'Tag')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: SupportifyApi#get_tag_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_tags(opts = {}) click to toggle source

Returns all tags from the application. @param [Hash] opts the optional parameters @option opts [String] :categories A string expression of the form \&quot;Category 1 AND (Category 2 OR Category 3)\&quot; that will filter for tags attached to content with these categories. @option opts [Integer] :limit The maximum number of entries to return in the collection. @option opts [Integer] :skip The number of entries to skip over when returning the results. @option opts [BOOLEAN] :sort_asc A flag to indicate whether or not the results should be sorted in ascending order. @option opts [String] :sort_by The property by which the results are sorted. @option opts [String] :tags A string expression of the form \&quot;Tag 1 AND (Tag 2 OR Tag 3)\&quot; that will filter for tags attached to content with these tags. @return [Array<Tag>]

# File lib/supportify_client/api/supportify_api.rb, line 569
def get_tags(opts = {})
  data, status_code, headers = get_tags_with_http_info(opts)
  return data
end
get_tags_with_http_info(opts = {}) click to toggle source

Returns all tags from the application. @param [Hash] opts the optional parameters @option opts [String] :categories A string expression of the form \&quot;Category 1 AND (Category 2 OR Category 3)\&quot; that will filter for tags attached to content with these categories. @option opts [Integer] :limit The maximum number of entries to return in the collection. @option opts [Integer] :skip The number of entries to skip over when returning the results. @option opts [BOOLEAN] :sort_asc A flag to indicate whether or not the results should be sorted in ascending order. @option opts [String] :sort_by The property by which the results are sorted. @option opts [String] :tags A string expression of the form \&quot;Tag 1 AND (Tag 2 OR Tag 3)\&quot; that will filter for tags attached to content with these tags. @return [Array<(Array<Tag>, Fixnum, Hash)>] Array<Tag> data, response status code and response headers

# File lib/supportify_client/api/supportify_api.rb, line 584
def get_tags_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: SupportifyApi#get_tags ..."
  end
  
  # resource path
  path = "/tags".sub('{format}','json')

  # query parameters
  query_params = {}
  query_params[:'categories'] = opts[:'categories'] if opts[:'categories']
  query_params[:'limit'] = opts[:'limit'] if opts[:'limit']
  query_params[:'skip'] = opts[:'skip'] if opts[:'skip']
  query_params[:'sort_asc'] = opts[:'sort_asc'] if opts[:'sort_asc']
  query_params[:'sort_by'] = opts[:'sort_by'] if opts[:'sort_by']
  query_params[:'tags'] = opts[:'tags'] if opts[:'tags']

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  _header_accept = ['application/json']
  _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result

  # HTTP header 'Content-Type'
  _header_content_type = ['application/json']
  header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  

  auth_names = ['api_key', 'app_key']
  data, status_code, headers = @api_client.call_api(:GET, path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'Array<Tag>')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: SupportifyApi#get_tags\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
search_with_http_info(query, opts = {}) click to toggle source

Search for a collection of content entries that match the supplied query. @param query The string to match the content entry against. @param [Hash] opts the optional parameters @option opts [String] :categories A string expression of the form \&quot;Category 1 AND (Category 2 OR Category 3)\&quot; that will filter for content with these categories. @option opts [Integer] :limit The maximum number of entries to return in the collection. @option opts [Integer] :skip The number of entries to skip over when returning the results. @option opts [String] :tags A string expression of the form \&quot;Tag 1 AND (Tag 2 OR Tag 3)\&quot; that will filter for content with these tags. @return [Array<(Array<Faq>, Fixnum, Hash)>] Array<Faq> data, response status code and response headers

# File lib/supportify_client/api/supportify_api.rb, line 508
def search_with_http_info(query, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: SupportifyApi#search ..."
  end
  
  # verify the required parameter 'query' is set
  fail "Missing the required parameter 'query' when calling search" if query.nil?
  
  # resource path
  path = "/search".sub('{format}','json')

  # query parameters
  query_params = {}
  query_params[:'query'] = query
  query_params[:'categories'] = opts[:'categories'] if opts[:'categories']
  query_params[:'limit'] = opts[:'limit'] if opts[:'limit']
  query_params[:'skip'] = opts[:'skip'] if opts[:'skip']
  query_params[:'tags'] = opts[:'tags'] if opts[:'tags']

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  _header_accept = ['application/json']
  _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result

  # HTTP header 'Content-Type'
  _header_content_type = ['application/json']
  header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  

  auth_names = ['api_key', 'app_key']
  data, status_code, headers = @api_client.call_api(:GET, path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'Array<Faq>')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: SupportifyApi#search\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
vote_on_faq(id, vote, opts = {}) click to toggle source

Record a vote for a content entry. @param id ID of the content entry to record the vote for. @param vote The direction of the vote to be recorded. Currently, the only accepted values are &#39;up&#39; and &#39;down&#39;. @param [Hash] opts the optional parameters @return [nil]

# File lib/supportify_client/api/supportify_api.rb, line 369
def vote_on_faq(id, vote, opts = {})
  vote_on_faq_with_http_info(id, vote, opts)
  return nil
end
vote_on_faq_with_http_info(id, vote, opts = {}) click to toggle source

Record a vote for a content entry. @param id ID of the content entry to record the vote for. @param vote The direction of the vote to be recorded. Currently, the only accepted values are &#39;up&#39; and &#39;down&#39;. @param [Hash] opts the optional parameters @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers

# File lib/supportify_client/api/supportify_api.rb, line 380
def vote_on_faq_with_http_info(id, vote, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: SupportifyApi#vote_on_faq ..."
  end
  
  # verify the required parameter 'id' is set
  fail "Missing the required parameter 'id' when calling vote_on_faq" if id.nil?
  
  # verify the required parameter 'vote' is set
  fail "Missing the required parameter 'vote' when calling vote_on_faq" if vote.nil?
  
  # resource path
  path = "/faqs/{id}".sub('{format}','json').sub('{' + 'id' + '}', id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  _header_accept = ['application/json']
  _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result

  # HTTP header 'Content-Type'
  _header_content_type = ['application/json']
  header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)

  # form parameters
  form_params = {}
  form_params["vote"] = vote

  # http body (model)
  post_body = nil
  

  auth_names = ['api_key', 'app_key']
  data, status_code, headers = @api_client.call_api(:POST, path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: SupportifyApi#vote_on_faq\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end