README.rdoc in semrush-3.0.6 vs README.rdoc in semrush-3.0.7
- old
+ new
@@ -49,19 +49,26 @@
:db # (String) select the google engine ('us' for google.com 'fr' for google.fr)
:api_key # (String) change the api_key
:limit # (Integer) select only the first 'limit' entries (This parameter is required in order to avoid uncontrolled heavy usage)
:offset # (Integer) skip the first 'offset' entries
:export_columns # (String) select the columns you want to fetch, for instance: :export_columns => "Dn,Rk"
+ :before # (Proc or lambda) will be called before the call to SemRush (even if this return false it still runs the request)
+ :after # (Proc or lambda) will be called after the call to SemRush (if the call returns an exception, this will not be executed)
Some examples:
report = Semrush::Report.domain("seobook.com", :db => 'us', :limit => 100)
data = report.basics
or
report = Semrush::Report.domain("seobook.com")
data = report.basics(:db => 'us', :limit => 100)
+
+or
+
+ data = Semrush::Report.domain("seobook.com").basics(:db => 'us', :limit => 100, :before => lambda{|params| puts params})
+ data = Semrush::Report.domain("seobook.com").basics(:db => 'us', :limit => 100, :after => lambda{|params, results| puts results})
You will find more information about these parameters at http://www.semrush.com/api.html
== Reports