twitty

版本 1.5.0.0 (696.7 KB) 作者: Vladimir Bondarenko
Interface-class to access the Twitter REST API v1.1.
3.9K 次下载
更新时间 2013/7/12

查看许可证

twitty is a MATLAB class for interaction with the twitter platform via its REST API v1.1.

Here are some examples of its usage:
tw = twitty(credentials); % create a twitty object and supply user credentials.

For details on credentials, type "help twitty" and refer to the sections about PROPERTIES and OBTAINING TWITTER CREDENTIALS.

After setting valid credentials, a twitty object should be able to access the Twitter platform. E.g.:

1. S = tw.search('matlab'); % search twitter.com for messages including the word 'matlab'.
2. S = tw.updateStatus('Hello, Twitter!'); % or twit something cooler.
3. S = tw.sampleStatuses(); % get a continuous stream of a random sample of all public statuses.
4. S = tw.userTimeline('screen_name', 'matlab'); % get recent messages posted by the user 'matlab';
5. S = tw.trendsAvailable(); % get place for which Twitter has trends available.

Conceptually, twitty methods are just wrapper functions around the main function which calls the Twitter API. This API caller function, callTwitterAPI(), does the main job:
creates an HTTPS request, handles the authentication and encoding, sends the request to and parses a response from the Twitter platform. It is not meant to be called directly but should be invoked
from a wrapper function.

The wrapper functions provide an intuitive MATLAB-style interface for accessing the Twitter's API resources. For the complete description of the REST API v1.1, refer to the official
documentation at https://dev.twitter.com/docs/api/1.1.
The API is quite extensive and twitty doesn't cover it all. It includes most of the resources in the following sections: TIMELINES, STREAMING, TWEETS, SEARCH, FRIENDS & FOLLOWERS, USERS, PLACES & GEO, TRENDS, and HELP.

For the summary of the twitty's methods run the 'twitty.API' command.
For information on a particular function, type 'help twitty.<function name>'.

REQUIREMENTS:
optional - the json parser by Joel Feenstra: http://www.mathworks.co.uk/matlabcentral/fileexchange/20565-json-parser

引用格式

Vladimir Bondarenko (2024). twitty (https://www.mathworks.com/matlabcentral/fileexchange/34837-twitty), MATLAB Central File Exchange. 检索时间: .

MATLAB 版本兼容性
创建方式 R2010b
兼容任何版本
平台兼容性
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
版本 已发布 发行说明
1.5.0.0

Added auxiliary files: tweetingSummary.m and coastline.mat.

1.4.0.0

Fixed: error in the constructor call twitty(creds), due to the outdated credentials validity check.

1.3.0.0

Updated to the Twitter REST API v1.1.
Added support for the Streaming API.

1.1.0.0

Some documentation updates.
Fixes: strfind(lower(S),'error') is changed to strfind(lower(S{1}),'error') in the constructor function, twitty().

1.0.0.0