| 
  • If you are citizen of an European Union member nation, you may not use this service unless you are at least 16 years old.

  • Stop wasting time looking for files and revisions. Connect your Gmail, DriveDropbox, and Slack accounts and in less than 2 minutes, Dokkio will automatically organize all your file attachments. Learn more and claim your free account.

View
 

Feed API

Page history last edited by Burt 10 years, 6 months ago

Publitweet Feed API

 

This API returns a feed (a Twitter User or a Twitter List) with extended metadata (mentions, attached link, title/description/thumbnail and more)

 

Please email api (at) publitweet.com to set up a Twitter feed before using the API.

 

Call:

 

http://api.publitweet.com/1/nytimes/staff.json

Returns the 20 latest tweets from the list @nytimes/staff

 

http://api.publitweet.com/1/nytimes.json

Returns the 20 latest tweets from the user @nytimes

 

Options:

 

keywords
list of keywords in CSV (eg. keyword1,keyword2). Returns tweets that match the keywords (perfect match). By default, the AND operator is used (all keywords should match). Alternatively, you can specify the list of keywords separated by " or " (e.g. keyword1 or keyword2). In which case the OR operator will be used.
 blacklist list of keywords in CSV (e.g. keyword1,keyword2). Returns tweets that do not contain any of these keywords
 type Can be either all, link, image, video (default: all)
 since_id Only retrieve tweets that come after the tweet specified. Please use this parameter to get the newest tweets without fetching ones you already have (saves bandwidth).
 max_id Get all tweets that have an id less or equal (<=) than max_id
 limit Number of tweets to retrieve (mininum 1, maximum 200) (default: 20)
 page Used for paging results (default 1). E.g. limit=10&page=2 will give you tweets from 11 to 20.
 screen_name Get all tweets from the given user's screen_name (e.g. screen_name=xdamman)

 

Example:

 

http://api.publitweet.com/1/nytimes/staff.json?keywords=President&type=link&since_id=423343414&limit=1&page=1

 

Returns:

 

{"feed":"nytimes\/staff","condition":{"_keywords":{"$all":["president"]},"type":"link","_id":{"$gt":423343414}},"length":1,"tweets":[{"_id":11379926699,"content":"Great read, great article structure. Wash Post: How the President answers his mail http:\/\/bit.ly\/9r34za. From (via @TimHarford)","ts":1270059643,"user":{"screen_name":"stephcliff","avatar":"http:\/\/a3.twimg.com\/profile_images\/80692995\/headshots005supersmall_normal.JPG","name":"Stephanie Clifford","description":"Media reporter, The New York Times.","location":"New York","url":"http:\/\/topics.nytimes.com\/top\/reference\/timestopics\/people\/c\/stephanie_clifford\/index.html","followers":2995,"friends":444},"source":"web","_keywords":["great","read","great","article","structure","wash","post","how","the","president","answers","his","mail","http","bit","ly","9r34za","from","via","@timharford"],"type":"link","rt":-1,"metadata":{"urls":{"http:\/\/bit.ly\/9r34za":{"description":"The black binder arrived at the White House residence just before 8 p.m., and President Obama took it upstairs to begin his nightly reading. The briefing book was dated Jan. 8, 2010, but it looked like the same package delivered every night, with printouts of speeches, policy recommendations and...","favicon":null,"title":"For a look outside presidential bubble, Obama reads 10 personal letters each day","type":"link","url":"http:\/\/www.washingtonpost.com\/wp-dyn\/content\/article\/2010\/03\/30\/AR2010033004260_pf.html"}},"mentions":{"TimHarford":{"_id":{},"name":"Tim Harford","description":"Author of The Undercover Economist; Financial Times columnist; presenter of More or Less, Radio 4","screen_name":"TimHarford","avatar":"http:\/\/a1.twimg.com\/profile_images\/558148812\/4155989468_e21fd8bb37_s_normal.jpg","followers":2834,"friends":218,"url":"http:\/\/www.timharford.com","location":"London","ts":1270059671}},"sources":false}}]}

 

Comments (0)

You don't have permission to comment on this page.