class Faker::Twitter
def status(include_user: true, include_photo: false)
-
(Hash)
-
Parameters:
-
include_photo
(Boolean
) -- Include or exclude user photo -
include_user
(Boolean
) -- Include or exclude user details
def status(include_user: true, include_photo: false) status_id = id status = { id: status_id, id_str: status_id.to_s, contributors: nil, coordinates: nil, created_at: created_at, entities: status_entities(include_photo: include_photo), favorite_count: Faker::Number.between(to: 1, from: 10_000), favorited: false, geo: nil, in_reply_to_screen_name: nil, in_reply_to_status_id: nil, in_reply_to_user_id_str: nil, in_reply_to_user_id: nil, is_quote_status: false, lang: Faker::Address.country_code, nil: nil, place: nil, possibly_sensitive: Faker::Boolean.boolean(true_ratio: 0.1), retweet_count: Faker::Number.between(to: 1, from: 10_000), retweeted_status: nil, retweeted: false, source: "<a href=\"#{Faker::Internet.url(host: 'example.com')}\" rel=\"nofollow\">#{Faker::Company.name}</a>", text: Faker::Lorem.sentence, truncated: false } status[:user] = Faker::Twitter.user(include_status: false) if include_user status[:text] = "#{status[:text]} #{status[:entities][:media].first[:url]}" if include_photo status end