scrapio 1.1.2 → 1.3.0
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/lib/scrapio/client.rb +35 -14
- data/lib/scrapio/resources/airbnb.rb +20 -0
- data/lib/scrapio/resources/apple_app_store.rb +11 -0
- data/lib/scrapio/resources/autotrader.rb +21 -0
- data/lib/scrapio/resources/bing.rb +13 -0
- data/lib/scrapio/resources/chatgpt.rb +11 -0
- data/lib/scrapio/resources/gemini.rb +11 -0
- data/lib/scrapio/resources/perplexity.rb +11 -0
- data/lib/scrapio/resources/reddit.rb +19 -0
- data/lib/scrapio/resources/target.rb +19 -0
- data/lib/scrapio/resources/tiktok.rb +11 -0
- data/lib/scrapio/resources/youtube.rb +4 -0
- metadata +11 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 760639658ac952e56f04a04221155ac8c7b6dab9c2be1140f8d1441307c9730a
|
|
4
|
+
data.tar.gz: 8b94beaf8ec0ce78748da5d1c3256ef9b35697c9b3928c3caf847cf4d3447dc9
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 724ceecd96137cb59dfdbaeec49982a4e044eae59e298f21519c3bd0cdb22cd19e0430ef187df7882d3bc8e887ea3942850a1fd0e1f1057d5627efe7174d1260
|
|
7
|
+
data.tar.gz: 19dda6be8df58d0bbf1365f39b31a7dd3a04ccdea5fe6c0407b63e849816e6c81a028cad4292506ef5fe6a38809596f76c95fab5a03306e37ea3dd52c672cc9f
|
data/lib/scrapio/client.rb
CHANGED
|
@@ -12,28 +12,49 @@ require_relative "resources/search"
|
|
|
12
12
|
require_relative "resources/map"
|
|
13
13
|
require_relative "resources/booking"
|
|
14
14
|
require_relative "resources/agoda"
|
|
15
|
+
require_relative "resources/airbnb"
|
|
16
|
+
require_relative "resources/autotrader"
|
|
17
|
+
require_relative "resources/chatgpt"
|
|
18
|
+
require_relative "resources/perplexity"
|
|
19
|
+
require_relative "resources/gemini"
|
|
20
|
+
require_relative "resources/bing"
|
|
21
|
+
require_relative "resources/reddit"
|
|
22
|
+
require_relative "resources/tiktok"
|
|
23
|
+
require_relative "resources/target"
|
|
24
|
+
require_relative "resources/apple_app_store"
|
|
15
25
|
|
|
16
26
|
module Scrapio
|
|
17
27
|
class Client
|
|
18
28
|
attr_reader :fetch, :google, :amazon, :walmart, :youtube, :jobs, :crawl, :interact,
|
|
19
|
-
:fast_search, :search, :map, :booking, :agoda
|
|
29
|
+
:fast_search, :search, :map, :booking, :agoda,
|
|
30
|
+
:airbnb, :autotrader, :chatgpt, :perplexity, :gemini, :bing, :reddit, :tiktok, :target, :apple_app_store
|
|
20
31
|
|
|
21
32
|
def initialize(api_key, base_url: HttpClient::DEFAULT_BASE_URL, timeout: HttpClient::DEFAULT_TIMEOUT)
|
|
22
33
|
http = HttpClient.new(api_key, base_url: base_url, timeout: timeout)
|
|
23
34
|
|
|
24
|
-
@fetch
|
|
25
|
-
@google
|
|
26
|
-
@amazon
|
|
27
|
-
@walmart
|
|
28
|
-
@youtube
|
|
29
|
-
@jobs
|
|
30
|
-
@crawl
|
|
31
|
-
@interact
|
|
32
|
-
@fast_search
|
|
33
|
-
@search
|
|
34
|
-
@map
|
|
35
|
-
@booking
|
|
36
|
-
@agoda
|
|
35
|
+
@fetch = Resources::Fetch.new(http)
|
|
36
|
+
@google = Resources::Google.new(http)
|
|
37
|
+
@amazon = Resources::Amazon.new(http)
|
|
38
|
+
@walmart = Resources::Walmart.new(http)
|
|
39
|
+
@youtube = Resources::YouTube.new(http)
|
|
40
|
+
@jobs = Resources::Jobs.new(http)
|
|
41
|
+
@crawl = Resources::Crawl.new(http)
|
|
42
|
+
@interact = Resources::Interact.new(http)
|
|
43
|
+
@fast_search = Resources::FastSearch.new(http)
|
|
44
|
+
@search = Resources::Search.new(http)
|
|
45
|
+
@map = Resources::Map.new(http)
|
|
46
|
+
@booking = Resources::Booking.new(http)
|
|
47
|
+
@agoda = Resources::Agoda.new(http)
|
|
48
|
+
@airbnb = Resources::Airbnb.new(http)
|
|
49
|
+
@autotrader = Resources::Autotrader.new(http)
|
|
50
|
+
@chatgpt = Resources::Chatgpt.new(http)
|
|
51
|
+
@perplexity = Resources::Perplexity.new(http)
|
|
52
|
+
@gemini = Resources::Gemini.new(http)
|
|
53
|
+
@bing = Resources::Bing.new(http)
|
|
54
|
+
@reddit = Resources::Reddit.new(http)
|
|
55
|
+
@tiktok = Resources::TikTok.new(http)
|
|
56
|
+
@target = Resources::Target.new(http)
|
|
57
|
+
@apple_app_store = Resources::AppleAppStore.new(http)
|
|
37
58
|
end
|
|
38
59
|
end
|
|
39
60
|
end
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
module Scrapio
|
|
2
|
+
module Resources
|
|
3
|
+
class Airbnb
|
|
4
|
+
def initialize(http) = @http = http
|
|
5
|
+
|
|
6
|
+
def search(location:, check_in: nil, check_out: nil, adults: nil, children: nil, infants: nil, pets: nil)
|
|
7
|
+
@http.get("/v1/airbnb/search", {
|
|
8
|
+
location: location, check_in: check_in, check_out: check_out,
|
|
9
|
+
adults: adults, children: children, infants: infants, pets: pets,
|
|
10
|
+
})
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
def get_listing(listing_id, check_in: nil, check_out: nil, adults: nil)
|
|
14
|
+
@http.get("/v1/airbnb/listing", {
|
|
15
|
+
listing_id: listing_id, check_in: check_in, check_out: check_out, adults: adults,
|
|
16
|
+
})
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
module Scrapio
|
|
2
|
+
module Resources
|
|
3
|
+
class Autotrader
|
|
4
|
+
def initialize(http) = @http = http
|
|
5
|
+
|
|
6
|
+
def search(postcode:, radius: nil, make: nil, model: nil, year_from: nil, year_to: nil, exclude_writeoffs: nil, page: nil, geo: nil)
|
|
7
|
+
@http.get("/v1/autotrader/search", {
|
|
8
|
+
postcode: postcode, radius: radius, make: make, model: model,
|
|
9
|
+
year_from: year_from, year_to: year_to,
|
|
10
|
+
exclude_writeoffs: exclude_writeoffs, page: page, geo: geo,
|
|
11
|
+
})
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
def get_listing(listing_id, geo: nil)
|
|
15
|
+
@http.get("/v1/autotrader/listing", {
|
|
16
|
+
listing_id: listing_id, geo: geo,
|
|
17
|
+
})
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
module Scrapio
|
|
2
|
+
module Resources
|
|
3
|
+
class Bing
|
|
4
|
+
def initialize(http) = @http = http
|
|
5
|
+
|
|
6
|
+
def search(search, geo: nil, locale: nil, domain: nil, page: nil, page_count: nil)
|
|
7
|
+
@http.get("/v1/bing/search", {
|
|
8
|
+
search: search, geo: geo, locale: locale, domain: domain, page: page, page_count: page_count,
|
|
9
|
+
})
|
|
10
|
+
end
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
end
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
module Scrapio
|
|
2
|
+
module Resources
|
|
3
|
+
class Reddit
|
|
4
|
+
def initialize(http) = @http = http
|
|
5
|
+
|
|
6
|
+
def get_post(url)
|
|
7
|
+
@http.get("/v1/reddit/post", { url: url })
|
|
8
|
+
end
|
|
9
|
+
|
|
10
|
+
def get_subreddit(subreddit: nil, url: nil)
|
|
11
|
+
@http.get("/v1/reddit/subreddit", { subreddit: subreddit, url: url })
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
def get_user(username: nil, url: nil)
|
|
15
|
+
@http.get("/v1/reddit/user", { username: username, url: url })
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
end
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
module Scrapio
|
|
2
|
+
module Resources
|
|
3
|
+
class Target
|
|
4
|
+
def initialize(http) = @http = http
|
|
5
|
+
|
|
6
|
+
def get_product(product_id, delivery_type: nil, delivery_zip: nil, store_id: nil)
|
|
7
|
+
@http.get("/v1/target/product", {
|
|
8
|
+
product_id: product_id, delivery_type: delivery_type, delivery_zip: delivery_zip, store_id: store_id,
|
|
9
|
+
})
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
def search(search, delivery_type: nil, delivery_zip: nil, store_id: nil)
|
|
13
|
+
@http.get("/v1/target/search", {
|
|
14
|
+
search: search, delivery_type: delivery_type, delivery_zip: delivery_zip, store_id: store_id,
|
|
15
|
+
})
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
end
|
|
@@ -17,6 +17,10 @@ module Scrapio
|
|
|
17
17
|
def get_subtitles(video_id, language: nil)
|
|
18
18
|
@http.get("/v1/youtube/subtitles", { video_id: video_id, language: language })
|
|
19
19
|
end
|
|
20
|
+
|
|
21
|
+
def get_channel(handle, limit: nil)
|
|
22
|
+
@http.get("/v1/youtube/channel", { handle: handle, limit: limit })
|
|
23
|
+
end
|
|
20
24
|
end
|
|
21
25
|
end
|
|
22
26
|
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: scrapio
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.3.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Scrapio
|
|
@@ -23,16 +23,26 @@ files:
|
|
|
23
23
|
- lib/scrapio/errors.rb
|
|
24
24
|
- lib/scrapio/http_client.rb
|
|
25
25
|
- lib/scrapio/resources/agoda.rb
|
|
26
|
+
- lib/scrapio/resources/airbnb.rb
|
|
26
27
|
- lib/scrapio/resources/amazon.rb
|
|
28
|
+
- lib/scrapio/resources/apple_app_store.rb
|
|
29
|
+
- lib/scrapio/resources/autotrader.rb
|
|
30
|
+
- lib/scrapio/resources/bing.rb
|
|
27
31
|
- lib/scrapio/resources/booking.rb
|
|
32
|
+
- lib/scrapio/resources/chatgpt.rb
|
|
28
33
|
- lib/scrapio/resources/crawl.rb
|
|
29
34
|
- lib/scrapio/resources/fast_search.rb
|
|
30
35
|
- lib/scrapio/resources/fetch.rb
|
|
36
|
+
- lib/scrapio/resources/gemini.rb
|
|
31
37
|
- lib/scrapio/resources/google.rb
|
|
32
38
|
- lib/scrapio/resources/interact.rb
|
|
33
39
|
- lib/scrapio/resources/jobs.rb
|
|
34
40
|
- lib/scrapio/resources/map.rb
|
|
41
|
+
- lib/scrapio/resources/perplexity.rb
|
|
42
|
+
- lib/scrapio/resources/reddit.rb
|
|
35
43
|
- lib/scrapio/resources/search.rb
|
|
44
|
+
- lib/scrapio/resources/target.rb
|
|
45
|
+
- lib/scrapio/resources/tiktok.rb
|
|
36
46
|
- lib/scrapio/resources/walmart.rb
|
|
37
47
|
- lib/scrapio/resources/youtube.rb
|
|
38
48
|
homepage: https://scrapio.dev
|