semrush 3.0.20 → 3.0.21
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.
- checksums.yaml +4 -4
- data/README.rdoc +9 -1
- data/lib/semrush.rb +2 -2
- data/lib/semrush/report.rb +2 -2
- data/lib/semrush/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 83e361a4af1be2983be970312eba832bebfe4b4f
|
|
4
|
+
data.tar.gz: afa0e8f84fcf1257b765fd7d29bd996120692b30
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 6087dbd1b5aa7aa92e9cc7ff36fa59f5798acb73478050d957d642f879152b9a0b3c642ec4d24e2f6aaee32a705b58441f62d708e56f90bd2193a5fd46fd90c3
|
|
7
|
+
data.tar.gz: f4f27b41c6cd525ec9138182515132828f8502c4ab0f137166a058b62b96b40328fe16557f9e6225a3c73823d4e443a70a4124fa8b0b5a0c3cf77437e075db6d
|
data/README.rdoc
CHANGED
|
@@ -101,9 +101,17 @@ For more information about the report types, please read http://www.semrush.com/
|
|
|
101
101
|
|
|
102
102
|
== ChangeLog
|
|
103
103
|
|
|
104
|
+
=== 3.0.21, 2018-04-14
|
|
105
|
+
|
|
106
|
+
* Move to SSL (https)
|
|
107
|
+
|
|
108
|
+
=== 3.0.20, 2017-03-16
|
|
109
|
+
|
|
110
|
+
* Add Phrase KDI support
|
|
111
|
+
|
|
104
112
|
=== 3.0.19, 2016-01-16
|
|
105
113
|
|
|
106
|
-
*
|
|
114
|
+
* Fix map bug with filtered organic report that has no results
|
|
107
115
|
|
|
108
116
|
=== 3.0.18, 2014-10-03
|
|
109
117
|
|
data/lib/semrush.rb
CHANGED
|
@@ -8,8 +8,8 @@ require 'semrush/exception'
|
|
|
8
8
|
require 'semrush/report'
|
|
9
9
|
|
|
10
10
|
module Semrush
|
|
11
|
-
API_REPORT_URL = "
|
|
12
|
-
API_UNITS_URL = "
|
|
11
|
+
API_REPORT_URL = "https://api.semrush.com/?type=%REPORT_TYPE%&%REQUEST_TYPE%=%REQUEST%&key=%API_KEY%&display_limit=%LIMIT%&display_offset=%OFFSET%&export=api&database=%DB%&export_columns=%EXPORT_COLUMNS%&display_sort=%DISPLAY_SORT%&display_filter=%DISPLAY_FILTER%&display_date=%DISPLAY_DATE%"
|
|
12
|
+
API_UNITS_URL = "https://www.semrush.com/users/countapiunits.html?key=%API_KEY%"
|
|
13
13
|
mattr_accessor :api_key
|
|
14
14
|
@@api_key = ""
|
|
15
15
|
mattr_accessor :debug
|
data/lib/semrush/report.rb
CHANGED
|
@@ -78,7 +78,7 @@ module Semrush
|
|
|
78
78
|
end
|
|
79
79
|
puts "[Semrush query] URL: #{@remaining_quota_url}" if Semrush.debug
|
|
80
80
|
url = URI.parse(@remaining_quota_url)
|
|
81
|
-
response = Net::HTTP.start(url.host, url.port) {|http|
|
|
81
|
+
response = Net::HTTP.start(url.host, url.port, :use_ssl => true) {|http|
|
|
82
82
|
http.get(url.path+"?"+url.query)
|
|
83
83
|
}
|
|
84
84
|
body = response.body
|
|
@@ -289,7 +289,7 @@ module Semrush
|
|
|
289
289
|
puts "[Semrush query] URL: #{temp_url}" if Semrush.debug
|
|
290
290
|
url = URI.parse(temp_url)
|
|
291
291
|
Semrush.before.call(@parameters.merge(:url => url))
|
|
292
|
-
response = Net::HTTP.start(url.host, url.port) {|http|
|
|
292
|
+
response = Net::HTTP.start(url.host, url.port, :use_ssl => true) {|http|
|
|
293
293
|
http.get(url.path+"?"+url.query)
|
|
294
294
|
}.body rescue "ERROR :: RESPONSE ERROR (-1)" # Make this error up
|
|
295
295
|
response.force_encoding("utf-8")
|
data/lib/semrush/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: semrush
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 3.0.
|
|
4
|
+
version: 3.0.21
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- arambert
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2018-04-14 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: activesupport
|