oslovision 0.1.1 → 0.1.3

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: 9d4899a8b2c74ebe8d00d10dd518433de7e2dae40cc367647faa5df20cd23a14
4
- data.tar.gz: e90bff1a9620e500eda4928551a53262f8466b2de9d91b6a177d96f6ad894eaa
3
+ metadata.gz: 908bdb504dcd9b75d8191f2f47204b638a04f8fdf361f187ceea7e56940a745c
4
+ data.tar.gz: 3c54292b9b5701188ea2b822a5e2af60e06ea987609fa316c1d4ffda63c6e64c
5
5
  SHA512:
6
- metadata.gz: 0a911f15a553b796dbf2a446d1544bb80beeb0b15600d57792ec3de909135653cda4ddac494fa86e35115647e12ddbf4a13f294a648cc4652ba53f4a334efaf4
7
- data.tar.gz: 8d79cac7222089c6eb61f48e74f09ddf9ed41d44b153f66675c61ae20e08a104bc2974835717573a1fb8a68785cb5a1ecb4fad3e62c4626ecc6e198b03fcd67f
6
+ metadata.gz: a488983395eee2e8647dd67d884a77ee1d5ef798afa6d219f975788ec92d0cae5af074cc0330f761b405082b685f67f09a12de814f4f04f7403189e7b226cc0f
7
+ data.tar.gz: 8b5eb1ca9d7d3378798c998c190f972c9dee2c5585950aeb34753810f4b9f283b8900c2fc8da393469a698218f57fee156d57002a0d3e1950fb76007b268d500
data/CHANGELOG.md CHANGED
@@ -1,4 +1,8 @@
1
- ## [Unreleased]
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
2
6
 
3
7
  ## [0.1.1] - 2025-07-16
4
8
 
@@ -46,18 +46,20 @@ module Oslovision
46
46
  body = {
47
47
  url: image,
48
48
  split: split,
49
- status: status
49
+ status: status,
50
+ project_identifier: project_identifier
50
51
  }
51
- response = self.class.post("/projects/#{project_identifier}/images", body: body)
52
+ response = self.class.post("/images", body: body)
52
53
  else
53
54
  # Handle file upload
54
55
  file_data = prepare_file_data(image)
55
56
  body = {
56
57
  file: file_data,
57
58
  split: split,
58
- status: status
59
+ status: status,
60
+ project_identifier: project_identifier
59
61
  }
60
- response = self.class.post("/projects/#{project_identifier}/images", body: body)
62
+ response = self.class.post("/images", body: body)
61
63
  end
62
64
 
63
65
  handle_response(response)
@@ -76,7 +78,8 @@ module Oslovision
76
78
  # @raise [Oslovision::APIError] If the API request fails
77
79
  def create_annotation(project_identifier, image_identifier, label, x0:, y0:, width_px:, height_px:)
78
80
  body = {
79
- image_id: image_identifier,
81
+ project_identifier: project_identifier,
82
+ image_identifier: image_identifier,
80
83
  label: label,
81
84
  x0: x0,
82
85
  y0: y0,
@@ -84,7 +87,7 @@ module Oslovision
84
87
  height_px: height_px
85
88
  }
86
89
 
87
- response = self.class.post("/projects/#{project_identifier}/annotations",
90
+ response = self.class.post("/annotations",
88
91
  body: body.to_json,
89
92
  headers: { "Content-Type" => "application/json" })
90
93
  handle_response(response)
@@ -98,7 +101,7 @@ module Oslovision
98
101
  # @return [String] The path to the downloaded export directory
99
102
  # @raise [Oslovision::APIError] If the API request fails
100
103
  def download_export(project_identifier, version, output_dir: ".")
101
- response = self.class.get("/projects/#{project_identifier}/exports/#{version}/download")
104
+ response = self.class.get("/exports/#{version}?project_identifier=#{project_identifier}")
102
105
 
103
106
  if response.success?
104
107
  zip_path = File.join(output_dir, "#{project_identifier}_v#{version}.zip")
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Oslovision
4
- VERSION = "0.1.1"
4
+ VERSION = "0.1.3"
5
5
  end
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.1
4
+ version: 0.1.3
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-16 00:00:00.000000000 Z
11
+ date: 2025-07-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty