Class: Glass::Location

Inherits:
Object
  • Object
show all
Defined in:
lib/glass/locations/location.rb

Overview

A geographic location that can be associated with a timeline item.

Class Attribute Summary collapse

Instance Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.kindObject (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

#accuracyObject

The accuracy of the location fix in meters.



48
49
50
# File 'lib/glass/locations/location.rb', line 48

def accuracy
  @accuracy
end

#addressObject

The full address of the location.



58
59
60
# File 'lib/glass/locations/location.rb', line 58

def address
  @address
end

#displayNameObject

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

#idObject (readonly)

The ID of the location.



29
30
31
# File 'lib/glass/locations/location.rb', line 29

def id
  @id
end

#latitudeObject

The latitude, in degrees.



39
40
41
# File 'lib/glass/locations/location.rb', line 39

def latitude
  @latitude
end

#longitudeObject

The longitude, in degrees.



43
44
45
# File 'lib/glass/locations/location.rb', line 43

def longitude
  @longitude
end

#timestampObject (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
  @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