net.obxlabs.romefeeder
Class TwitterFeeder

java.lang.Object
  extended by net.obxlabs.romefeeder.Feeder
      extended by net.obxlabs.romefeeder.TwitterFeeder
All Implemented Interfaces:
java.lang.Runnable

public class TwitterFeeder
extends Feeder

Twitter feed manager.

The TwitterFeeder allows to load and update one or multiple twitter feeds by adding util functions to the basic Feeder class.

Author:
Bruno Nadeau

Field Summary
 
Fields inherited from class net.obxlabs.romefeeder.Feeder
postloadEntryCallback, postloadFeedCallback, postupdateFeedCallback, postupdateGlobalCallback, preloadEntryCallback, preloadFeedCallback, preupdateFeedCallback, preupdateGlobalCallback, PUBLISHED_DATE, TITLE, UNSORTED, UPDATED_DATE, verbose
 
Constructor Summary
TwitterFeeder()
          Create an empty Feeder.
 
Method Summary
 void all(java.lang.String words)
          Set the words that must be in a tweet.
 void any(java.lang.String words)
          Set the words that can be in a tweet.
 void from(java.lang.String user)
          Set the user a tweet should be from.
 void km()
          Set the unit of measurement to kilometers.
 void lang(java.lang.String lang)
          Set the language a tweet should be in.
 void links(boolean links)
          Set if a tweet must contain links.
 void mi()
          Set the unit of measurement to miles.
 void near(java.lang.String place)
          Set the place a tweet should be sent near from.
 void negative(boolean negative)
          Set if a tweet must have received a negative :( attitude.
 void not(java.lang.String words)
          Set the words that should not be in a tweet.
 void page(int page)
          Set the page number that the search should return.
 void phrase(java.lang.String phrase)
          Set a phrase that should be in a tweet.
 void positive(boolean positive)
          Set if a tweet must have received a positive :) attitude.
 void question(boolean question)
          Set if a tweet must be a question.
 void ref(java.lang.String user)
          Set the user a tweet should reference.
 void rpp(int rpp)
          Set the number of returned tweets per search.
 void search()
          Search twitter using the pre-specified search values.
 void search(java.lang.String query)
          Search twitter using the specified query.
 void since(java.lang.String date)
          Set the date a tweet should have been posted after.
 void tag(java.lang.String tag)
          Set the hashtag that should be in a tweet.
 void to(java.lang.String user)
          Set the user a tweet should be to.
 void unit(java.lang.String units)
          Set the type of unit used to measure the distance from a tweet's location.
 void until(java.lang.String date)
          Set the date a tweet should have been posted before.
 void within(int dist)
          Set the within distance a tweet should be from a pre-specified place.
 
Methods inherited from class net.obxlabs.romefeeder.Feeder
clear, count, countFeeds, err, getFeed, getUpdateInterval, hasNext, last, load, next, out, removeFeed, removeFeed, reset, run, setLoadCallback, setLoadCallback, setLoadEntryCallback, setLoadEntryCallback, setLoadFeedCallback, setLoadFeedCallback, setProxy, setUpdateCallback, setUpdateCallback, setUpdateFeedCallback, setUpdateFeedCallback, setUpdateInterval, sort, startUpdate, startUpdate, startUpdate, stopUpdate
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TwitterFeeder

public TwitterFeeder()
Create an empty Feeder.

Method Detail

search

public void search(java.lang.String query)
Search twitter using the specified query.

Parameters:
query - search query

search

public void search()
Search twitter using the pre-specified search values.


all

public void all(java.lang.String words)
Set the words that must be in a tweet.

Parameters:
words - words

phrase

public void phrase(java.lang.String phrase)
Set a phrase that should be in a tweet.

Parameters:
phrase - phrase

any

public void any(java.lang.String words)
Set the words that can be in a tweet.

Parameters:
words - words

not

public void not(java.lang.String words)
Set the words that should not be in a tweet.

Parameters:
words - words

tag

public void tag(java.lang.String tag)
Set the hashtag that should be in a tweet.

Parameters:
tag - hashtag

lang

public void lang(java.lang.String lang)
Set the language a tweet should be in.

Parameters:
lang - language id (e.g. all, en, fr, etc)

from

public void from(java.lang.String user)
Set the user a tweet should be from.

Parameters:
user - user

to

public void to(java.lang.String user)
Set the user a tweet should be to.

Parameters:
user - user

ref

public void ref(java.lang.String user)
Set the user a tweet should reference.

Parameters:
user - user

near

public void near(java.lang.String place)
Set the place a tweet should be sent near from.

Parameters:
place - place

within

public void within(int dist)
Set the within distance a tweet should be from a pre-specified place.

Parameters:
dist - distance

unit

public void unit(java.lang.String units)
Set the type of unit used to measure the distance from a tweet's location.

Parameters:
units - km or mi

km

public void km()
Set the unit of measurement to kilometers.


mi

public void mi()
Set the unit of measurement to miles.


since

public void since(java.lang.String date)
Set the date a tweet should have been posted after.

Parameters:
date - date (yyyy-mm-dd)

until

public void until(java.lang.String date)
Set the date a tweet should have been posted before.

Parameters:
date - date (yyyy-mm-dd)

positive

public void positive(boolean positive)
Set if a tweet must have received a positive :) attitude.

Parameters:
positive - true for a positive attitude, not to turn it off

negative

public void negative(boolean negative)
Set if a tweet must have received a negative :( attitude.

Parameters:
negative - true for a negative attitude, not to turn it off

question

public void question(boolean question)
Set if a tweet must be a question.

Parameters:
question - true for a question, not to turn it off

links

public void links(boolean links)
Set if a tweet must contain links.

Parameters:
links - true if it contains links, false to turn it off

rpp

public void rpp(int rpp)
Set the number of returned tweets per search.

Parameters:
rpp - returned tweets per search

page

public void page(int page)
Set the page number that the search should return.

Parameters:
page - page number


processing library romefeeder by Bruno Nadeau. 2008-2009 (c) OBX Labs / Bruno Nadeau / Jason Lewis