class PubSubHubbub::Subscriber

Defined in:

pubsubhubbub/subscriber.cr

Constructors

Class Method Summary

Instance Method Summary

Constructor Detail

def self.new(topic : String, secret : Nil | String = nil) #

[View source]

Class Method Detail

def self.emit(subscriber : Subscriber, event : Event, data : String | Nil = nil) #

Send signal to call functions attached to corresponding Event


[View source]
def self.hooks #

[View source]
def self.on(event : Event, &block : Subscriber, String -> ) #

Attach a block (function) to a specific 'Event', when the event occurs, the function will be called.


[View source]

Instance Method Detail

def challenge_verification(params : HTTP::Params) #

Check if hub.challenge exists and return them.


[View source]
def check_signature(signature : String, body : String | Nil) #

Recompute the SHA1 signature with the shared secret using the same method as the hub.


[View source]
def emit(event : Event, data : String | Nil = nil) #

[View source]
def secret : String | Nil #

[View source]
def secret=(secret : String | Nil) #

[View source]
def subscribe #

[View source]
def topic : String #

[View source]
def topic=(topic : String) #

[View source]
def unsubscribe #

[View source]