outscraper 0.1.0 → 0.1.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 65a939a94dd3d9793fa52fb70d88e459ecdf5e89094488c87556872d1c300089
4
- data.tar.gz: 8351ff51f9ed94399499b70618c3b3c1c93e0d1a60ec9a4bef48a673a8024341
3
+ metadata.gz: 9d30d94dec1449e809f12bfb520db6a48f1e8cee6cbb5d7aefb81b145c7d8ef3
4
+ data.tar.gz: b5c7c30ec0656d227090169d7ba154e94452a44d67023099627c2f61a21f59f8
5
5
  SHA512:
6
- metadata.gz: ce6b3e0340fe063b0873d86a1fd969dd862f3411a62b9763b4475fe0b7291b4cce7082a33c07a46d9c63cc7a3b0a33be85b288ee714fb6f548d3585f76ed71da
7
- data.tar.gz: 6203eddded899cd60453e56159c21117540bf052e6abc7cdeb4c5ac3a7b5a9c0e29abcb09fd533b344b2269a542c7f61831b0e86da91c5aaf994b9a0adea288a
6
+ metadata.gz: 1615e0a98977b113fc62293cc18282bab0238d974767ec3a920d6eeb5bae3ebd54aa905209cb2e1c864c7f601aa1efd77103836d9a60707bcdda31071e32eef9
7
+ data.tar.gz: 3e8a7103940b8e548af332087e4a65abcd3cafe004a329ed27cd2d80db3eba158a94a37e399de2bc517e449007926d76b843f545a82377b6a0bf35751ddc0306
data/README.md CHANGED
@@ -1,22 +1,46 @@
1
- # Outscraper
1
+ # Outscraper Ruby Library
2
2
 
3
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/outscraper`. To experiment with that code, run `bin/console` for an interactive prompt.
4
-
5
- TODO: Delete this and the text above, and describe your gem
3
+ The library provides convenient access to the [Outscraper API](https://app.outscraper.com/api-docs) from applications written in the Ruby language. Allows using [Outscraper's services](https://outscraper.com/services/) from your code.
6
4
 
7
5
  ## Installation
8
6
 
9
7
  Install the gem and add to the application's Gemfile by executing:
10
-
11
- $ bundle add outscraper
8
+ ```bash
9
+ bundle add outscraper
10
+ ```
12
11
 
13
12
  If bundler is not being used to manage dependencies, install the gem by executing:
13
+ ```bash
14
+ gem install outscraper
15
+ ```
16
+
17
+ [Link to the Ruby package page](https://rubygems.org/gems/outscraper)
14
18
 
15
- $ gem install outscraper
19
+ ## Initialization
20
+ ```ruby
21
+ require 'Outscraper'
22
+
23
+ client = Outscraper::Client.new('SECRET_API_KEY')
24
+ ```
25
+ [Link to the profile page to create the API key](https://app.outscraper.com/profile)
16
26
 
17
27
  ## Usage
18
28
 
19
- TODO: Write usage instructions here
29
+ ```ruby
30
+ # Search for businesses in specific locations:
31
+ result = client.google_maps_search_v2('restaurants brooklyn usa', limit: 20, language: 'en', region: 'us')
32
+
33
+ # Get data of the specific place by id
34
+ result = client.google_maps_search_v2('ChIJrc9T9fpYwokRdvjYRHT8nI4', language: 'en')
35
+
36
+ # Get reviews of the specific place by id
37
+ result = client.google_maps_reviews_v3('ChIJrc9T9fpYwokRdvjYRHT8nI4', reviews_limit: 20, language: 'en')
38
+
39
+ # Search contacts from website
40
+ result = client.emails_and_contacts('outscraper.com')
41
+ ```
42
+
43
+ [More examples](https://github.com/outscraper/outscraper-ruby/tree/master/examples)
20
44
 
21
45
  ## Development
22
46
 
@@ -27,11 +51,3 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
27
51
  ## Contributing
28
52
 
29
53
  Bug reports and pull requests are welcome on GitHub at https://github.com/outscraper/outscraper-ruby. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/outscraper/outscraper-ruby/blob/master/CODE_OF_CONDUCT.md).
30
-
31
- ## License
32
-
33
- The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
34
-
35
- ## Code of Conduct
36
-
37
- Everyone interacting in the Outscraper project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/outscraper/outscraper-ruby/blob/master/CODE_OF_CONDUCT.md).
@@ -0,0 +1,32 @@
1
+ # Emails And Contacts Scraper With Ruby
2
+
3
+ Allows finding email addresses, social links, and phones from domains via [Outscraper API](https://app.outscraper.com/api-docs#tag/Emails-and-Contacts).
4
+
5
+ ## Installation
6
+
7
+ Install the gem and add to the application's Gemfile by executing:
8
+ ```bash
9
+ bundle add outscraper
10
+ ```
11
+
12
+ If bundler is not being used to manage dependencies, install the gem by executing:
13
+ ```bash
14
+ gem install outscraper
15
+ ```
16
+
17
+ [Link to the Ruby package page](https://rubygems.org/gems/outscraper)
18
+
19
+ ## Initialization
20
+ ```ruby
21
+ require 'Outscraper'
22
+
23
+ client = Outscraper::Client.new('SECRET_API_KEY')
24
+ ```
25
+ [Link to the profile page to create the API key](https://app.outscraper.com/profile)
26
+
27
+ ## Usage
28
+
29
+ ```ruby
30
+ # Search contacts from website:
31
+ result = client.emails_and_contacts('outscraper.com')
32
+ ```
@@ -0,0 +1,41 @@
1
+ # Google Maps Reviews Scraper With Ruby
2
+
3
+ The library provides real-time access to the reviews from Google Maps via [Outscraper API](https://app.outscraper.com/api-docs#tag/Google-Reviews).
4
+
5
+ ## Installation
6
+
7
+ Install the gem and add to the application's Gemfile by executing:
8
+ ```bash
9
+ bundle add outscraper
10
+ ```
11
+
12
+ If bundler is not being used to manage dependencies, install the gem by executing:
13
+ ```bash
14
+ gem install outscraper
15
+ ```
16
+
17
+ [Link to the Ruby package page](https://rubygems.org/gems/outscraper)
18
+
19
+ ## Initialization
20
+ ```ruby
21
+ require 'Outscraper'
22
+
23
+ client = Outscraper::Client.new('SECRET_API_KEY')
24
+ ```
25
+ [Link to the profile page to create the API key](https://app.outscraper.com/profile)
26
+
27
+ ## Usage
28
+
29
+ ```ruby
30
+ # Get reviews of the specific place by id
31
+ result = client.google_maps_reviews_v3('ChIJrc9T9fpYwokRdvjYRHT8nI4', reviews_limit: 20, language: 'en')
32
+
33
+ # Get reviews for places found by search query
34
+ result = client.google_maps_reviews_v3('Memphis Seoul brooklyn usa', reviews_limit: 20, limit: 500, language: 'en')
35
+
36
+ # Get only new reviews during last 24 hours
37
+ yesterday_timestamp = 1657980986
38
+
39
+ result = client.google_maps_reviews_v3(
40
+ 'ChIJrc9T9fpYwokRdvjYRHT8nI4', sort: 'newest', cutoff: yesterday_timestamp, reviews_limit: 100, language: 'en')
41
+ ```
@@ -0,0 +1,35 @@
1
+ # Google Maps Scraper With Ruby
2
+
3
+ The library provides real-time access to the places from Google Maps via [Outscraper API](https://app.outscraper.com/api-docs#tag/Google-Maps).
4
+
5
+ ## Installation
6
+
7
+ Install the gem and add to the application's Gemfile by executing:
8
+ ```bash
9
+ bundle add outscraper
10
+ ```
11
+
12
+ If bundler is not being used to manage dependencies, install the gem by executing:
13
+ ```bash
14
+ gem install outscraper
15
+ ```
16
+
17
+ [Link to the Ruby package page](https://rubygems.org/gems/outscraper)
18
+
19
+ ## Initialization
20
+ ```ruby
21
+ require 'Outscraper'
22
+
23
+ client = Outscraper::Client.new('SECRET_API_KEY')
24
+ ```
25
+ [Link to the profile page to create the API key](https://app.outscraper.com/profile)
26
+
27
+ ## Usage
28
+
29
+ ```ruby
30
+ # Search for businesses in specific locations:
31
+ result = client.google_maps_search_v2('restaurants brooklyn usa', limit: 20, language: 'en', region: 'us')
32
+
33
+ # Get data of the specific place by id
34
+ result = client.google_maps_search_v2('ChIJrc9T9fpYwokRdvjYRHT8nI4', language: 'en')
35
+ ```
@@ -0,0 +1,32 @@
1
+ # Phone Numbers Enricher/Validator
2
+
3
+ Returns phones carrier data (name/type), validates phones, ensures messages deliverability via [Outscraper API](https://app.outscraper.com/api-docs#tag/Phones/paths/~1phones-enricher/get).
4
+
5
+ ## Installation
6
+
7
+ Install the gem and add to the application's Gemfile by executing:
8
+ ```bash
9
+ bundle add outscraper
10
+ ```
11
+
12
+ If bundler is not being used to manage dependencies, install the gem by executing:
13
+ ```bash
14
+ gem install outscraper
15
+ ```
16
+
17
+ [Link to the Ruby package page](https://rubygems.org/gems/outscraper)
18
+
19
+ ## Initialization
20
+ ```ruby
21
+ require 'Outscraper'
22
+
23
+ client = Outscraper::Client.new('SECRET_API_KEY')
24
+ ```
25
+ [Link to the profile page to create the API key](https://app.outscraper.com/profile)
26
+
27
+ ## Usage
28
+
29
+ ```ruby
30
+ # Search contacts from website:
31
+ result = client.phones_enricher('12812368208')
32
+ ```
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Outscraper
4
- VERSION = "0.1.0"
4
+ VERSION = "0.1.1"
5
5
  end
data/lib/outscraper.rb CHANGED
@@ -49,5 +49,12 @@ module Outscraper
49
49
  async: false,
50
50
  }).parsed_response['data']
51
51
  end
52
+
53
+ def phones_enricher(query)
54
+ response = self.class.get("/phones-enricher", 'query': {
55
+ query: query,
56
+ async: false,
57
+ }).parsed_response['data']
58
+ end
52
59
  end
53
60
  end
metadata CHANGED
@@ -1,11 +1,11 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: outscraper
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Outscraper
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
11
  date: 2022-07-16 00:00:00.000000000 Z
@@ -39,6 +39,10 @@ files:
39
39
  - LICENSE.txt
40
40
  - README.md
41
41
  - Rakefile
42
+ - examples/Emails And Contacts.md
43
+ - examples/Google Maps Reviews.md
44
+ - examples/Google Maps.md
45
+ - examples/Phones Validator.md
42
46
  - lib/outscraper.rb
43
47
  - lib/outscraper/version.rb
44
48
  - sig/outscraper.rbs
@@ -52,7 +56,7 @@ metadata:
52
56
  bug_tracker_uri: https://github.com/outscraper/outscraper-ruby/issues
53
57
  documentation_uri: https://app.outscraper.com/api-docs
54
58
  github_repo: ssh://github.com/outscraper/outscraper-ruby
55
- post_install_message:
59
+ post_install_message:
56
60
  rdoc_options: []
57
61
  require_paths:
58
62
  - lib
@@ -67,8 +71,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
67
71
  - !ruby/object:Gem::Version
68
72
  version: '0'
69
73
  requirements: []
70
- rubygems_version: 3.3.11
71
- signing_key:
74
+ rubygems_version: 3.0.3.1
75
+ signing_key:
72
76
  specification_version: 4
73
77
  summary: Ruby bindings for the Outscraper API
74
78
  test_files: []