class ShareNotify::NotificationQueryService
Queries the SHARE search api for an existing record. This assumes the class into which this module is included responds to url and that in turn is mapped to the docID of the Share document that was originally uploaded via the SHARE push API
.
Attributes
context[R]
Public Class Methods
new(context)
click to toggle source
# File lib/share_notify/notification_query_service.rb, line 10 def initialize(context) self.context = context end
Public Instance Methods
Private Instance Methods
api()
click to toggle source
# File lib/share_notify/notification_query_service.rb, line 27 def api ShareNotify::API.new end
context=(input)
click to toggle source
# File lib/share_notify/notification_query_service.rb, line 33 def context=(input) raise ShareNotify::InitializationError.new(input, [:url]) unless input.respond_to?(:url) @context = input end
search(string)
click to toggle source
# File lib/share_notify/notification_query_service.rb, line 23 def search(string) ShareNotify::SearchResponse.new(api.search(string)) end