IBM Watson: Language TranslatorTranslate and publish text in 11 languages.
Hello WorldSimple "Hello World" always delivers { "hello" : "world" }
SendGrid: Transactional EmailSend transactional emails triggered by user action.
IBM Watson: Text-to-SpeechConvert message text to audible speech.
Plot Outliers on GraphDetects outliers and highlights them on a realtime graph.
Giphy: Gif ChatAdd fun gifs to chat messages using the Giphy API.
Vote CounterVote counter block lets people cast their vote in an ...
IBM Watson: Sentiment and Context AnalysisAnalyze text for sentiment, emotion, language and more.
RingCentral: Offline NotifierNotify offline chat users via realtime SMS alerts.
Falkonry AI: Machine Learning for Condition IdentificationAutomate and interpret data from industrial activity and IT processes. // send a message
pubnub.publish({
channel: 'chatChannel',
message: { foo : 'bar' }
}, function ( status, response ) {
console.log( status.error, response )
})Dictionary<string, string> sendMessage = new Dictionary<string, string>();
sendMessage.Add("foo", "bar");
pubnub.Publish<string>(
channel:"chatChannel",
message: sendMessage,
userCallback: DisplayPublishReturnMessage,
errorCallback: DisplayErrorMessage);- (void)client:(PubNub *)client didReceiveStatus:(PNStatus *)status {
if (status.operation == PNSubscribeOperation && status.category == PNConnectedCategory) {
[self.client publish: @{@"foo": @"bar"} toChannel: @"chatChannel"
withCompletion:^(PNPublishStatus *publishStatus) {
if (!publishStatus.isError) {
NSLog(@"Published!");
}
else {
NSLog(@"Publish did fail with error: %@",
status.errorData.data?: status.errorData.information);
}
}];
}
}func client(client: PubNub, didReceiveStatus status: PNStatus) {
if status.operation == .SubscribeOperation && status.category == .PNConnectedCategory {
client.publish(["foo": "bar"], toChannel: "chatChannel",
withCompletion: { (publishStatus) in
if !publishStatus.error {
print("Published!")
}
else {
print("Publish did fail with error: \(status.errorData.data ?? status.errorData.information)")
}
})
}
}Map message = new HashMap();
message.put("foo", "bar");
pubnub.publish()
.channel("chatChannel")
.message(message)
.async(new PNCallback<PNPublishResult>() {
@Override
public void onResponse(PNPublishResult result, PNStatus status) {
if (status.isError()) {
System.out.println(status);
} else {
System.out.println("Published!");
}
}
});export default request => {
request.message.hello = 'world!'
return request.ok()
}// receive a message
pubnub.subscribe({ channels: ['chatChannel'] })
pubnub.addListener({
message: function (message) {
console.log(message)
}
})pubnub.Subscribe<string>(
channel: "chatChannel",
subscribeCallback: (result) => { Console.WriteLine(result); },
connectCallback: DisplaySubscribeConnectStatusMessage,
errorCallback: DisplayErrorMessage);[self.client addListener:self];
[self.client subscribeToChannels: @[@"chatChannel"] withPresence:NO];
- (void)client:(PubNub *)client didReceiveMessage:(PNMessageResult *)message {
NSLog(@"%@", message.data.message);
}client.addListener(self)
client.subscribeToChannels(["chatChannel"], withPresence: false)
func client(client: PubNub, didReceiveMessage message: PNMessageResult) {
print("\(message.data.message)")
}pubnub.addListener(new SubscribeCallback() {
@Override
public void message(PubNub pubnub, PNMessageResult message) {
System.out.println(message);
}
});The PubNub Data Stream Network powers low-latency secure messaging on every device, at massive scale.
PubNub BLOCKS makes the network programmable, executing your application logic on data as it passes over the network, removing the need to deploy and scale app servers.