Skip to content

Latest commit

 

History

History
151 lines (106 loc) · 4.66 KB

File metadata and controls

151 lines (106 loc) · 4.66 KB

RankVectors::WebhooksApi

All URIs are relative to https://api.rankvectors.com

Method HTTP request Description
get_implementation_instructions GET /api/webhook/implement-link Get implementation instructions
report_implementation_status POST /api/webhook/implement-link Report implementation status

get_implementation_instructions

get_implementation_instructions(suggestion_id)

Get implementation instructions

Get step-by-step instructions for implementing a link

Examples

require 'time'
require 'rankvectors'
# setup authorization
RankVectors.configure do |config|
  # Configure API key authorization: ApiKeyAuth
  config.api_key['Authorization'] = 'YOUR API KEY'
  # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
  # config.api_key_prefix['Authorization'] = 'Bearer'
end

api_instance = RankVectors::WebhooksApi.new
suggestion_id = 'sugg-123' # String | ID of the suggestion to implement

begin
  # Get implementation instructions
  result = api_instance.get_implementation_instructions(suggestion_id)
  p result
rescue RankVectors::ApiError => e
  puts "Error when calling WebhooksApi->get_implementation_instructions: #{e}"
end

Using the get_implementation_instructions_with_http_info variant

This returns an Array which contains the response data, status code and headers.

<Array(, Integer, Hash)> get_implementation_instructions_with_http_info(suggestion_id)

begin
  # Get implementation instructions
  data, status_code, headers = api_instance.get_implementation_instructions_with_http_info(suggestion_id)
  p status_code # => 2xx
  p headers # => { ... }
  p data # => <ImplementationInstructions>
rescue RankVectors::ApiError => e
  puts "Error when calling WebhooksApi->get_implementation_instructions_with_http_info: #{e}"
end

Parameters

Name Type Description Notes
suggestion_id String ID of the suggestion to implement

Return type

ImplementationInstructions

Authorization

ApiKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

report_implementation_status

report_implementation_status(report_implementation_status_request)

Report implementation status

Report the status of a link implementation

Examples

require 'time'
require 'rankvectors'
# setup authorization
RankVectors.configure do |config|
  # Configure API key authorization: ApiKeyAuth
  config.api_key['Authorization'] = 'YOUR API KEY'
  # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
  # config.api_key_prefix['Authorization'] = 'Bearer'
end

api_instance = RankVectors::WebhooksApi.new
report_implementation_status_request = RankVectors::ReportImplementationStatusRequest.new({suggestion_id: 'sugg-123', api_key: 'rv_1234567890abcdef', status: 'success'}) # ReportImplementationStatusRequest | 

begin
  # Report implementation status
  result = api_instance.report_implementation_status(report_implementation_status_request)
  p result
rescue RankVectors::ApiError => e
  puts "Error when calling WebhooksApi->report_implementation_status: #{e}"
end

Using the report_implementation_status_with_http_info variant

This returns an Array which contains the response data, status code and headers.

<Array(, Integer, Hash)> report_implementation_status_with_http_info(report_implementation_status_request)

begin
  # Report implementation status
  data, status_code, headers = api_instance.report_implementation_status_with_http_info(report_implementation_status_request)
  p status_code # => 2xx
  p headers # => { ... }
  p data # => <ReportImplementationStatus200Response>
rescue RankVectors::ApiError => e
  puts "Error when calling WebhooksApi->report_implementation_status_with_http_info: #{e}"
end

Parameters

Name Type Description Notes
report_implementation_status_request ReportImplementationStatusRequest

Return type

ReportImplementationStatus200Response

Authorization

ApiKeyAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json