Class: Yext::Api::Powerlistings::ListingController

Inherits:
ApplicationController show all
Extended by:
Memoist
Defined in:
app/controllers/yext/api/powerlistings/listing_controller.rb

Overview

:webhooks:

:listing:
  :endpoint: https://[your_hostname]/[your_listings_webhook_path]
  :default_version: 20161012
  :documentation: http://developer.yext.com/docs/webhooks/#operation/listingsWebhook
  :sandbox_only: false

Instance Method Summary collapse

Instance Method Details

#createObject



23
24
25
26
27
28
29
30
31
32
33
# File 'app/controllers/yext/api/powerlistings/listing_controller.rb', line 23

def create
  listing = Yext::Api::KnowledgeApi::Powerlistings::Listing.new(listing_hash[:listing])

  ActiveSupport::Notifications.instrument "listing.powerlistings.yext",
                                          meta:    listing_hash[:meta],
                                          listing: listing do
    # do your custom stuff here
  end

  head :ok
end