dancroak-twitter-search 0.4 → 0.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/README.markdown +5 -71
  2. data/twitter-search.gemspec +2 -2
  3. metadata +2 -2
data/README.markdown CHANGED
@@ -1,82 +1,29 @@
1
- <<<<<<< HEAD:README.markdown
2
- # A simple Summize client for Ruby.
3
- =======
4
1
  # A Twitter Search client for Ruby.
5
- >>>>>>> ef8ef7aaafceb04d69cdfb3963f229ec1ab666db:README.markdown
6
2
 
7
- <<<<<<< HEAD:README.markdown
8
- Access the Summize API from your Ruby code.
9
- =======
10
3
  Access the Twitter Search API from your Ruby code.
11
- >>>>>>> ef8ef7aaafceb04d69cdfb3963f229ec1ab666db:README.markdown
12
4
 
13
5
  ## Usage
14
6
 
15
- <<<<<<< HEAD:README.markdown
16
- =======
17
7
  Install the gem.
18
8
 
19
9
  sudo gem install dancroak-twitter-search -s http://gems.github.com
20
10
 
21
- >>>>>>> ef8ef7aaafceb04d69cdfb3963f229ec1ab666db:README.markdown
22
11
  Require the gem.
23
12
 
24
- <<<<<<< HEAD:README.markdown
25
- require 'summize'
26
- =======
27
13
  require 'twitter-search'
28
- >>>>>>> ef8ef7aaafceb04d69cdfb3963f229ec1ab666db:README.markdown
29
14
 
30
- <<<<<<< HEAD:README.markdown
31
- Set up a Summize::Client. Name your client (a.k.a. 'user agent') to something meaningful, such as your app's name. This helps Summize answer any questions about your use of the API.
32
- =======
33
15
  Set up a TwitterSearch::Client. Name your client (a.k.a. 'user agent') to something meaningful, such as your app's name. This helps Twitter Search answer any questions about your use of the API.
34
- >>>>>>> ef8ef7aaafceb04d69cdfb3963f229ec1ab666db:README.markdown
35
16
 
36
- <<<<<<< HEAD:README.markdown
37
- @client = Summize::Client.new 'politweets'
38
- =======
39
17
  @client = TwitterSearch::Client.new 'politweets'
40
- >>>>>>> ef8ef7aaafceb04d69cdfb3963f229ec1ab666db:README.markdown
41
18
 
42
19
  Request tweets by calling the query method of your client. It takes either a String or a Hash of arguments.
43
20
 
44
21
  @tweets = @client.query 'twitter search'
45
22
 
46
- <<<<<<< HEAD:README.markdown
47
- The String form uses the default Summize behavior, which in this example finds tweets containing both "twitter" and "search". It is identical to the more verbose, explicit version:
48
- =======
49
23
  The String form uses the default Twitter Search behavior, which in this example finds tweets containing both "twitter" and "search". It is identical to the more verbose, explicit version:
50
- >>>>>>> ef8ef7aaafceb04d69cdfb3963f229ec1ab666db:README.markdown
51
24
 
52
25
  @tweets = @client.query :q => 'twitter search'
53
-
54
- <<<<<<< HEAD:README.markdown
55
- Use Summize's query operators with the :q key to access the following behavior:
56
-
57
- <table>
58
- <tr><th>Operator</th><th>Finds tweets...</th></tr>
59
-
60
- <tr><td><a href="http://summize.com/search?q=twitter+search">:q => 'twitter search'</a></td><td>containing both "twitter" and "search". This is the default operator.</td></tr>
61
- <tr><td><a href="http://summize.com/search?q=%22happy+hour%22">:q => '<b>"</b>happy hour<b>"</b>'</a></td><td>containing the exact phrase "happy hour".</td></tr>
62
- <tr><td><a href="http://summize.com/search?q=obama+OR+hillary">:q => 'obama <b>OR</b> hillary'</a></td><td>containing either "obama" or "hillary" (or both).</td></tr>
63
-
64
- <tr><td><a href="http://summize.com/search?q=beer+-root">:q => 'beer <b>-</b>root'</a></td><td>containing "beer" but not "root".</td></tr>
65
- <tr><td><a href="http://summize.com/search?q=%23haiku">:q => '<b>#</b>haiku</a>'</td><td>containing the hashtag "haiku".</td></tr>
66
- <tr><td><a href="http://summize.com/search?q=from%3Aalexiskold">:q => '<b>from:</b>alexiskold'</a></td><td>sent from person "alexiskold".</td></tr>
67
- <tr><td><a href="http://summize.com/search?q=to%3Atechcrunch">:q => '<b>to:</b>techcrunch</a>'</td><td>sent to person "techcrunch".</td></tr>
68
- <tr><td><a href="http://summize.com/search?q=%40mashable">:q => '<b>@</b>mashable</a>'</td><td>referencing person "mashable".</td></tr>
69
-
70
- <tr><td><a href="http://summize.com/search?q=superhero+since%3A2008-05-01">:q => 'superhero <b>since:</b>2008-05-01'</a></td><td>containing "superhero" and sent since date "2008-05-01" (year-month-day).</td></tr>
71
-
72
- <tr><td><a href="http://summize.com/search?q=ftw+until%3A2008-05-03">:q => 'ftw <b>until:</b>2008-05-03'</a></td><td>containing "ftw" and sent up to date "2008-05-03".</td></tr>
73
- <tr><td><a href="http://summize.com/search?q=movie+-scary+%3A%29">:q => 'movie -scary <b>:)</b>'</a></td><td>containing "movie", but not "scary", and with a positive attitude.</td></tr>
74
- <tr><td><a href="http://summize.com/search?q=flight+%3A%28">:q => 'flight <b>:(</b>'</a></td><td>containing "flight" and with a negative attitude.</td></tr>
75
- <tr><td><a href="http://summize.com/search?q=traffic+%3F">:q => 'traffic <b>?</b>'</a></td><td>containing "traffic" and asking a question.</td></tr>
76
-
77
- <tr><td><a href="http://summize.com/search?q=hilarious+filter%3Alinks">:q => 'hilarious <b>filter:links</b>'</a></td><td>containing "hilarious" and linking to URLs.</td></tr>
78
- </table>
79
- =======
26
+
80
27
  Use the Twitter Search API's query operators with the :q key to access a variety of behavior.
81
28
 
82
29
  ## Search Operators
@@ -97,35 +44,26 @@ The following operator examples find tweets...
97
44
  * <a href="http://search.twitter.com/search?q=flight+%3A%28">:q => 'flight <b>:(</b>'</a> - containing "flight" and with a negative attitude.
98
45
  * <a href="http://search.twitter.com/search?q=traffic+%3F">:q => 'traffic <b>?</b>'</a> - containing "traffic" and asking a question.
99
46
  * <a href="http://search.twitter.com/search?q=hilarious+filter%3Alinks">:q => 'hilarious <b>filter:links</b>'</a> - containing "hilarious" and linking to URLs.
100
- >>>>>>> ef8ef7aaafceb04d69cdfb3963f229ec1ab666db:README.markdown
101
47
 
102
48
  ### Foreign Languages
103
49
 
104
- <<<<<<< HEAD:README.markdown
105
- The Summize API supports foreign languages, accessible via the :lang key. Use the [ISO 639-1](http://en.wikipedia.org/wiki/ISO_639-1) codes as the value:
106
- =======
107
50
  The Twitter Search API supports foreign languages, accessible via the :lang key. Use the [ISO 639-1](http://en.wikipedia.org/wiki/ISO_639-1) codes as the value:
108
- >>>>>>> ef8ef7aaafceb04d69cdfb3963f229ec1ab666db:README.markdown
109
51
 
110
52
  @tweets = @client.query :q => 'programmé', :lang => 'fr'
111
53
 
112
- <<<<<<< HEAD:README.markdown
113
- =======
114
54
  ### Pagination
115
55
 
116
56
  Alter the number of Tweets returned per page with the :rpp key. Stick with 10, 15, 20, 25, 30, or 50.
117
57
 
118
58
  @tweets = @client.query :q => 'Boston Celtics', :rpp => '30'
119
59
 
120
- >>>>>>> ef8ef7aaafceb04d69cdfb3963f229ec1ab666db:README.markdown
121
60
  ## Gotchas
122
61
 
123
62
  * Searches are case-insenstive.
124
- <<<<<<< HEAD:README.markdown
125
- * The "near" operator available in the Summize web interface is not available via the API. You must geocode before making your Summize API call.
126
- =======
127
- * The "near" operator available in the Twitter Search web interface is not available via the API. You must geocode before making your Twitter Search API call.
128
- >>>>>>> ef8ef7aaafceb04d69cdfb3963f229ec1ab666db:README.markdown
63
+ * The "near" operator available in the Twitter Search web interface is not available via the API. You must geocode before making your Twitter Search API call, and use the :geocode key in your request using the pattern lat,lngmi or lat,lngkm:
64
+
65
+ @tweets = @client.query :q => 'Pearl Jam', :geocode => '43.4411,-70.9846mi'
66
+
129
67
  * Searching for a positive attitude :) returns tweets containing the text :), =), :D, and :-)
130
68
 
131
69
  ## Authors
@@ -134,11 +72,7 @@ Written by Dustin Sallings (dustin@spy.net), forked by Dan Croak (dcroak@thought
134
72
 
135
73
  ## Resources
136
74
 
137
- <<<<<<< HEAD:README.markdown
138
- * [Official Summize API](http://summize.com/api)
139
- =======
140
75
  * [Official Twitter Search API](http://search.twitter.com/api)
141
- >>>>>>> ef8ef7aaafceb04d69cdfb3963f229ec1ab666db:README.markdown
142
76
 
143
77
  ## License
144
78
 
@@ -1,7 +1,7 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = "twitter-search"
3
- s.version = "0.4"
4
- s.date = "2008-07-15"
3
+ s.version = "0.5"
4
+ s.date = "2008-08-04"
5
5
  s.summary = "Ruby client for Twitter Search."
6
6
  s.email = "dcroak@thoughtbot.com"
7
7
  s.homepage = "http://github.com/dancroak/twitter-search"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dancroak-twitter-search
3
3
  version: !ruby/object:Gem::Version
4
- version: "0.4"
4
+ version: "0.5"
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dustin Sallings
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2008-07-15 00:00:00 -07:00
13
+ date: 2008-08-04 00:00:00 -07:00
14
14
  default_executable:
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency