Class: XapiScraper::Models::Components::UserModel

Inherits:
Object
  • Object
show all
Extended by:
T::Sig
Includes:
Crystalline::MetadataFields
Defined in:
lib/xapi_scraper/models/components/usermodel.rb

Instance Method Summary collapse

Methods included from Crystalline::MetadataFields

#field, #fields, included, #marshal_single, #to_dict, #to_json

Constructor Details

#initialize(id:, name:, screen_name:, description_urls: nil, pinned_tweet_ids: nil, created_at: nil, created_at_datetime: nil, can_dm: nil, can_media_tag: nil, default_profile: nil, default_profile_image: nil, description: nil, urls: nil, fast_followers_count: nil, favourites_count: nil, followers_count: nil, following_count: nil, has_custom_timelines: nil, is_blue_verified: nil, verified_type: nil, is_verified: nil, profile_image_shape: nil, is_translator: nil, listed_count: nil, location: nil, media_count: nil, normal_followers_count: nil, possibly_sensitive: nil, profile_banner_url: nil, profile_image_url: nil, protected: nil, statuses_count: nil) ⇒ UserModel

Returns a new instance of UserModel.



236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
# File 'lib/xapi_scraper/models/components/usermodel.rb', line 236

def initialize(
  id:,
  name:,
  screen_name:,
  description_urls: nil,
  pinned_tweet_ids: nil,
  created_at: nil,
  created_at_datetime: nil,
  can_dm: nil,
  can_media_tag: nil,
  default_profile: nil,
  default_profile_image: nil,
  description: nil,
  urls: nil,
  fast_followers_count: nil,
  favourites_count: nil,
  followers_count: nil,
  following_count: nil,
  has_custom_timelines: nil,
  is_blue_verified: nil,
  verified_type: nil,
  is_verified: nil,
  profile_image_shape: nil,
  is_translator: nil,
  listed_count: nil,
  location: nil,
  media_count: nil,
  normal_followers_count: nil,
  possibly_sensitive: nil,
  profile_banner_url: nil,
  profile_image_url: nil,
  protected: nil,
  statuses_count: nil
)
  @id = id
  @name = name
  @screen_name = screen_name
  @description_urls = description_urls
  @pinned_tweet_ids = pinned_tweet_ids
  @created_at = created_at
  @created_at_datetime = created_at_datetime
  @can_dm = can_dm
  @can_media_tag = can_media_tag
  @default_profile = default_profile
  @default_profile_image = default_profile_image
  @description = description
  @urls = urls
  @fast_followers_count = fast_followers_count
  @favourites_count = favourites_count
  @followers_count = followers_count
  @following_count = following_count
  @has_custom_timelines = has_custom_timelines
  @is_blue_verified = is_blue_verified
  @verified_type = verified_type
  @is_verified = is_verified
  @profile_image_shape = profile_image_shape
  @is_translator = is_translator
  @listed_count = listed_count
  @location = location
  @media_count = media_count
  @normal_followers_count = normal_followers_count
  @possibly_sensitive = possibly_sensitive
  @profile_banner_url = profile_banner_url
  @profile_image_url = profile_image_url
  @protected = protected
  @statuses_count = statuses_count
end

Instance Method Details

#==(other) ⇒ Object



305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
# File 'lib/xapi_scraper/models/components/usermodel.rb', line 305

def ==(other)
  return false unless other.is_a?(self.class)
  return false unless @id == other.id
  return false unless @name == other.name
  return false unless @screen_name == other.screen_name
  return false unless @description_urls == other.description_urls
  return false unless @pinned_tweet_ids == other.pinned_tweet_ids
  return false unless @created_at == other.created_at
  return false unless @created_at_datetime == other.created_at_datetime
  return false unless @can_dm == other.can_dm
  return false unless @can_media_tag == other.can_media_tag
  return false unless @default_profile == other.default_profile
  return false unless @default_profile_image == other.default_profile_image
  return false unless @description == other.description
  return false unless @urls == other.urls
  return false unless @fast_followers_count == other.fast_followers_count
  return false unless @favourites_count == other.favourites_count
  return false unless @followers_count == other.followers_count
  return false unless @following_count == other.following_count
  return false unless @has_custom_timelines == other.has_custom_timelines
  return false unless @is_blue_verified == other.is_blue_verified
  return false unless @verified_type == other.verified_type
  return false unless @is_verified == other.is_verified
  return false unless @profile_image_shape == other.profile_image_shape
  return false unless @is_translator == other.is_translator
  return false unless @listed_count == other.listed_count
  return false unless @location == other.location
  return false unless @media_count == other.media_count
  return false unless @normal_followers_count == other.normal_followers_count
  return false unless @possibly_sensitive == other.possibly_sensitive
  return false unless @profile_banner_url == other.profile_banner_url
  return false unless @profile_image_url == other.profile_image_url
  return false unless @protected == other.protected
  return false unless @statuses_count == other.statuses_count
  true
end