oslovision 0.1.0 → 0.1.2
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/CHANGELOG.md +9 -1
- data/lib/oslovision/client.rb +8 -7
- data/lib/oslovision/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: b6ea19b217615f040934fbd514ee251fa3768407f48b9ae9bf1ab608c820ac90
|
|
4
|
+
data.tar.gz: 59d52061d84a2beda8385014fd9ba5614d62d10ddcc55c9184fffa435c8e8bf5
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b31bde2b0fa248f1f6b36105523c03668d3f9748ffff2a93c8ea625fbd3b9405b87b2a877205bc59b7ab65fae693a9502c822eb407f73ef5ce982020c9d40596
|
|
7
|
+
data.tar.gz: 3ad52dbd914ad8d210203d6ab88ecd1f4ac064430898a2f072ed3fa2ee9ddeacaf889d39757de0d547bd5ec95be291d358d36bf957c1f5e807e1518e3df3e267
|
data/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,12 @@
|
|
|
1
|
-
## [
|
|
1
|
+
## [0.1.2] - 2025-07-17
|
|
2
|
+
|
|
3
|
+
- Fixed API endpoint for creating annotations to use `project_identifier` and `image_identifier` instead of `image_id`
|
|
4
|
+
- Fixed API endpoint for downloading exports to use `project_identifier` and `version` in the query string
|
|
5
|
+
- Updated version number to 0.1.2
|
|
6
|
+
|
|
7
|
+
## [0.1.1] - 2025-07-16
|
|
8
|
+
|
|
9
|
+
- Fixed stringio dependency warning by removing explicit require (stringio is a default gem in Ruby 3.x)
|
|
2
10
|
|
|
3
11
|
## [0.1.0] - 2025-07-16
|
|
4
12
|
|
data/lib/oslovision/client.rb
CHANGED
|
@@ -5,7 +5,6 @@ require "mime/types"
|
|
|
5
5
|
require "json"
|
|
6
6
|
require "fileutils"
|
|
7
7
|
require "zip"
|
|
8
|
-
require "stringio"
|
|
9
8
|
|
|
10
9
|
module Oslovision
|
|
11
10
|
# Main client class for interacting with the Oslo API
|
|
@@ -47,9 +46,10 @@ module Oslovision
|
|
|
47
46
|
body = {
|
|
48
47
|
url: image,
|
|
49
48
|
split: split,
|
|
50
|
-
status: status
|
|
49
|
+
status: status,
|
|
50
|
+
project_identifier: project_identifier
|
|
51
51
|
}
|
|
52
|
-
response = self.class.post("/
|
|
52
|
+
response = self.class.post("/images", body: body)
|
|
53
53
|
else
|
|
54
54
|
# Handle file upload
|
|
55
55
|
file_data = prepare_file_data(image)
|
|
@@ -58,7 +58,7 @@ module Oslovision
|
|
|
58
58
|
split: split,
|
|
59
59
|
status: status
|
|
60
60
|
}
|
|
61
|
-
response = self.class.post("/
|
|
61
|
+
response = self.class.post("/images", body: body)
|
|
62
62
|
end
|
|
63
63
|
|
|
64
64
|
handle_response(response)
|
|
@@ -77,7 +77,8 @@ module Oslovision
|
|
|
77
77
|
# @raise [Oslovision::APIError] If the API request fails
|
|
78
78
|
def create_annotation(project_identifier, image_identifier, label, x0:, y0:, width_px:, height_px:)
|
|
79
79
|
body = {
|
|
80
|
-
|
|
80
|
+
project_identifier: project_identifier,
|
|
81
|
+
image_identifier: image_identifier,
|
|
81
82
|
label: label,
|
|
82
83
|
x0: x0,
|
|
83
84
|
y0: y0,
|
|
@@ -85,7 +86,7 @@ module Oslovision
|
|
|
85
86
|
height_px: height_px
|
|
86
87
|
}
|
|
87
88
|
|
|
88
|
-
response = self.class.post("/
|
|
89
|
+
response = self.class.post("/annotations",
|
|
89
90
|
body: body.to_json,
|
|
90
91
|
headers: { "Content-Type" => "application/json" })
|
|
91
92
|
handle_response(response)
|
|
@@ -99,7 +100,7 @@ module Oslovision
|
|
|
99
100
|
# @return [String] The path to the downloaded export directory
|
|
100
101
|
# @raise [Oslovision::APIError] If the API request fails
|
|
101
102
|
def download_export(project_identifier, version, output_dir: ".")
|
|
102
|
-
response = self.class.get("/
|
|
103
|
+
response = self.class.get("/exports/#{version}?project_identifier=#{project_identifier}")
|
|
103
104
|
|
|
104
105
|
if response.success?
|
|
105
106
|
zip_path = File.join(output_dir, "#{project_identifier}_v#{version}.zip")
|
data/lib/oslovision/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: oslovision
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Alastair Brunton
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2025-07-
|
|
11
|
+
date: 2025-07-17 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: httparty
|