deepstack 1.1.1 → 1.2.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 +4 -4
- data/lib/deep_stack/deep_stack.rb +12 -2
- data/lib/deep_stack/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: caf4cf801a5a99ff308e5afc06ed19dac86d8348388c519880770d482fd1bb0b
|
4
|
+
data.tar.gz: de77bacb1bd1ffb46c4dff277ab16e1195ef423f005ad98394b49cab6e248fa3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6836c3bc1e6dc367542c4bd9e3e089ddf2cf3a7e612d6230dfabf3f3a38a4651965eead00bba50dd5916e5a9d8fcc44c624f3743b17165fbda24cff8c9ea7ec8
|
7
|
+
data.tar.gz: 5f5c98987f6fae82a67ef8fa57a557aa300bd22da6108a8575eabe6e3ac8d1f301f57caad1f86b533629b503d53db4bb40e101ff630abddce1b2659637e2b177
|
@@ -1,6 +1,5 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require 'pp'
|
4
3
|
require 'net/http'
|
5
4
|
require 'json'
|
6
5
|
require_relative 'face'
|
@@ -16,9 +15,19 @@ class DeepStack
|
|
16
15
|
include DeepStack::Scene
|
17
16
|
include DeepStack::Custom
|
18
17
|
|
18
|
+
#
|
19
19
|
# Create a deepstack object connected to the given URL
|
20
|
-
|
20
|
+
#
|
21
|
+
# @param [String] base_url the url to DeepStack's server:port
|
22
|
+
# @param [String] api_key an optional API-KEY to use when connecting to DeepStack
|
23
|
+
# @param [String] admin_key an optional ADMIN-KEY to use when connecting to DeepStack
|
24
|
+
#
|
25
|
+
# @example
|
26
|
+
# DeepStack.new('http://127.0.0.1:5000')
|
27
|
+
#
|
28
|
+
def initialize(base_url, api_key: nil, admin_key: nil)
|
21
29
|
@base_url = base_url
|
30
|
+
@auth = { api_key: api_key, admin_key: admin_key }.select { |_k, v| v } # remove nil values
|
22
31
|
@http_mutex = Mutex.new
|
23
32
|
end
|
24
33
|
|
@@ -33,6 +42,7 @@ class DeepStack
|
|
33
42
|
#
|
34
43
|
def api_post(path, *images, **args)
|
35
44
|
uri = build_uri(path)
|
45
|
+
args = @auth.merge(args)
|
36
46
|
|
37
47
|
result = nil
|
38
48
|
10.times do
|
data/lib/deep_stack/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: deepstack
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jimmy Tanagra
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-05-
|
11
|
+
date: 2022-05-11 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description:
|
14
14
|
email:
|