Class: Google::Apis::YoutubeV3::ChannelStatistics

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
generated/google/apis/youtube_v3/classes.rb,
generated/google/apis/youtube_v3/representations.rb,
generated/google/apis/youtube_v3/representations.rb

Overview

Statistics about a channel: number of subscribers, number of videos in the channel, etc.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ ChannelStatistics

Returns a new instance of ChannelStatistics.


1800
1801
1802
# File 'generated/google/apis/youtube_v3/classes.rb', line 1800

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#comment_countFixnum

The number of comments for the channel. Corresponds to the JSON property commentCount

Returns:

  • (Fixnum)

1777
1778
1779
# File 'generated/google/apis/youtube_v3/classes.rb', line 1777

def comment_count
  @comment_count
end

#hidden_subscriber_countBoolean Also known as: hidden_subscriber_count?

Whether or not the number of subscribers is shown for this user. Corresponds to the JSON property hiddenSubscriberCount

Returns:

  • (Boolean)

1782
1783
1784
# File 'generated/google/apis/youtube_v3/classes.rb', line 1782

def hidden_subscriber_count
  @hidden_subscriber_count
end

#subscriber_countFixnum

The number of subscribers that the channel has. Corresponds to the JSON property subscriberCount

Returns:

  • (Fixnum)

1788
1789
1790
# File 'generated/google/apis/youtube_v3/classes.rb', line 1788

def subscriber_count
  @subscriber_count
end

#video_countFixnum

The number of videos uploaded to the channel. Corresponds to the JSON property videoCount

Returns:

  • (Fixnum)

1793
1794
1795
# File 'generated/google/apis/youtube_v3/classes.rb', line 1793

def video_count
  @video_count
end

#view_countFixnum

The number of times the channel has been viewed. Corresponds to the JSON property viewCount

Returns:

  • (Fixnum)

1798
1799
1800
# File 'generated/google/apis/youtube_v3/classes.rb', line 1798

def view_count
  @view_count
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object


1805
1806
1807
1808
1809
1810
1811
# File 'generated/google/apis/youtube_v3/classes.rb', line 1805

def update!(**args)
  @comment_count = args[:comment_count] if args.key?(:comment_count)
  @hidden_subscriber_count = args[:hidden_subscriber_count] if args.key?(:hidden_subscriber_count)
  @subscriber_count = args[:subscriber_count] if args.key?(:subscriber_count)
  @video_count = args[:video_count] if args.key?(:video_count)
  @view_count = args[:view_count] if args.key?(:view_count)
end