Module twitter
ldclakmal/twitter
Clients
twitter: Client
The Twitter client object.
tweet
Updates the authenticating user's current status, also known as Tweeting.
Parameters
- status string - The text of status update
retweet
Retweets a tweet, specified by the id parameter. Returns the original Tweet with Retweet details embedded.
Parameters
- id int - The numerical ID of the desired status
unretweet
Untweets a retweeted status, specified by the id parameter. Returns the original Tweet, with Retweet details embedded.
Parameters
- id int - The numerical ID of the desired status
search
function search(string query, AdvancedSearch? advancedSearch) returns Status[]|Error
Returns a collection of relevant Tweets matching a specified query.
Parameters
- query string - Query string of 500 characters maximum, including operators
- advancedSearch AdvancedSearch? (default ()) - Optional params that is needed for advanced search operations
getTweet
Returns a single Tweet, specified by the id parameter. The Tweet's author will also be embedded within the Tweet.
Parameters
- id int - The numerical ID of the desired status
deleteTweet
Destroys the status. The authenticating user must be the author of the specified status. Returns the destroyed status; if successful.
Parameters
- id int - The numerical ID of the desired status
Records
twitter: AdvancedSearch
Define the advanced search parameters.
Fields
- geocode string? - The parameter value is specified by "latitude,longitude,radius", where radius units must be specified as either "mi" (miles) or "km" (kilometers)
- lang string? - The language, given by an ISO 639-1 code
- locale string? - The language of the query
- resultType string? - Specifies what type of search results prefer to receive. The current default is "mixed" Valid values include: "mixed" : Include both popular and real time results in the response "recent" : return only the most recent results in the response "popular" : return only the most popular results in the response
- count string? - The number of tweets to return per page, up to a maximum of 100. Defaults to 15
- until string? - Returns tweets created before the given date. Date should be formatted as YYYY-MM-DD. The search index has a 7-day limit. In other words, no tweets will be found for a date older than one week
- sinceId int? - Returns results with an ID greater than (that is, more recent than) the specified ID
- maxId int? - Returns results with an ID less than (that is, older than) or equal to the specified ID
- includeEntities boolean? - The entities node will not be included when set to false
twitter: Configuration
The Twitter client configurations.
Fields
- accessToken string - The access token of the Twitter account
- accessTokenSecret string - The access token secret of the Twitter account
- consumerKey string - The consumer key of the Twitter account
- consumerSecret string - The consumer secret of the Twitter account
- clientConfig ClientConfiguration(default {}) - HTTP client configurations
twitter: Status
Define the status, AKA Tweet.
Fields
- createdAt string - Created time of the status
- id int - Id of the status
- text string - Text message of the status
- 'source string -
- truncated boolean - Whether the status is truncated or not
- favorited boolean - Whether the status is favorited or not
- retweeted boolean - Whether the status is retweeted or not
- favoriteCount int - Favourite count of the status
- retweetCount int - Retweet count of the status
- lang string - Language of the status
Errors
twitter: Error
Represents the Twitter error.
Import
import ldclakmal/twitter;
Metadata
Released date: about 3 years ago
Version: 2.0.3
License: Apache-2.0
Compatibility
Platform: any
Ballerina version: slbeta2
GraalVM compatible: Yes
Pull count
Total: 291
Current verison: 4
Weekly downloads
Keywords
ballerina
connector
twitter developer
Contributors
Dependencies