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.



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

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)


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

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)


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

def type
  @type
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



259
260
261
262
# File 'generated/google/apis/civicinfo_v2/classes.rb', line 259

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