kagi-api 2.0.0 → 2.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2273209bbe168e49351c7bc6e0699a52632073311cbf7041450d3efb22a3c6b2
4
- data.tar.gz: 0e7a706bd510bcdc7be2352cd8847e92249ceec1cbbaa347f0bcb54429725909
3
+ metadata.gz: 200e45ebdd98377e00e0165e8de18dee27526cf50158b7e2e148569382a1aec2
4
+ data.tar.gz: b4b86b8dd979ea0bf2c9b5fcf2c3a13be79ceef0cf56f99c2a6e20a37847b45b
5
5
  SHA512:
6
- metadata.gz: 32814fcb9c345825ae35c1697c75a45615931e352f103242bb808de615f49fb5e183133a992b190eab1e597c8b829e221ce8ef2119f30ff2cb967eacbe63712c
7
- data.tar.gz: 20c924f3c84ae46b9b89ab951dd44712f46494e00a865be0ecb30557eb8320e3c6b45ac8262f91ce527ad0336817fc728b7470e5a705a593014a040eaa35857f
6
+ metadata.gz: 15df90d9430be6b9cb5f762c44295360ed788f63e9e191b1e18eb5b1012313698c49b53b1c3c92044b1a0500ec2f1a769a640333e64317e1f5cefd95df954449
7
+ data.tar.gz: 045b791a33688d2d5b3657c656725fecaf27f92fab8f81329a62ee809f0b590c348a632e85a29faed01fa118c9f02839e81fd77fad803bc84f9a7b6f574e80a1
checksums.yaml.gz.sig CHANGED
Binary file
data/kagi-api.gemspec CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |spec|
4
4
  spec.name = "kagi-api"
5
- spec.version = "2.0.0"
5
+ spec.version = "2.1.0"
6
6
  spec.authors = ["Brooke Kuhlmann"]
7
7
  spec.email = ["brooke@alchemists.io"]
8
8
  spec.homepage = "https://alchemists.io/projects/kagi-api"
@@ -22,7 +22,7 @@ module Kagi
22
22
  include Pipeable
23
23
  include Inspectable[contract: :type, error_contract: :type]
24
24
 
25
- def call(**params)
25
+ def call **params
26
26
  result = requester.get("enrich/news", **params)
27
27
 
28
28
  case result
@@ -22,7 +22,7 @@ module Kagi
22
22
  include Pipeable
23
23
  include Inspectable[contract: :type, error_contract: :type]
24
24
 
25
- def call(**params)
25
+ def call **params
26
26
  result = requester.get("enrich/web", **params)
27
27
 
28
28
  case result
@@ -21,7 +21,7 @@ module Kagi
21
21
  include Pipeable
22
22
  include Inspectable[contract: :type, error_contract: :type]
23
23
 
24
- def call(**params)
24
+ def call **params
25
25
  result = requester.post("fastgpt", **params)
26
26
 
27
27
  case result
@@ -21,7 +21,7 @@ module Kagi
21
21
  include Pipeable
22
22
  include Inspectable[contract: :type, error_contract: :type]
23
23
 
24
- def call(**params)
24
+ def call **params
25
25
  result = requester.get("search", **params)
26
26
 
27
27
  case result
@@ -21,7 +21,7 @@ module Kagi
21
21
  include Pipeable
22
22
  include Inspectable[contract: :type, error_contract: :type]
23
23
 
24
- def call(**params)
24
+ def call **params
25
25
  result = requester.post("summarize", **params)
26
26
 
27
27
  case result
@@ -8,7 +8,7 @@ module Kagi
8
8
 
9
9
  # Models error data.
10
10
  Error = Data.define :code, :message, :reference do
11
- def self.for(key_map: ERROR_MAP, **attributes)
11
+ def self.for key_map: ERROR_MAP, **attributes
12
12
  new(**attributes.transform_keys(key_map))
13
13
  end
14
14
 
@@ -6,7 +6,7 @@ module Kagi
6
6
  module Content
7
7
  # Models fast data.
8
8
  Fast = Data.define :output, :tokens, :references do
9
- def self.for(**attributes)
9
+ def self.for **attributes
10
10
  new(**attributes, references: attributes[:references].map { Reference[**it] })
11
11
  end
12
12
  end
@@ -8,7 +8,7 @@ module Kagi
8
8
 
9
9
  # Models search data.
10
10
  Search = Data.define :type, :rank, :title, :url, :snippet, :published_at, :thumbnail do
11
- def self.for(key_map: SEARCH_MAP, **attributes)
11
+ def self.for key_map: SEARCH_MAP, **attributes
12
12
  new(
13
13
  **attributes.transform_keys(key_map),
14
14
  thumbnail: (Thumbnail[**attributes[:thumbnail]] if attributes.key? :thumbnail)
@@ -23,7 +23,7 @@ module Kagi
23
23
  snippet: nil,
24
24
  published_at: nil,
25
25
  thumbnail: nil,
26
- **attributes
26
+ **
27
27
  )
28
28
  super
29
29
  end
@@ -5,7 +5,7 @@ module Kagi
5
5
  module Models
6
6
  # Models the API error.
7
7
  Error = Data.define :meta, :error do
8
- def self.for(**attributes)
8
+ def self.for **attributes
9
9
  new(
10
10
  **attributes.merge!(
11
11
  meta: Content::Meta.for(**attributes[:meta]),
@@ -5,7 +5,7 @@ module Kagi
5
5
  module Models
6
6
  # Models the fast payload.
7
7
  Fast = Data.define :meta, :data do
8
- def self.for(**attributes)
8
+ def self.for **attributes
9
9
  new(
10
10
  **attributes.merge!(
11
11
  meta: Content::Meta.for(**attributes[:meta]),
@@ -5,7 +5,7 @@ module Kagi
5
5
  module Models
6
6
  # Models the search payload.
7
7
  Search = Data.define :meta, :data do
8
- def self.for(**attributes)
8
+ def self.for **attributes
9
9
  new(
10
10
  **attributes.merge!(
11
11
  meta: Content::Meta.for(**attributes[:meta]),
@@ -5,7 +5,7 @@ module Kagi
5
5
  module Models
6
6
  # Models the API payload.
7
7
  Summary = Data.define :meta, :data do
8
- def self.for(**attributes)
8
+ def self.for **attributes
9
9
  new(
10
10
  **attributes.merge!(
11
11
  meta: Content::Meta.for(**attributes[:meta]),
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kagi-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brooke Kuhlmann
@@ -228,7 +228,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
228
228
  - !ruby/object:Gem::Version
229
229
  version: '0'
230
230
  requirements: []
231
- rubygems_version: 4.0.12
231
+ rubygems_version: 4.0.16
232
232
  specification_version: 4
233
233
  summary: A Kagi API client for privacy focused information.
234
234
  test_files: []
metadata.gz.sig CHANGED
Binary file