leash-integration-brave-search 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.
- checksums.yaml +7 -0
- data/lib/leash/integration/brave-search.rb +44 -0
- metadata +57 -0
checksums.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: 4b5ff41870d23c40540da90b7c46cd8a6628f742cd4d496cb6721d637b59b768
|
|
4
|
+
data.tar.gz: 409131c04bd5a386c26e68983f05f7841f7c6bb2e07493a82b81bb687a394702
|
|
5
|
+
SHA512:
|
|
6
|
+
metadata.gz: b1b40b871cad3a3669831f4fd92982a7b3c7604157720739d189576fec792dbef3298c43a29a9eee95131593609c626404080b827c76e174ebc7b3b9357a6242
|
|
7
|
+
data.tar.gz: b38eed9d46d744498807638468b4c3d1d265c8bb8ed08d636337a78e9f41a5315108d8211212ceb6db1eec22f9e322698a81f5ebb7b0cab4dcd262585cf19383
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# Auto-generated by leash-codegen — do not edit manually
|
|
4
|
+
|
|
5
|
+
module Leash
|
|
6
|
+
module Integration
|
|
7
|
+
class BraveSearchClient
|
|
8
|
+
# Create a new Brave Search integration client.
|
|
9
|
+
#
|
|
10
|
+
# @param leash [Leash::Client] the Leash SDK client
|
|
11
|
+
def initialize(leash)
|
|
12
|
+
@leash = leash
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
# Performs a web search using the Brave Search API, ideal for general queries, news, articles, and online content. Use this for broad information gathering, recent events, or when you need diverse we...
|
|
16
|
+
#
|
|
17
|
+
# @param query [String] Search query (max 400 chars, 50 words)
|
|
18
|
+
# @param count [Float, nil] Number of results (1-20, default 10)
|
|
19
|
+
# @param offset [Float, nil] Pagination offset (max 9, default 0)
|
|
20
|
+
# @return [Object]
|
|
21
|
+
def brave_web_search(query, count: nil, offset: nil)
|
|
22
|
+
params = {
|
|
23
|
+
'query' => query,
|
|
24
|
+
'count' => count,
|
|
25
|
+
'offset' => offset
|
|
26
|
+
}.compact
|
|
27
|
+
@leash.call('brave-search', 'brave_web_search', params)
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
# Searches for local businesses and places using Brave's Local Search API. Best for queries related to physical locations, businesses, restaurants, services, etc. Returns detailed information includi...
|
|
31
|
+
#
|
|
32
|
+
# @param query [String] Local search query (e.g. 'pizza near Central Park')
|
|
33
|
+
# @param count [Float, nil] Number of results (1-20, default 5)
|
|
34
|
+
# @return [Object]
|
|
35
|
+
def brave_local_search(query, count: nil)
|
|
36
|
+
params = {
|
|
37
|
+
'query' => query,
|
|
38
|
+
'count' => count
|
|
39
|
+
}.compact
|
|
40
|
+
@leash.call('brave-search', 'brave_local_search', params)
|
|
41
|
+
end
|
|
42
|
+
end
|
|
43
|
+
end
|
|
44
|
+
end
|
metadata
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
|
2
|
+
name: leash-integration-brave-search
|
|
3
|
+
version: !ruby/object:Gem::Version
|
|
4
|
+
version: 0.1.0
|
|
5
|
+
platform: ruby
|
|
6
|
+
authors:
|
|
7
|
+
- Leash
|
|
8
|
+
autorequire:
|
|
9
|
+
bindir: bin
|
|
10
|
+
cert_chain: []
|
|
11
|
+
date: 2026-04-14 00:00:00.000000000 Z
|
|
12
|
+
dependencies:
|
|
13
|
+
- !ruby/object:Gem::Dependency
|
|
14
|
+
name: leash-sdk
|
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
|
16
|
+
requirements:
|
|
17
|
+
- - ">="
|
|
18
|
+
- !ruby/object:Gem::Version
|
|
19
|
+
version: 0.2.0
|
|
20
|
+
type: :runtime
|
|
21
|
+
prerelease: false
|
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
23
|
+
requirements:
|
|
24
|
+
- - ">="
|
|
25
|
+
- !ruby/object:Gem::Version
|
|
26
|
+
version: 0.2.0
|
|
27
|
+
description: Auto-generated typed client for the Brave Search integration on Leash.
|
|
28
|
+
email:
|
|
29
|
+
executables: []
|
|
30
|
+
extensions: []
|
|
31
|
+
extra_rdoc_files: []
|
|
32
|
+
files:
|
|
33
|
+
- lib/leash/integration/brave-search.rb
|
|
34
|
+
homepage: https://github.com/leash-build/leash-codegen
|
|
35
|
+
licenses:
|
|
36
|
+
- Apache-2.0
|
|
37
|
+
metadata: {}
|
|
38
|
+
post_install_message:
|
|
39
|
+
rdoc_options: []
|
|
40
|
+
require_paths:
|
|
41
|
+
- lib
|
|
42
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
|
43
|
+
requirements:
|
|
44
|
+
- - ">="
|
|
45
|
+
- !ruby/object:Gem::Version
|
|
46
|
+
version: 2.7.0
|
|
47
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
48
|
+
requirements:
|
|
49
|
+
- - ">="
|
|
50
|
+
- !ruby/object:Gem::Version
|
|
51
|
+
version: '0'
|
|
52
|
+
requirements: []
|
|
53
|
+
rubygems_version: 3.0.3.1
|
|
54
|
+
signing_key:
|
|
55
|
+
specification_version: 4
|
|
56
|
+
summary: Typed Brave Search integration for Leash
|
|
57
|
+
test_files: []
|