Global

Members

client

Used to create a twitter client
Source:

imageURL

API to fetch random images
Source:

Methods

encodeImage(imageURL)

encodes the image to base64
Parameters:
Name Type Description
imageURL string URL of a random image fetched using Unspalsh API
Source:

getTweet(error, media, result)

this function fetches the random quotes along with greetings and hashtags to tweet
Parameters:
Name Type Description
error object error occured if any
media object contains the media file i.e image to be tweeted
result object final outcome
Source:

postImage(error, image)

this function uploads the image to the twitter.
Parameters:
Name Type Description
error object represents the error while posting the image to the twitter
image object represents the encoded image
Source:

tweetNow(status)

it posts the tweet to the timeline
Parameters:
Name Type Description
status object tweet to be posted
Source: