public class Notify extends TaskclusterRequestHandler
The notification service, typically available at notify.taskcluster.net
listens for tasks with associated notifications and handles requests to send emails and post pulse messages.
Modifier and Type | Field and Description |
---|---|
protected static String |
defaultBaseURL |
Constructor and Description |
---|
Notify() |
Notify(Credentials credentials) |
Notify(Credentials credentials,
String baseURL) |
Notify(String baseURL) |
Notify(String clientId,
String accessToken) |
Notify(String clientId,
String accessToken,
String certificate) |
Modifier and Type | Method and Description |
---|---|
CallSummary<SendEmailRequest,EmptyPayload> |
email(SendEmailRequest payload)
Send an email to
address . |
CallSummary<Object,EmptyPayload> |
irc(Object payload)
Post a message on IRC to a specific channel or user, or a specific user on a specific channel.
|
CallSummary<EmptyPayload,EmptyPayload> |
ping()
Respond without doing anything.
|
CallSummary<PostPulseMessageRequest,EmptyPayload> |
pulse(PostPulseMessageRequest payload)
Publish a message on pulse with the given
routingKey . |
apiCall, setBaseURL, uriEncode
protected static final String defaultBaseURL
public Notify(Credentials credentials)
public Notify(Credentials credentials, String baseURL)
public Notify(String baseURL)
public Notify()
public CallSummary<EmptyPayload,EmptyPayload> ping() throws APICallFailure
Respond without doing anything. This endpoint is used to check that the service is up.
APICallFailure
public CallSummary<SendEmailRequest,EmptyPayload> email(SendEmailRequest payload) throws APICallFailure
Send an email to address
. The content is markdown and will be rendered to HTML, but both the HTML and raw markdown text will be sent in the email. If a link is included, it will be rendered to a nice button in the HTML version of the email
Required scopes: notify:email:
APICallFailure
public CallSummary<PostPulseMessageRequest,EmptyPayload> pulse(PostPulseMessageRequest payload) throws APICallFailure
Publish a message on pulse with the given routingKey
.
Required scopes: notify:pulse:
APICallFailure
public CallSummary<Object,EmptyPayload> irc(Object payload) throws APICallFailure
Post a message on IRC to a specific channel or user, or a specific user on a specific channel.
Success of this API method does not imply the message was successfully posted. This API method merely inserts the IRC message into a queue that will be processed by a background process. This allows us to re-send the message in face of connection issues.
However, if the user isn’t online the message will be dropped without error. We maybe improve this behavior in the future. For now just keep in mind that IRC is a best-effort service.
Required scopes: If channelRequest: notify:irc-channel:
APICallFailure
Copyright © 2014–2018 Mozilla. All rights reserved.