Module: AxTrack
- Defined in:
- lib/ax-track.rb,
lib/ax_track/error.rb,
lib/ax_track/client.rb,
lib/ax_track/object.rb,
lib/ax_track/version.rb,
lib/ax_track/resource.rb,
lib/ax_track/collection.rb,
lib/ax_track/objects/asset.rb,
lib/ax_track/objects/tracker.rb,
lib/ax_track/resources/asset_resource.rb,
lib/ax_track/resources/tracker_resource.rb,
lib/ax_track/objects/tracker/gps_position.rb
Defined Under Namespace
Classes: Asset, AssetResource, Client, Collection, Error, Object, Resource, Tracker, TrackerResource
Constant Summary
collapse
- InvalidURL =
Class.new(StandardError)
- VERSION =
"0.3"
- @@base_url_api =
'https://prod.api.ax-track.ch/api/v1'.freeze
- @@base_url_user =
'https://app.ax-track.ch/#/map/assets/'.freeze
Class Method Summary
collapse
Class Method Details
.base_url_api ⇒ Object
23
24
25
|
# File 'lib/ax-track.rb', line 23
def self.base_url_api
@@base_url_api
end
|
.base_url_user ⇒ Object
33
34
35
|
# File 'lib/ax-track.rb', line 33
def self.base_url_user
@@base_url_user
end
|
.set_base_url_api=(new_base_url_api) ⇒ Object
27
28
29
30
31
|
# File 'lib/ax-track.rb', line 27
def self.set_base_url_api=(new_base_url_api)
raise InvalidURL.new 'This is not a valid URL' unless new_base_url_api =~ URI::regexp
@@base_url_api = new_base_url_api
end
|
.set_base_url_user=(new_base_url_user = nil) ⇒ Object
37
38
39
40
41
|
# File 'lib/ax-track.rb', line 37
def self.set_base_url_user=(new_base_url_user = nil)
raise InvalidURL.new 'This is not a valid URL' unless new_base_url_user =~ URI::regexp
new_base_url_user = new_base_url_user + "/" unless new_base_url_user[-1] == '/'
@@base_url_user = new_base_url_user
end
|