Class: Google::Apis::CivicinfoV2::Channel

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

Overview

A social media or web channel for a candidate.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Google::Apis::Core::JsonObjectSupport

#to_json

Methods included from Google::Apis::Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ Channel

Returns a new instance of Channel.


248
249
250
# File 'generated/google/apis/civicinfo_v2/classes.rb', line 248

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

Instance Attribute Details

#idString

The unique public identifier for the candidate's channel. Corresponds to the JSON property id

Returns:

  • (String)

239
240
241
# File 'generated/google/apis/civicinfo_v2/classes.rb', line 239

def id
  @id
end

#typeString

The type of channel. The following is a list of types of channels, but is not exhaustive. More channel types may be added at a later time. One of: GooglePlus, YouTube, Facebook, Twitter Corresponds to the JSON property type

Returns:

  • (String)

246
247
248
# File 'generated/google/apis/civicinfo_v2/classes.rb', line 246

def type
  @type
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object


253
254
255
256
# File 'generated/google/apis/civicinfo_v2/classes.rb', line 253

def update!(**args)
  @id = args[:id] if args.key?(:id)
  @type = args[:type] if args.key?(:type)
end