Skip to content
Leonardo Monteiro edited this page Nov 28, 2015 · 12 revisions

The Buzz Interface

Include

  • #include <buzz.h>

Definitions

  • BUZZ(obj) - converts (by type casting) the object into buzz interface object.

Objects

  • buzz - is the main object that defines the interface implementations.

Functions:

  • buzz* buzz_create_default(buzzData *bzdata) - just creates a valid, but dummy, buzz interface implementation. bzdata must be a pointer to a buzzData object. The function returns a pointer to a buzz object.

  • void buzz_collect(buzz *bz); - after configured the buzzData and buzz it self, this function starts the real search or streaming from web.

  • void buzz_write_config(buzz *bz, buzzValue_t* bzvalue) - write a configuration value.

  • buzzValue_t* buzz_read_config(buzz *bz, const char* key) - read the value of key configuration. Returns a pointer for a buzzValue.

  • const char* buzz_name(buzz *bz) - Returns the name of buzz implementation.

  • const char* buzz_data_name(buzz *bz) - Returns the name of buzzData implementation for the bz object.

Implementations


Twitter

Definitions

  • BUZZ_TWITTER(obj) - converts (by type casting) the object into buzzTwitter object.

Objects

  • buzzTwitter - is the main object that defines the twitter interface implementations.

Functions:

buzzTwitter* buzz_create_twitter(buzzData *bzdata) - creates a buzzTwitter interface implementation. bzdata must be a pointer to a buzzData object. The function returns a pointer to a buzzTwitter object.

Configuration

Key Type Required Description
twitter_consumer_key String yes The consumer key from dev.twitter.com
twitter_consumer_secret String yes The consumer secret from dev.twitter.com
twitter_token String yes The application token from dev.twitter.com
twitter_token_secret String yes The application secret from dev.twitter.com
twitter_keywords String no A comma separated list of words used in twitter API search
twitter_filter String no A custom regex filter applied after twitter_keywords
twitter_language String no A comma separated list of languages used in search
twitter_collect String no A comma/semicolon separated list of data field and your related json field.

Facebook