autom 0.1.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.
data/sig/autom.rbs ADDED
@@ -0,0 +1,101 @@
1
+ module Autom
2
+ VERSION: String
3
+ ENDPOINTS: Hash[String, Hash[Symbol, untyped]]
4
+
5
+ class Error < StandardError
6
+ end
7
+ class ConfigurationError < Error
8
+ end
9
+ class SerializationError < Error
10
+ attr_reader param: String?
11
+ def initialize: (String message, ?String? param) -> void
12
+ end
13
+ class TransportError < Error
14
+ end
15
+ class APIError < Error
16
+ attr_reader status: Integer
17
+ attr_reader error_message: String?
18
+ attr_reader response_body: untyped
19
+ attr_reader raw_response: RawResponse
20
+ end
21
+ class ResponseDecodingError < Error
22
+ attr_reader raw_response: RawResponse
23
+ end
24
+ class JobTimeoutError < Error
25
+ attr_reader job_id: String
26
+ attr_reader last_response: JsonResponse?
27
+ end
28
+
29
+ class RawResponse < Struct[untyped]
30
+ attr_accessor status: Integer
31
+ attr_accessor headers: Hash[String, Array[String]]
32
+ attr_accessor content_type: String?
33
+ attr_accessor body: String
34
+ end
35
+
36
+ class JsonResponse
37
+ attr_reader data: untyped
38
+ attr_reader raw_response: RawResponse
39
+ def kind: () -> :json
40
+ def json?: () -> true
41
+ def binary?: () -> false
42
+ end
43
+ class BinaryResponse
44
+ attr_reader bytes: String
45
+ attr_reader content_type: String?
46
+ attr_reader raw_response: RawResponse
47
+ def kind: () -> :binary
48
+ def json?: () -> false
49
+ def binary?: () -> true
50
+ def save: (String path) -> Integer
51
+ end
52
+
53
+ class BatchResult < Struct[untyped]
54
+ attr_accessor index: Integer
55
+ attr_accessor value: untyped
56
+ attr_accessor error: StandardError?
57
+ def ok?: () -> bool
58
+ end
59
+
60
+ type response = JsonResponse | BinaryResponse
61
+ type request_options = { ?method: String, ?timeout: Numeric?, ?headers: Hash[String, String], ?max_retries: Integer }
62
+
63
+ module Operations
64
+ def bing_search: (query: String, ?page: Numeric, ?num: Numeric, ?location: String, ?lat: Numeric, ?lon: Numeric, ?mkt: String, ?cc: String, ?fields: String, ?is_async: bool, ?soft_fail: bool, ?request_options: request_options?) -> JsonResponse
65
+ def brave_images: (query: String, ?page: Numeric, ?gl: String, ?hl: String, ?safe: String, ?fields: String, ?is_async: bool, ?soft_fail: bool, ?request_options: request_options?) -> JsonResponse
66
+ def brave_search: (query: String, ?page: Numeric, ?gl: String, ?hl: String, ?fields: String, ?is_async: bool, ?soft_fail: bool, ?request_options: request_options?) -> JsonResponse
67
+ def brave_videos: (query: String, ?page: Numeric, ?gl: String, ?hl: String, ?safe: String, ?fields: String, ?is_async: bool, ?soft_fail: bool, ?request_options: request_options?) -> JsonResponse
68
+ def duckduckgo_search: (query: String, ?page: Numeric, ?gl: String, ?hl: String, ?fields: String, ?is_async: bool, ?soft_fail: bool, ?request_options: request_options?) -> JsonResponse
69
+ def finder_google_countries: (query: String, ?fields: String, ?is_async: bool, ?soft_fail: bool, ?request_options: request_options?) -> JsonResponse
70
+ def finder_google_languages: (query: String, ?fields: String, ?is_async: bool, ?soft_fail: bool, ?request_options: request_options?) -> JsonResponse
71
+ def finder_google_locations: (query: String, ?fields: String, ?is_async: bool, ?soft_fail: bool, ?request_options: request_options?) -> JsonResponse
72
+ def google_images: (query: String, ?page: Numeric, ?google_domain: String, ?gl: String, ?hl: String, ?cr: String, ?lr: String, ?async: bool, ?safe: String, ?fields: String, ?is_async: bool, ?soft_fail: bool, ?request_options: request_options?) -> JsonResponse
73
+ def google_jobs: (query: String, ?uds: String, ?lrad: Numeric, ?ltype: Numeric, ?location: String, ?uule: String, ?google_domain: String, ?gl: String, ?hl: String, ?cr: String, ?lr: String, ?next_page_token: String, ?fields: String, ?is_async: bool, ?soft_fail: bool, ?request_options: request_options?) -> JsonResponse
74
+ def google_maps: (query: String, ?page: Numeric, ?google_domain: String, ?gl: String, ?hl: String, ?cr: String, ?lr: String, ?ll: String, ?fields: String, ?is_async: bool, ?soft_fail: bool, ?request_options: request_options?) -> JsonResponse
75
+ def google_news: (query: String, ?page: Numeric, ?num: Numeric, ?google_domain: String, ?gl: String, ?hl: String, ?cr: String, ?lr: String, ?fields: String, ?is_async: bool, ?soft_fail: bool, ?request_options: request_options?) -> JsonResponse
76
+ def google_search: (query: String, ?tbs: String, ?safe: String, ?location: String, ?uule: String, ?google_domain: String, ?gl: String, ?hl: String, ?cr: String, ?lr: String, ?page: Numeric, ?num: Numeric, ?fields: String, ?is_async: bool, ?soft_fail: bool, ?request_options: request_options?) -> JsonResponse
77
+ def google_search_ai: (query: String, ?location: String, ?uule: String, ?google_domain: String, ?gl: String, ?hl: String, ?cr: String, ?lr: String, ?fields: String, ?is_async: bool, ?soft_fail: bool, ?request_options: request_options?) -> JsonResponse
78
+ def google_search_autocomplete: (query: String, ?cp: Numeric, ?google_domain: String, ?gl: String, ?hl: String, ?cr: String, ?lr: String, ?fields: String, ?is_async: bool, ?soft_fail: bool, ?request_options: request_options?) -> JsonResponse
79
+ def google_search_light: (query: String, ?google_domain: String, ?gl: String, ?hl: String, ?cr: String, ?lr: String, ?fields: String, ?is_async: bool, ?soft_fail: bool, ?request_options: request_options?) -> JsonResponse
80
+ def google_shopping: (query: String, ?page: Numeric, ?location: String, ?uule: String, ?google_domain: String, ?gl: String, ?hl: String, ?cr: String, ?lr: String, ?safe: String, ?fields: String, ?is_async: bool, ?soft_fail: bool, ?request_options: request_options?) -> JsonResponse
81
+ def google_videos: (query: String, ?location: String, ?uule: String, ?google_domain: String, ?gl: String, ?hl: String, ?cr: String, ?lr: String, page: Numeric, ?num: Numeric, ?safe: String, ?fields: String, ?is_async: bool, ?soft_fail: bool, ?request_options: request_options?) -> JsonResponse
82
+ def jobs: (id: String, ?request_options: request_options?) -> JsonResponse
83
+ def search: (query: String, ?engines: String, ?gl: String, ?hl: String, ?fields: String, ?is_async: bool, ?soft_fail: bool, ?request_options: request_options?) -> JsonResponse
84
+ def stats: (?engine: String, ?path: String, ?request_options: request_options?) -> JsonResponse
85
+ def usage: (?request_options: request_options?) -> JsonResponse
86
+ def yahoo_search: (query: String, ?page: Numeric, ?gl: String, ?hl: String, ?fields: String, ?is_async: bool, ?soft_fail: bool, ?request_options: request_options?) -> JsonResponse
87
+ end
88
+
89
+ class Client
90
+ include Operations
91
+ DEFAULT_CONCURRENCY: Integer
92
+ MAX_RETRIES: Integer
93
+ RETRY_BACKOFF_FACTOR: Float
94
+ DEFAULT_RETRY_DELAY: Float
95
+ DEFAULT_TIMEOUT: Integer
96
+ def initialize: (?api_key: String?, ?base_url: String, ?timeout: Numeric?, ?headers: Hash[untyped, untyped], ?max_retries: Integer, ?retry_delay: Numeric, ?transport: untyped) -> void
97
+ def request: (String | Symbol method, String path, ?Hash[untyped, untyped]? params, ?timeout: Numeric?, ?headers: Hash[untyped, untyped]?, ?max_retries: Integer?) -> response
98
+ def batch: [I, T] (Enumerable[I] items, ?concurrency: Integer) { (I item) -> T } -> Array[BatchResult]
99
+ def wait_for_job: (String job_id, ?interval: Numeric, ?timeout: Numeric) ?{ (untyped job) -> void } -> JsonResponse
100
+ end
101
+ end
metadata ADDED
@@ -0,0 +1,65 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: autom
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Autom
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2026-11-06 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description: Google, Bing and Brave search results as structured JSON — web, maps,
14
+ news, shopping, images, jobs and AI Mode.
15
+ email:
16
+ - contact@autom.dev
17
+ executables: []
18
+ extensions: []
19
+ extra_rdoc_files: []
20
+ files:
21
+ - LICENSE
22
+ - README.md
23
+ - examples/README.md
24
+ - examples/json.rb
25
+ - examples/request.rb
26
+ - examples/wait_for_job.rb
27
+ - lib/autom.rb
28
+ - lib/autom/client.rb
29
+ - lib/autom/endpoints.rb
30
+ - lib/autom/errors.rb
31
+ - lib/autom/operations.rb
32
+ - lib/autom/responses.rb
33
+ - lib/autom/serialization.rb
34
+ - lib/autom/transport.rb
35
+ - lib/autom/version.rb
36
+ - sig/autom.rbs
37
+ homepage: https://www.autom.dev
38
+ licenses:
39
+ - MIT
40
+ metadata:
41
+ bug_tracker_uri: https://github.com/automdev/autom-ruby/issues
42
+ documentation_uri: https://docs.autom.dev
43
+ homepage_uri: https://www.autom.dev
44
+ rubygems_mfa_required: 'true'
45
+ source_code_uri: https://github.com/automdev/autom-ruby
46
+ post_install_message:
47
+ rdoc_options: []
48
+ require_paths:
49
+ - lib
50
+ required_ruby_version: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '3.1'
55
+ required_rubygems_version: !ruby/object:Gem::Requirement
56
+ requirements:
57
+ - - ">="
58
+ - !ruby/object:Gem::Version
59
+ version: '0'
60
+ requirements: []
61
+ rubygems_version: 3.5.22
62
+ signing_key:
63
+ specification_version: 4
64
+ summary: Official Ruby SDK for the Autom SERP API.
65
+ test_files: []