datashake-ruby-sdk 1.2.1 → 2.0.dev1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e58672b56ac83d0a0be1c4945093e63f80ff61512eeb1c1e8018114638d3b0ae
4
- data.tar.gz: 4df49504e82a179968f60fb4b598e23707676fc218e3d15950994a81a5cdd497
3
+ metadata.gz: fab9b879513eda24587a07043ae6362ce39c2d0cf3c9351132840752c17f386f
4
+ data.tar.gz: 77d51b7f42865c9a749483195d4542ddbc5bc39ebe9a48778b5fe46831489d01
5
5
  SHA512:
6
- metadata.gz: 453d075ac0d60329b20b27c17e2e00ccb09b15117f72a86a8852e00cc9961991537560d7da622d1f10dc402c5c66cf7e1361ce5e483bc8af80b51d80bc419e60
7
- data.tar.gz: 6817e4c8d3309c4de3c3ddfd3865a7da04b85817a93e9a5c2e1b2eb12e91e35426a22dca9843d31b5b05c822a7a19fce0ccd5f1576a63dded5616bd0d3660d82
6
+ metadata.gz: 2a916e92b6d1966e720a20375ac5d5979b8da75bd3695f363b611e96f1a32561083af4d166f87cf6b150851d228d49174812769142f2f274e0e44323cd0a1778
7
+ data.tar.gz: 54725e272c4449a8850aafbe4b06a4896517604607d0f70febde0126955eedcd38682f3cc15a5805f6bdafd4e77e9cebc6a40c5c1fab3301dc8e380e8c50ba54
@@ -7,8 +7,9 @@ module Datashake
7
7
  class Client
8
8
  BASE_URL = "https://app.datashake.com"
9
9
 
10
- def initialize(token:, adapter: Faraday.default_adapter, timeout: 30, open_timeout: 30)
10
+ def initialize(token:, adapter: Faraday.default_adapter, endpoint: nil, timeout: 30, open_timeout: 30)
11
11
  @token = token
12
+ @base_url = endpoint || BASE_URL
12
13
  @adapter = adapter
13
14
  @timeout = timeout
14
15
  @open_timeout = open_timeout
@@ -17,7 +18,7 @@ module Datashake
17
18
  def connection
18
19
  @connection ||= Faraday.new do |conn|
19
20
  conn.headers = {"spiderman-token" => token}
20
- conn.url_prefix = BASE_URL
21
+ conn.url_prefix = base_url
21
22
  conn.request(:json)
22
23
  conn.response(:json, content_type: "application/json")
23
24
  conn.options.timeout = timeout
@@ -60,7 +61,7 @@ module Datashake
60
61
 
61
62
  private
62
63
 
63
- attr_reader :token, :adapter, :timeout, :open_timeout
64
+ attr_reader :token, :adapter, :timeout, :open_timeout, :base_url
64
65
  end
65
66
  end
66
67
  end
@@ -9,7 +9,7 @@ module Datashake
9
9
  transform_keys(&:to_sym)
10
10
 
11
11
  attribute :success, Datashake::Types::Strict::Bool
12
- attribute :job_id, Datashake::Types::Strict::Integer
12
+ attribute :job_id, Datashake::Types::Strict::String
13
13
  attribute :status, Datashake::Types::Strict::Integer
14
14
  attribute :message, Datashake::Types::Strict::String
15
15
 
@@ -8,7 +8,7 @@ module Datashake
8
8
  class JobInstance < ::Dry::Struct
9
9
  transform_keys(&:to_sym)
10
10
 
11
- attribute :job_id, Datashake::Types::Strict::Integer
11
+ attribute :job_id, Datashake::Types::Strict::String
12
12
  attribute :url, Datashake::Types::Strict::String
13
13
  attribute? :place_id, Datashake::Types::Strict::String.optional
14
14
  attribute :status, Datashake::Types::Strict::String # Enum
@@ -10,7 +10,7 @@ module Datashake
10
10
 
11
11
  attribute :success, Datashake::Types::Strict::Bool
12
12
  attribute :status, Datashake::Types::Strict::Integer
13
- attribute :job_id, Datashake::Types::Strict::Integer
13
+ attribute :job_id, Datashake::Types::Strict::String
14
14
  attribute :source_url, Datashake::Types::Strict::String
15
15
  attribute :source_name, Datashake::Types::Strict::String
16
16
  attribute :place_id, Datashake::Types::Strict::String.optional
@@ -9,7 +9,7 @@ module Datashake
9
9
  transform_keys(&:to_sym)
10
10
 
11
11
  attribute :success, Datashake::Types::Strict::Bool
12
- attribute? :job_id, Datashake::Types::Strict::Integer
12
+ attribute? :job_id, Datashake::Types::Strict::String
13
13
  attribute :status, Datashake::Types::Strict::Integer
14
14
  attribute :message, Datashake::Types::Strict::String
15
15
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Datashake
4
- VERSION = "1.2.1"
4
+ VERSION = "2.0.dev1"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: datashake-ruby-sdk
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.1
4
+ version: 2.0.dev1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Reviewshake <3 Datashake
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-03-25 00:00:00.000000000 Z
11
+ date: 2024-05-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dry-struct
@@ -38,7 +38,7 @@ dependencies:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
40
  version: '2.2'
41
- description:
41
+ description:
42
42
  email:
43
43
  - dev@shake.io
44
44
  executables: []
@@ -89,7 +89,7 @@ licenses:
89
89
  metadata:
90
90
  homepage_uri: https://docs.datashake.com
91
91
  source_code_uri: https://github.com/reviewshake/datashake-ruby-sdk
92
- post_install_message:
92
+ post_install_message:
93
93
  rdoc_options: []
94
94
  require_paths:
95
95
  - lib
@@ -104,8 +104,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
104
104
  - !ruby/object:Gem::Version
105
105
  version: '0'
106
106
  requirements: []
107
- rubygems_version: 3.2.3
108
- signing_key:
107
+ rubygems_version: 3.5.3
108
+ signing_key:
109
109
  specification_version: 4
110
110
  summary: An API wrapper for Datashake API
111
111
  test_files: []