twitty
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
Cita come
Vladimir Bondarenko (2024). twitty (https://www.mathworks.com/matlabcentral/fileexchange/34837-twitty), MATLAB Central File Exchange. Recuperato .
Compatibilità della release di MATLAB
Compatibilità della piattaforma
Windows macOS LinuxCategorie
- MATLAB > App Building >
- MATLAB > External Language Interfaces >
- MATLAB > External Language Interfaces > Other languages > Twitter >
Tag
Riconoscimenti
Ispirato da: Update twitter status, JSON Parser
Ispirato: Core_twitter: A wrapper for the Python package Tweepy to interface with the Twitter API
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Scopri Live Editor
Crea script con codice, output e testo formattato in un unico documento eseguibile.
Versione | Pubblicato | Note della release | |
---|---|---|---|
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.
|
||
1.1.0.0 | Some documentation updates.
|
||
1.0.0.0 |