teleportd 0.0.3 → 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.md +22 -1
- data/lib/teleportd/search.rb +1 -1
- data/lib/teleportd/version.rb +1 -1
- metadata +11 -11
data/README.md
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
# Teleportd
|
2
2
|
|
3
|
-
Ruby Wrapper Library for Teleportd
|
3
|
+
Ruby Wrapper Library for [Teleportd](http://teleportd.com)
|
4
|
+
[API](http://teleportd.com/api)
|
4
5
|
|
5
6
|
Currently, this wrapper only supports the basic search functionality.
|
6
7
|
|
@@ -56,6 +57,26 @@ Query With Time Period (start/end)
|
|
56
57
|
$ options[:time_period][:end_time] = 2.days.ago
|
57
58
|
$ search = Teleportd::Search.new(options)
|
58
59
|
|
60
|
+
Query With Sort (relevance/recency)
|
61
|
+
|
62
|
+
$ options = {}
|
63
|
+
$ options[:sort] = 'relevance'
|
64
|
+
$ search = Teleportd::Search.new(options)
|
65
|
+
|
66
|
+
Options can be combined, of course:
|
67
|
+
|
68
|
+
$ options = {}
|
69
|
+
$ options[:location] = {}
|
70
|
+
$ options[:location][:latitude] = 34.19
|
71
|
+
$ options[:location][:longitude] = -119.49
|
72
|
+
$ options[:location][:vertical] = 5.0
|
73
|
+
$ options[:location][:horizontal] = 5.0
|
74
|
+
$ options[:time_period] = {}
|
75
|
+
$ options[:time_period][:start_time] = 5.days.ago
|
76
|
+
$ options[:time_period][:end_time] = 2.days.ago
|
77
|
+
$ options[:textual_search] = 'foo bar baz'
|
78
|
+
$ search = Teleportd::Search.new(options)
|
79
|
+
|
59
80
|
## Contributing
|
60
81
|
|
61
82
|
1. Fork it
|
data/lib/teleportd/search.rb
CHANGED
@@ -37,7 +37,7 @@ module Teleportd
|
|
37
37
|
|
38
38
|
def has_location?
|
39
39
|
loc = opts[:location]
|
40
|
-
!!loc && loc.has_key?(:latitude) && loc.has_key(:longitude) && loc.has_key(:vertical) && loc.has_key(:horizontal)
|
40
|
+
!!loc && loc.has_key?(:latitude) && loc.has_key?(:longitude) && loc.has_key?(:vertical) && loc.has_key?(:horizontal)
|
41
41
|
end
|
42
42
|
|
43
43
|
def location
|
data/lib/teleportd/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: teleportd
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -13,7 +13,7 @@ date: 2012-06-29 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: json
|
16
|
-
requirement: &
|
16
|
+
requirement: &7591140 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ~>
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: 1.7.1
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *7591140
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: activesupport
|
27
|
-
requirement: &
|
27
|
+
requirement: &7590620 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ! '>='
|
@@ -32,10 +32,10 @@ dependencies:
|
|
32
32
|
version: '0'
|
33
33
|
type: :runtime
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *7590620
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: i18n
|
38
|
-
requirement: &
|
38
|
+
requirement: &7589940 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ! '>='
|
@@ -43,10 +43,10 @@ dependencies:
|
|
43
43
|
version: '0'
|
44
44
|
type: :runtime
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *7589940
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: curb
|
49
|
-
requirement: &
|
49
|
+
requirement: &7589340 !ruby/object:Gem::Requirement
|
50
50
|
none: false
|
51
51
|
requirements:
|
52
52
|
- - ! '>='
|
@@ -54,10 +54,10 @@ dependencies:
|
|
54
54
|
version: '0'
|
55
55
|
type: :runtime
|
56
56
|
prerelease: false
|
57
|
-
version_requirements: *
|
57
|
+
version_requirements: *7589340
|
58
58
|
- !ruby/object:Gem::Dependency
|
59
59
|
name: pry
|
60
|
-
requirement: &
|
60
|
+
requirement: &7588680 !ruby/object:Gem::Requirement
|
61
61
|
none: false
|
62
62
|
requirements:
|
63
63
|
- - ! '>='
|
@@ -65,7 +65,7 @@ dependencies:
|
|
65
65
|
version: '0'
|
66
66
|
type: :development
|
67
67
|
prerelease: false
|
68
|
-
version_requirements: *
|
68
|
+
version_requirements: *7588680
|
69
69
|
description: Ruby Wrapper Library for Teleportd API
|
70
70
|
email:
|
71
71
|
- nicholas.fine@gmail.com
|