module Octokit::Client::PubSubHubbub
Overview
Methods for the PubSubHubbub API
Note: The pubsub api requires clients to be OAuth authenticated.
See Also:
Direct including types
Defined in:
octokit/client/pub_sub_hubbub.crInstance Method Summary
-
#subscribe(topic, callback, secret = nil)
Subscribe to a pubsub topic
-
#subscribe_service_hook(repo, service_name, service_arguments = {} of String => String, secret = nil)
Subscribe to a repository through pubsub.
-
#unsubscribe(topic, callback)
Unsubscribe from a pubsub topic
-
#unsubscribe_service_hook(repo, service_name)
Unsubscribe from a repository through pubsub.
Instance Method Detail
Subscribe to a pubsub topic
See Also:
Example:
Subscribe to push events from one of your repositories, having an email sent when fired.
@client = Octokit.client.(oauth_token: "token")
@client.subscribe("https://github.com/watzon/cadmium/events/push", "github://Email?address=chris@watzon.me")
Subscribe to a repository through pubsub.
Note: A list of services is available @ https://github.com/github/github-services/tree/master/docs.
See Also:
Example:
Subscribe to push events to one of your repositories to Travis-CI
@client = Octokit.client.(oauth_token: "token")
@client.subscribe_service_hook("watzon/cadmium", "Travis", { :token => "test", :domain => "domain", :user => "user" })
Unsubscribe from a pubsub topic
See Also:
Example:
Unsubscribe to push events from one of your repositories, no longer having an email sent when fired
@client = Octokit.client(oauth_token: "token")
@client.unsubscribe("https://github.com/watzon/cadmium/events/push", "github://Email?address=chris@watzon.me")
Unsubscribe from a repository through pubsub.
Note: A list of services is available @ https://github.com/github/github-services/tree/master/docs.
See Also:
Example:
Subscribe to push events to one of your repositories to Travis-CI
@client = Octokit.client.(oauth_token: "token")
@client.unsubscribe_service_hook("watzon/cadmium", "Travis")