Class: Google::Apis::BloggerV2::Post::Location

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

Overview

The location for geotagged posts.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Location

Returns a new instance of Location.



1004
1005
1006
# File 'lib/google/apis/blogger_v2/classes.rb', line 1004

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

Instance Attribute Details

#latFloat

Location's latitude. Corresponds to the JSON property lat

Returns:

  • (Float)


987
988
989
# File 'lib/google/apis/blogger_v2/classes.rb', line 987

def lat
  @lat
end

#lngFloat

Location's longitude. Corresponds to the JSON property lng

Returns:

  • (Float)


992
993
994
# File 'lib/google/apis/blogger_v2/classes.rb', line 992

def lng
  @lng
end

#nameString

Location name. Corresponds to the JSON property name

Returns:

  • (String)


997
998
999
# File 'lib/google/apis/blogger_v2/classes.rb', line 997

def name
  @name
end

#spanString

Location's viewport span. Can be used when rendering a map preview. Corresponds to the JSON property span

Returns:

  • (String)


1002
1003
1004
# File 'lib/google/apis/blogger_v2/classes.rb', line 1002

def span
  @span
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1009
1010
1011
1012
1013
1014
# File 'lib/google/apis/blogger_v2/classes.rb', line 1009

def update!(**args)
  @lat = args[:lat] if args.key?(:lat)
  @lng = args[:lng] if args.key?(:lng)
  @name = args[:name] if args.key?(:name)
  @span = args[:span] if args.key?(:span)
end