Class: Glass::Location
- Inherits:
-
Object
- Object
- Glass::Location
- Defined in:
- lib/glass/locations/location.rb
Overview
A geographic location that can be associated with a timeline item.
Class Attribute Summary collapse
-
.kind ⇒ Object
readonly
The type of resource.
Instance Attribute Summary collapse
-
#accuracy ⇒ Object
The accuracy of the location fix in meters.
-
#address ⇒ Object
The full address of the location.
-
#displayName ⇒ Object
The name to be displayed.
-
#id ⇒ Object
readonly
The ID of the location.
-
#latitude ⇒ Object
The latitude, in degrees.
-
#longitude ⇒ Object
The longitude, in degrees.
-
#timestamp ⇒ Object
readonly
The time at which this location was captured, formatted according to RFC 3339.
Class Method Summary collapse
Class Attribute Details
.kind ⇒ Object (readonly)
The type of resource. This is always mirror#location.
12 13 14 |
# File 'lib/glass/locations/location.rb', line 12 def kind @kind end |
Instance Attribute Details
#accuracy ⇒ Object
The accuracy of the location fix in meters.
48 49 50 |
# File 'lib/glass/locations/location.rb', line 48 def accuracy @accuracy end |
#address ⇒ Object
The full address of the location.
58 59 60 |
# File 'lib/glass/locations/location.rb', line 58 def address @address end |
#displayName ⇒ Object
The name to be displayed. This may be a business name or a user-defined place, such as “Home”.
53 54 55 |
# File 'lib/glass/locations/location.rb', line 53 def displayName @displayName end |
#id ⇒ Object (readonly)
The ID of the location.
29 30 31 |
# File 'lib/glass/locations/location.rb', line 29 def id @id end |
#latitude ⇒ Object
The latitude, in degrees.
39 40 41 |
# File 'lib/glass/locations/location.rb', line 39 def latitude @latitude end |
#longitude ⇒ Object
The longitude, in degrees.
43 44 45 |
# File 'lib/glass/locations/location.rb', line 43 def longitude @longitude end |
#timestamp ⇒ Object (readonly)
The time at which this location was captured, formatted according to RFC 3339.
34 35 36 |
# File 'lib/glass/locations/location.rb', line 34 def @timestamp end |
Class Method Details
.subscribe(mirror, call_back_url) ⇒ Object
14 15 16 17 18 19 20 21 |
# File 'lib/glass/locations/location.rb', line 14 def subscribe(mirror, call_back_url) s = Subscription.new() s.mirror=mirror s.callbackUrl=call_back_url s.collection=Subscription::LOCATION s.operation << UPDATE s.insert end |