cryptomate_api 0.1.2 → 0.1.4

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: a034da10f906a8e3be0ba5880b0a57420fb7181bb85b465298ab9d63d0a1fee1
4
- data.tar.gz: 922c21f2cf5a54408a16015ceb94b3972718888171009aa8122b4c1a8a97d8b8
3
+ metadata.gz: 665269594527cdc382621877f03ce9945b856cd13564bda1602db1025fda8691
4
+ data.tar.gz: fe1fc8c40784ff932c02416be565846f6045dc8d3f06bd92185765fc2d4561aa
5
5
  SHA512:
6
- metadata.gz: 5d488a6ae9436207836db335480e61f4eb110a13f5b00ea437e0c3323010b53be872a4f5468367f606c609e44aa4d42b90a0e1b6ad8a7ab63d09c2353a487012
7
- data.tar.gz: 200cfc3c1ab4593bbcd1ed99b62fa2980701e09ada02d69c2facdc02b8bd7d29fae34edc262f6b824126c4cd4eb908e19edb252e014a86984e03e3808dee6ae9
6
+ metadata.gz: 1b8d78e0075c9cb87a036aba6153cc5d5ef4f93e65e71346d749221a465b25808a400dd0fb874cf96435c54be05eaadba81006b3addef6fb9347674a8e515baf
7
+ data.tar.gz: dc44a554406da97883282b4bd583d343a9c6cd7732d78dd78dad1e9ac8db942d934f4b1cc91646888cb7f987461a9e6410eba03ee3fe0da01bdfe3d1b7ee060a
data/README.md CHANGED
@@ -31,6 +31,9 @@ require 'cryptomate_api'
31
31
 
32
32
  CryptomateApi.configure do |config|
33
33
  config.api_key = 'your_api_key_here'
34
+
35
+ # optional:
36
+ config.base_uri = 'your-sandbox-uri'
34
37
  end
35
38
  ```
36
39
  ## Usage
@@ -3,12 +3,13 @@ require 'httparty'
3
3
  module CryptomateApi
4
4
  class Base
5
5
  include HTTParty
6
- base_uri CryptomateApi.configuration.base_uri
7
6
 
8
7
  # Initializes the client with the given API key
9
- def initialize(api_key = CryptomateApi.configuration.api_key)
10
- @api_key = api_key
11
- self.class.headers "Authorization" => "Bearer #{@api_key}"
8
+ def initialize
9
+ CryptomateApi.configuration ||= CryptomateApi::Configuration.new
10
+ @api_key = CryptomateApi.configuration.api_key
11
+ self.class.base_uri CryptomateApi.configuration.base_uri
12
+ self.class.headers "x-api-key" => "#{@api_key}"
12
13
  end
13
14
  end
14
15
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module CryptomateApi
4
- VERSION = "0.1.2"
4
+ VERSION = "0.1.4"
5
5
  end
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative 'cryptomate_api/base'
4
3
  require_relative 'cryptomate_api/configuration'
4
+ require_relative 'cryptomate_api/base'
5
5
 
6
6
  Dir[File.join(__dir__, 'cryptomate_api/{management,mpc,nft}/**/*.rb')].sort.each { |file| require file }
7
7
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cryptomate_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matias Albarello
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-11-28 00:00:00.000000000 Z
11
+ date: 2023-11-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty