Build Realtime Apps With The Real-Time Network - the mbed PubNub API+SDK

Dependents:   PubNubDemo Cellular_PubNubDemo lpc4088_ebb_ublox_Cellular_PubNubDemo PubNubDemo_LPC4088 ... more

Fork of PubNub by Petr Baudis

PubNub

The PubNub library enables your mbed board to communicate with the world via the PubNub cloud messaging system.

The library provides a PubNub class that is tied to a particular set of keys and offers methods that correspond to the appropriate API methods - publish, subscribe, history, etc. The JSON encoded messages are passed as raw strings to conserve memory, but at your option, you can use e.g. picojson library to deal with JSON. The API is synchronous - use multiple rtos threads to talk to PubNub on the background.

Getting Started

Can't wait to try it out? Connect your mbed application board and proceed to the demo project:

Import programPubNubDemo

Reference demo of the PubNub library for the mbed application board - control your board over the internet!

Library Usage

Import library

Public Member Functions

PubNub (const char *publish_key, const char *subscribe_key, const char *origin="http://pubsub.pubnub.com")
Init a Pubnub Client context.
PubNubRes publish (const char *channel, const char *message, char **reply=NULL)
Publish API call.
PubNubRes subscribe (const char *channel, char **reply)
Subscribe API call.
PubNubRes history (const char *channel, char **reply, int *replysize, int limit=10)
History API call.
PubNubRes time (char *ts)
Time API call.

History

Merge default tip

2014-11-20, by pasky [Thu, 20 Nov 2014 21:30:10 +0000] rev 8

Merge


Clear the end of string

2014-11-19, by mkilivan [Wed, 19 Nov 2014 21:39:14 +0000] rev 7

Clear the end of string


make the pub nub library more portable by including the required header

2014-05-20, by mazgch [Tue, 20 May 2014 11:43:18 +0000] rev 6

make the pub nub library more portable by including the required header


Updating documentation

2014-03-24, by sam_grove [Mon, 24 Mar 2014 20:06:55 +0000] rev 5

Updating documentation


History example: Add missing \n in printf()

2014-03-02, by pasky [Sun, 02 Mar 2014 01:48:40 +0000] rev 4

History example: Add missing \n in printf()


Documentation: Enclose examples in @code / @endcode

2014-03-02, by pasky [Sun, 02 Mar 2014 01:47:11 +0000] rev 3

Documentation: Enclose examples in @code / @endcode


PubNub(): Remove nonsensicla @return statement

2014-03-02, by pasky [Sun, 02 Mar 2014 01:43:20 +0000] rev 2

PubNub(): Remove nonsensicla @return statement


Move the class description to an outer comment.; ; This might fix docgen.

2014-03-02, by pasky [Sun, 02 Mar 2014 01:41:18 +0000] rev 1

Move the class description to an outer comment.; ; This might fix docgen.


Initial version: Basic working API + short docs with examples. Please refer to PubNubDemo program for a reference usage code.

2014-03-02, by pasky [Sun, 02 Mar 2014 01:32:54 +0000] rev 0

Initial version: Basic working API + short docs with examples. Please refer to PubNubDemo program for a reference usage code.