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.cr

Instance Method Summary

Instance Method Detail

def subscribe(topic, callback, secret = nil) #

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")

[View source]
def subscribe_service_hook(repo, service_name, service_arguments = {} of String => String, secret = nil) #

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" })

[View source]
def unsubscribe(topic, callback) #

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")

[View source]
def unsubscribe_service_hook(repo, service_name) #

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")

[View source]