uploadcare-rails 2.1.1 → 3.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.
Files changed (43) hide show
  1. checksums.yaml +4 -4
  2. data/lib/uploadcare/rails/api/rest/addons_api.rb +54 -0
  3. data/lib/uploadcare/rails/api/rest/conversion_api.rb +8 -8
  4. data/lib/uploadcare/rails/api/rest/file_api.rb +20 -13
  5. data/lib/uploadcare/rails/api/rest/file_metadata_api.rb +42 -0
  6. data/lib/uploadcare/rails/api/rest/group_api.rb +12 -6
  7. data/lib/uploadcare/rails/api/rest/project_api.rb +1 -1
  8. data/lib/uploadcare/rails/api/rest/webhook_api.rb +6 -6
  9. data/lib/uploadcare/rails/api/upload/upload_api.rb +4 -4
  10. data/lib/uploadcare/rails/objects/group.rb +1 -3
  11. data/lib/uploadcare/rails/version.rb +1 -1
  12. data/lib/uploadcare-rails.rb +2 -0
  13. data/spec/fixtures/vcr_cassettes/conversion_api_convert_document.yml +1 -1
  14. data/spec/fixtures/vcr_cassettes/conversion_api_convert_document_with_error.yml +1 -1
  15. data/spec/fixtures/vcr_cassettes/conversion_api_convert_video.yml +1 -1
  16. data/spec/fixtures/vcr_cassettes/conversion_api_convert_video_with_error.yml +1 -1
  17. data/spec/fixtures/vcr_cassettes/conversion_api_get_document_conversion_status.yml +2 -2
  18. data/spec/fixtures/vcr_cassettes/conversion_api_get_video_conversion_status.yml +2 -2
  19. data/spec/fixtures/vcr_cassettes/file_api_copy_file.yml +2 -2
  20. data/spec/fixtures/vcr_cassettes/file_api_delete_file.yml +16 -13
  21. data/spec/fixtures/vcr_cassettes/file_api_delete_files.yml +2 -2
  22. data/spec/fixtures/vcr_cassettes/file_api_get_file.yml +15 -12
  23. data/spec/fixtures/vcr_cassettes/file_api_get_files.yml +2 -2
  24. data/spec/fixtures/vcr_cassettes/file_api_load_file.yml +2 -2
  25. data/spec/fixtures/vcr_cassettes/file_api_store_file.yml +15 -12
  26. data/spec/fixtures/vcr_cassettes/file_api_store_files.yml +2 -2
  27. data/spec/fixtures/vcr_cassettes/group_api_create_group.yml +17 -13
  28. data/spec/fixtures/vcr_cassettes/group_api_get_group.yml +12 -8
  29. data/spec/fixtures/vcr_cassettes/group_api_get_groups.yml +2 -2
  30. data/spec/fixtures/vcr_cassettes/group_api_store_group.yml +132 -12
  31. data/spec/fixtures/vcr_cassettes/project_api_get_project.yml +2 -2
  32. data/spec/fixtures/vcr_cassettes/upload_upload_many_files.yml +13 -9
  33. data/spec/fixtures/vcr_cassettes/upload_upload_one_file_from_cdn.yml +2 -2
  34. data/spec/fixtures/vcr_cassettes/webhook_api_create_webhook.yml +2 -2
  35. data/spec/fixtures/vcr_cassettes/webhook_api_delete_webhook.yml +11 -9
  36. data/spec/fixtures/vcr_cassettes/webhook_api_get_webhooks.yml +2 -2
  37. data/spec/fixtures/vcr_cassettes/webhook_api_update_webhook.yml +4 -4
  38. data/spec/spec_helper.rb +1 -0
  39. data/spec/uploadcare/rails/api/rest/file_api_spec.rb +4 -13
  40. data/spec/uploadcare/rails/api/rest/group_api_spec.rb +4 -4
  41. data/spec/uploadcare/rails/objects/file_spec.rb +2 -2
  42. data/spec/uploadcare/rails/objects/group_spec.rb +3 -25
  43. metadata +59 -43
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b3c5916f2216660149f3cc0d08f1f8a1bca1b52c6fe7b8b1ee826d7ae1335819
4
- data.tar.gz: cef6ef0b56ded82cb1ef598dfd46c7bf1de58df8f7c8bf6f9f1bb7f938547db1
3
+ metadata.gz: 7c6fd08a6df4ebc26ce3e0273f5f3a8d5aa1f1fa4a689d31642ab48c71b051a0
4
+ data.tar.gz: 1c88d55d2c2d95cbe11db7553d4793a61281f583c84fbb788797907aa0ca3581
5
5
  SHA512:
6
- metadata.gz: e7798988d8b02a4f862b5d7853e54e78b5c03e3ca80465abccc25f4978d0d9e3b5d3e26c711cfa19a22014ca396a9b051a2bc6eaac2e56a6f566ed8662f79ce8
7
- data.tar.gz: 4b9dad88ccf27cae203052b064983718fc7f1276c2b222562e2f660a4c305fbb572e17534b35984da782acf3d383819bb75c5f158dea1285b0640bf133e5183e
6
+ metadata.gz: e93ad898457ee28ab5da0b525dce1418989a1c1ff3180dc844d20e7b7a402c55c71ba705b1210d13bf519ec529e70c0998b5fd3820605a393b50fe8fc7574fc6
7
+ data.tar.gz: 4d261ce429e827bedc8e1ae416d50c00082d05a5ebdfbc5de6c15cd7ba17bc9259881e38d6fe969bc8ae0875636791b7ac61081e315d2fb1ed1b91b475722624
@@ -0,0 +1,54 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'uploadcare/rails/api/rest/base'
4
+
5
+ module Uploadcare
6
+ module Rails
7
+ module Api
8
+ module Rest
9
+ # A class that contains AddonsApi related methods for Uploadcare REST API
10
+ class AddonsApi < Base
11
+ class << self
12
+ # Execute ClamAV virus checking Add-On for a given target.
13
+ # @see https://uploadcare.com/api-refs/rest-api/v0.7.0/#operation/ucClamavVirusScanExecute
14
+ def virus_scan(uuid, params = {})
15
+ Uploadcare::Addons.uc_clamav_virus_scan(uuid, params)
16
+ end
17
+
18
+ # Check the status of an Add-On execution request that had been started using the Execute Add-On operation.
19
+ # @see https://uploadcare.com/api-refs/rest-api/v0.7.0/#operation/ucClamavVirusScanExecutionStatus
20
+ def virus_scan_status(uuid)
21
+ Uploadcare::Addons.uc_clamav_virus_scan_status(uuid)
22
+ end
23
+
24
+ # Execute AWS Rekognition Add-On for a given target to detect labels in an image.
25
+ # @see https://uploadcare.com/api-refs/rest-api/v0.7.0/#operation/awsRekognitionExecute
26
+ def rekognition_detect_labels(uuid)
27
+ Uploadcare::Addons.ws_rekognition_detect_labels(uuid)
28
+ end
29
+
30
+ # Check the status of an Add-On execution request that had been started using the Execute Add-On operation.
31
+ # @see https://uploadcare.com/api-refs/rest-api/v0.7.0/#operation/awsRekognitionExecutionStatus
32
+ def rekognition_detect_labels_status(uuid)
33
+ Uploadcare::Addons.ws_rekognition_detect_labels_status(uuid)
34
+ end
35
+
36
+ # Execute remove.bg background image removal Add-On for a given target.
37
+ # @see https://uploadcare.com/api-refs/rest-api/v0.7.0/#operation/removeBgExecute
38
+ def remove_bg(uuid, params = {})
39
+ Uploadcare::Addons.remove_bg(uuid, params)
40
+ end
41
+
42
+ # Check the status of an Add-On execution request that had been started using the Execute Add-On operation.
43
+ # @see https://uploadcare.com/api-refs/rest-api/v0.7.0/#operation/removeBgExecutionStatus
44
+ def remove_bg_status(uuid)
45
+ Uploadcare::Addons.remove_bg_status(uuid)
46
+ end
47
+ end
48
+ end
49
+ end
50
+ end
51
+ end
52
+ end
53
+
54
+ Uploadcare::AddonsApi = Uploadcare::Rails::Api::Rest::AddonsApi
@@ -10,25 +10,25 @@ module Uploadcare
10
10
  class ConversionApi < Base
11
11
  class << self
12
12
  # Converts video files
13
- # @see https://uploadcare.com/api-refs/rest-api/v0.5.0/#operation/videoConvert
14
- def convert_video(video_params, **options)
15
- Uploadcare::VideoConverter.convert(video_params, **options)
13
+ # @see https://uploadcare.com/api-refs/rest-api/v0.7.0/#operation/videoConvert
14
+ def convert_video(video_params, options = {})
15
+ Uploadcare::VideoConverter.convert(video_params, options)
16
16
  end
17
17
 
18
18
  # Returns a status of video conversion job
19
- # @see https://uploadcare.com/api-refs/rest-api/v0.5.0/#operation/videoConvertStatus
19
+ # @see https://uploadcare.com/api-refs/rest-api/v0.7.0/#operation/videoConvertStatus
20
20
  def get_video_conversion_status(token)
21
21
  Uploadcare::VideoConverter.status(token)
22
22
  end
23
23
 
24
24
  # Converts documents
25
- # @see https://uploadcare.com/api-refs/rest-api/v0.5.0/#operation/documentConvert
26
- def convert_document(document_params, **options)
27
- Uploadcare::DocumentConverter.convert(document_params, **options)
25
+ # @see https://uploadcare.com/api-refs/rest-api/v0.7.0/#operation/documentConvert
26
+ def convert_document(document_params, options = {})
27
+ Uploadcare::DocumentConverter.convert(document_params, options)
28
28
  end
29
29
 
30
30
  # Returns a status of video conversion job
31
- # @see https://uploadcare.com/api-refs/rest-api/v0.5.0/#operation/documentConvertStatus
31
+ # @see https://uploadcare.com/api-refs/rest-api/v0.7.0/#operation/documentConvertStatus
32
32
  def get_document_conversion_status(token)
33
33
  Uploadcare::DocumentConverter.status(token)
34
34
  end
@@ -10,51 +10,58 @@ module Uploadcare
10
10
  class FileApi < Base
11
11
  class << self
12
12
  # Returns a pagination json of files stored in project
13
- # @see https://uploadcare.com/api-refs/rest-api/v0.5.0/#operation/filesList
13
+ # @see https://uploadcare.com/api-refs/rest-api/v0.7.0/#operation/filesList
14
14
  #
15
15
  # valid options:
16
16
  # removed: [true|false]
17
17
  # stored: [true|false]
18
18
  # limit: (1..1000)
19
- # ordering: ["datetime_uploaded"|"-datetime_uploaded"|"size"|"-size"]
19
+ # ordering: ["datetime_uploaded"|"-datetime_uploaded"]
20
20
  # from: A starting point for filtering files. The value depends on your ordering parameter value.
21
- def get_files(**options)
22
- Uploadcare::FileList.file_list(**options)
21
+ def get_files(options = {})
22
+ Uploadcare::FileList.file_list(options)
23
23
  end
24
24
 
25
25
  # Acquire file info
26
- # @see https://uploadcare.com/api-refs/rest-api/v0.5.0/#operation/fileInfo
26
+ # @see https://uploadcare.com/api-refs/rest-api/v0.7.0/#operation/fileInfo
27
27
  def get_file(uuid)
28
28
  Uploadcare::File.info(uuid)
29
29
  end
30
30
 
31
- # 'copy' method is used to copy original files or their modified versions to default storage.
31
+ # 'local_copy' method is used to copy original files or their modified versions to a default storage.
32
32
  # Source files MAY either be stored or just uploaded and MUST NOT be deleted.
33
- # @see https://uploadcare.com/api-refs/rest-api/v0.5.0/#operation/copyFile
34
- def copy_file(source, **options)
35
- Uploadcare::File.copy(source, **options)
33
+ # @see https://uploadcare.com/api-refs/rest-api/v0.7.0/#tag/File/operation/createLocalCopy
34
+ def local_copy_file(source, options = {})
35
+ Uploadcare::File.local_copy(source, options)
36
36
  end
37
37
 
38
- # @see https://uploadcare.com/api-refs/rest-api/v0.5.0/#operation/deleteFile
38
+ # 'remote_copy' method is used to copy original files or their modified versions to a custom storage.
39
+ # Source files MAY either be stored or just uploaded and MUST NOT be deleted.
40
+ # @see https://uploadcare.com/api-refs/rest-api/v0.7.0/#tag/File/operation/createRemoteCopy
41
+ def remote_copy_file(source, target, options = {})
42
+ Uploadcare::File.remote_copy(source, target, options)
43
+ end
44
+
45
+ # @see https://uploadcare.com/api-refs/rest-api/v0.7.0/#operation/deleteFile
39
46
  def delete_file(uuid)
40
47
  Uploadcare::File.delete(uuid)
41
48
  end
42
49
 
43
50
  # Store a single file, preventing it from being deleted in 2 weeks
44
- # @see https://uploadcare.com/api-refs/rest-api/v0.5.0/#operation/storeFile
51
+ # @see https://uploadcare.com/api-refs/rest-api/v0.7.0/#operation/storeFile
45
52
  def store_file(uuid)
46
53
  Uploadcare::File.store(uuid)
47
54
  end
48
55
 
49
56
  # Make a set of files "stored". This will prevent them from being deleted automatically
50
- # @see https://uploadcare.com/api-refs/rest-api/v0.5.0/#operation/filesStoring
57
+ # @see https://uploadcare.com/api-refs/rest-api/v0.7.0/#operation/filesStoring
51
58
  # uuids: Array
52
59
  def store_files(uuids)
53
60
  Uploadcare::FileList.batch_store(uuids)
54
61
  end
55
62
 
56
63
  # Delete several files by list of uids
57
- # @see https://uploadcare.com/api-refs/rest-api/v0.5.0/#operation/filesDelete
64
+ # @see https://uploadcare.com/api-refs/rest-api/v0.7.0/#operation/filesDelete
58
65
  # uuids: Array
59
66
  def delete_files(uuids)
60
67
  Uploadcare::FileList.batch_delete(uuids)
@@ -0,0 +1,42 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'uploadcare/rails/api/rest/base'
4
+
5
+ module Uploadcare
6
+ module Rails
7
+ module Api
8
+ module Rest
9
+ # A class that contains FileMetadata related methods for Uploadcare REST API
10
+ class FileMetadataApi < Base
11
+ class << self
12
+ # Get file's metadata keys and values
13
+ # @see https://uploadcare.com/api-refs/rest-api/v0.7.0/#operation/fileMetadata
14
+ def file_metadata(uuid)
15
+ Uploadcare::FileMetadata.index(uuid)
16
+ end
17
+
18
+ # Get the value of a single metadata key
19
+ # @see https://uploadcare.com/api-refs/rest-api/v0.7.0/#operation/fileMetadataKey
20
+ def file_metadata_value(uuid, key)
21
+ Uploadcare::FileMetadata.show(uuid, key)
22
+ end
23
+
24
+ # Update the value of a single metadata key. If the key does not exist, it will be created
25
+ # @see https://uploadcare.com/api-refs/rest-api/v0.7.0/#operation/updateFileMetadataKey
26
+ def update_file_metadata(uuid, key, value)
27
+ Uploadcare::FileMetadata.update(uuid, key, value)
28
+ end
29
+
30
+ # Delete a file's metadata key
31
+ # @see https://uploadcare.com/api-refs/rest-api/v0.7.0/#operation/deleteFileMetadataKey
32
+ def delete_file_metadata(uuid, key)
33
+ Uploadcare::FileMetadata.delete(uuid, key)
34
+ end
35
+ end
36
+ end
37
+ end
38
+ end
39
+ end
40
+ end
41
+
42
+ Uploadcare::FileMetadataApi = Uploadcare::Rails::Api::Rest::FileMetadataApi
@@ -10,15 +10,15 @@ module Uploadcare
10
10
  class GroupApi < Base
11
11
  class << self
12
12
  # Returns paginated list of groups
13
- # @see https://uploadcare.com/api-refs/rest-api/v0.5.0/#operation/groupsList
13
+ # @see https://uploadcare.com/api-refs/rest-api/v0.7.0/#operation/groupsList
14
14
  #
15
15
  # valid options:
16
16
  # limit: (1..1000)
17
17
  # ordering: ["datetime_created"|"-datetime_created"]
18
18
  # from: A starting point for filtering group lists. MUST be a datetime value with T used as a separator.
19
19
  # example: '2015-01-02T10:00:00'
20
- def get_groups(**options)
21
- Uploadcare::GroupList.list(**options)
20
+ def get_groups(options = {})
21
+ Uploadcare::GroupList.list(options)
22
22
  end
23
23
 
24
24
  # Get group info
@@ -28,15 +28,21 @@ module Uploadcare
28
28
  end
29
29
 
30
30
  # Stores all files in a group
31
- # @see https://uploadcare.com/api-refs/rest-api/v0.5.0/#tag/Group/paths/~1groups~1%3Cuuid%3E~1storage~1/put
31
+ # @see https://uploadcare.com/api-refs/rest-api/v0.7.0/#tag/Group/paths/~1groups~1%3Cuuid%3E~1storage~1/put
32
32
  def store_group(uuid)
33
33
  Uploadcare::Group.store(uuid)
34
34
  end
35
35
 
36
+ # Delete a file group by its ID.
37
+ # @see https://uploadcare.com/api-refs/rest-api/v0.7.0/#operation/deleteGroup
38
+ def delete_group(uuid)
39
+ Uploadcare::Group.delete(uuid)
40
+ end
41
+
36
42
  # Create files group from a set of files by using their UUIDs.
37
43
  # @see https://uploadcare.com/api-refs/upload-api/#operation/createFilesGroup
38
- def create_group(files, **options)
39
- Uploadcare::Group.create(files, **options)
44
+ def create_group(files, options = {})
45
+ Uploadcare::Group.create(files, options)
40
46
  end
41
47
  end
42
48
  end
@@ -11,7 +11,7 @@ module Uploadcare
11
11
  class << self
12
12
  # Get information about the current project.
13
13
  # Current project is determined by public and secret keys combination.
14
- # @see https://uploadcare.com/api-refs/rest-api/v0.5.0/#tag/Project
14
+ # @see https://uploadcare.com/api-refs/rest-api/v0.7.0/#tag/Project
15
15
  # rubocop:disable Naming/AccessorMethodName
16
16
  def get_project
17
17
  Uploadcare::Project.show
@@ -10,7 +10,7 @@ module Uploadcare
10
10
  class WebhookApi < Base
11
11
  class << self
12
12
  # Returns a list (not paginated) of webhooks
13
- # @see https://uploadcare.com/api-refs/rest-api/v0.5.0/#operation/webhooksList
13
+ # @see https://uploadcare.com/api-refs/rest-api/v0.7.0/#operation/webhooksList
14
14
  # rubocop:disable Naming/AccessorMethodName
15
15
  def get_webhooks
16
16
  Uploadcare::Webhook.list
@@ -18,20 +18,20 @@ module Uploadcare
18
18
  # rubocop:enable Naming/AccessorMethodName
19
19
 
20
20
  # Create a webhook
21
- # @see https://uploadcare.com/api-refs/rest-api/v0.5.0/#operation/webhookCreate
21
+ # @see https://uploadcare.com/api-refs/rest-api/v0.7.0/#operation/webhookCreate
22
22
  def create_webhook(target_url, event: 'file.uploaded', is_active: true, signing_secret: nil)
23
23
  options = { target_url: target_url, event: event, is_active: is_active, signing_secret: signing_secret }
24
24
  Uploadcare::Webhook.create(**options.compact)
25
25
  end
26
26
 
27
27
  # Updates a webhook
28
- # @see https://uploadcare.com/api-refs/rest-api/v0.5.0/#operation/updateWebhook
29
- def update_webhook(id, **options)
30
- Uploadcare::Webhook.update(id, **options)
28
+ # @see https://uploadcare.com/api-refs/rest-api/v0.7.0/#operation/updateWebhook
29
+ def update_webhook(id, options = {})
30
+ Uploadcare::Webhook.update(id, options)
31
31
  end
32
32
 
33
33
  # Permanently deletes a webhook
34
- # @see https://uploadcare.com/api-refs/rest-api/v0.5.0/#operation/webhookUnsubscribe
34
+ # @see https://uploadcare.com/api-refs/rest-api/v0.7.0/#operation/webhookUnsubscribe
35
35
  def delete_webhook(target_url)
36
36
  Uploadcare::Webhook.delete(target_url)
37
37
  end
@@ -15,7 +15,7 @@ module Uploadcare
15
15
  #
16
16
  # @see https://uploadcare.com/api-refs/upload-api/#operation/baseUpload
17
17
  # @see https://uploadcare.com/api-refs/upload-api/#operation/multipartFileUploadStart
18
- def upload_file(file, **options)
18
+ def upload_file(file, options = {})
19
19
  return upload(file, options) if file?(file) || file.is_a?(String)
20
20
 
21
21
  raise TypeError, "The first argument must be a File or String (URL), #{file.class} given"
@@ -24,7 +24,7 @@ module Uploadcare
24
24
  # Uploads several files smaller than 100MB.
25
25
  #
26
26
  # https://uploadcare.com/api-refs/upload-api/#operation/multipartFileUploadStart
27
- def upload_files(files, **options)
27
+ def upload_files(files, options = {})
28
28
  return upload(files, options) if array_of_files?(files)
29
29
 
30
30
  raise TypeError, 'The first argument must be an Array of File objects'
@@ -40,8 +40,8 @@ module Uploadcare
40
40
  object.respond_to?(:path) && ::File.exist?(object.path)
41
41
  end
42
42
 
43
- def upload(files, options)
44
- Uploadcare::Uploader.upload(files, **options)
43
+ def upload(files, options = {})
44
+ Uploadcare::Uploader.upload(files, options)
45
45
  end
46
46
  end
47
47
  end
@@ -32,9 +32,7 @@ module Uploadcare
32
32
  end
33
33
 
34
34
  def store
35
- group_info = Uploadcare::GroupApi.store_group(id).to_h
36
- ::Rails.cache.write(cache_key, group_info, expires_in: cache_expires_in) if caching_enabled?
37
- update_attrs(group_info)
35
+ Uploadcare::GroupApi.store_group(id)
38
36
  end
39
37
 
40
38
  def to_s
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Uploadcare
4
4
  module Rails
5
- VERSION = '2.1.1'
5
+ VERSION = '3.2.0'
6
6
  end
7
7
  end
@@ -9,6 +9,8 @@ require 'uploadcare/rails/api/rest/group_api'
9
9
  require 'uploadcare/rails/api/rest/project_api'
10
10
  require 'uploadcare/rails/api/rest/webhook_api'
11
11
  require 'uploadcare/rails/api/rest/conversion_api'
12
+ require 'uploadcare/rails/api/rest/file_metadata_api'
13
+ require 'uploadcare/rails/api/rest/addons_api'
12
14
  require 'uploadcare/rails/api/upload/upload_api'
13
15
 
14
16
  module Uploadcare
@@ -10,7 +10,7 @@ http_interactions:
10
10
  Content-Type:
11
11
  - application/json
12
12
  Accept:
13
- - application/vnd.uploadcare-v0.6+json
13
+ - application/vnd.uploadcare-v0.7+json
14
14
  User-Agent:
15
15
  - UploadcareRuby/3.0.5/5d5bb5639e3f2df33674 (Ruby/2.7.2)
16
16
  Date:
@@ -10,7 +10,7 @@ http_interactions:
10
10
  Content-Type:
11
11
  - application/json
12
12
  Accept:
13
- - application/vnd.uploadcare-v0.6+json
13
+ - application/vnd.uploadcare-v0.7+json
14
14
  User-Agent:
15
15
  - UploadcareRuby/3.0.5/5d5bb5639e3f2df33674 (Ruby/2.7.2)
16
16
  Date:
@@ -10,7 +10,7 @@ http_interactions:
10
10
  Content-Type:
11
11
  - application/json
12
12
  Accept:
13
- - application/vnd.uploadcare-v0.6+json
13
+ - application/vnd.uploadcare-v0.7+json
14
14
  User-Agent:
15
15
  - UploadcareRuby/3.0.5/5d5bb5639e3f2df33674 (Ruby/2.7.2)
16
16
  Date:
@@ -10,7 +10,7 @@ http_interactions:
10
10
  Content-Type:
11
11
  - application/json
12
12
  Accept:
13
- - application/vnd.uploadcare-v0.6+json
13
+ - application/vnd.uploadcare-v0.7+json
14
14
  User-Agent:
15
15
  - UploadcareRuby/3.0.5/5d5bb5639e3f2df33674 (Ruby/2.7.2)
16
16
  Date:
@@ -10,7 +10,7 @@ http_interactions:
10
10
  Content-Type:
11
11
  - application/json
12
12
  Accept:
13
- - application/vnd.uploadcare-v0.6+json
13
+ - application/vnd.uploadcare-v0.7+json
14
14
  User-Agent:
15
15
  - UploadcareRuby/3.0.5/5d5bb5639e3f2df33674 (Ruby/2.7.2)
16
16
  Date:
@@ -29,7 +29,7 @@ http_interactions:
29
29
  Date:
30
30
  - Fri, 23 Jul 2021 11:37:38 GMT
31
31
  Content-Type:
32
- - application/vnd.uploadcare-v0.6+json
32
+ - application/vnd.uploadcare-v0.7+json
33
33
  Content-Length:
34
34
  - '91'
35
35
  Connection:
@@ -10,7 +10,7 @@ http_interactions:
10
10
  Content-Type:
11
11
  - application/json
12
12
  Accept:
13
- - application/vnd.uploadcare-v0.6+json
13
+ - application/vnd.uploadcare-v0.7+json
14
14
  User-Agent:
15
15
  - UploadcareRuby/3.0.5/5d5bb5639e3f2df33674 (Ruby/2.7.2)
16
16
  Date:
@@ -29,7 +29,7 @@ http_interactions:
29
29
  Date:
30
30
  - Fri, 23 Jul 2021 11:31:39 GMT
31
31
  Content-Type:
32
- - application/vnd.uploadcare-v0.6+json
32
+ - application/vnd.uploadcare-v0.7+json
33
33
  Content-Length:
34
34
  - '156'
35
35
  Connection:
@@ -10,7 +10,7 @@ http_interactions:
10
10
  Content-Type:
11
11
  - application/json
12
12
  Accept:
13
- - application/vnd.uploadcare-v0.5+json
13
+ - application/vnd.uploadcare-v0.7+json
14
14
  User-Agent:
15
15
  - UploadcareRuby/3.0.5/5d5bb5639e3f2df33674 (Ruby/3.0.0)
16
16
  Date:
@@ -29,7 +29,7 @@ http_interactions:
29
29
  Date:
30
30
  - Thu, 22 Jul 2021 07:21:11 GMT
31
31
  Content-Type:
32
- - application/vnd.uploadcare-v0.5+json
32
+ - application/vnd.uploadcare-v0.7+json
33
33
  Content-Length:
34
34
  - '533'
35
35
  Connection:
@@ -2,7 +2,7 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: delete
5
- uri: https://api.uploadcare.com/files/5ae54c37-754c-4982-8de4-3f242a88ce17/
5
+ uri: https://api.uploadcare.com/files/2254146d-3652-4419-abf6-305d36ef30a8/storage/
6
6
  body:
7
7
  encoding: UTF-8
8
8
  string: ''
@@ -10,13 +10,13 @@ http_interactions:
10
10
  Content-Type:
11
11
  - application/json
12
12
  Accept:
13
- - application/vnd.uploadcare-v0.5+json
13
+ - application/vnd.uploadcare-v0.7+json
14
14
  User-Agent:
15
- - UploadcareRuby/3.0.5/5d5bb5639e3f2df33674 (Ruby/3.0.0)
15
+ - UploadcareRuby/4.0.0/5d5bb5639e3f2df33674 (Ruby/2.7.6)
16
16
  Date:
17
- - Thu, 22 Jul 2021 07:01:53 GMT
17
+ - Sat, 29 Oct 2022 16:40:33 GMT
18
18
  Authorization:
19
- - Uploadcare 5d5bb5639e3f2df33674:138e027d6d720bba1393f3ae8d227ac9741394bd
19
+ - Uploadcare 5d5bb5639e3f2df33674:7e5f316162ee5935900dd5978dd442389f2430c6
20
20
  Connection:
21
21
  - close
22
22
  Host:
@@ -27,32 +27,35 @@ http_interactions:
27
27
  message: OK
28
28
  headers:
29
29
  Date:
30
- - Thu, 22 Jul 2021 07:01:53 GMT
30
+ - Sat, 29 Oct 2022 16:40:34 GMT
31
31
  Content-Type:
32
- - application/vnd.uploadcare-v0.5+json
32
+ - application/vnd.uploadcare-v0.7+json
33
33
  Content-Length:
34
- - '570'
34
+ - '641'
35
35
  Connection:
36
36
  - close
37
37
  Server:
38
38
  - nginx
39
+ Warning:
40
+ - '199 Miscellaneous warning: Please use API version 0.5, not 0.7'
39
41
  Access-Control-Allow-Origin:
40
42
  - https://uploadcare.com
41
43
  Vary:
42
44
  - Accept
43
45
  Allow:
44
- - DELETE, GET, HEAD, OPTIONS
46
+ - DELETE, GET, HEAD, OPTIONS, POST, PUT
45
47
  X-Xss-Protection:
46
48
  - 1; mode=block
47
49
  X-Content-Type-Options:
48
50
  - nosniff
51
+ X-Uploadcare-Request-Id:
52
+ - c225d61e-d720-4b49-83ef-3622fcd42f72
49
53
  X-Frame-Options:
50
54
  - SAMEORIGIN
51
55
  X-Robots-Tag:
52
56
  - noindex, nofollow, nosnippet, noarchive
53
57
  body:
54
58
  encoding: ASCII-8BIT
55
- string: '{"datetime_removed":"2021-07-22T07:01:53.647062Z","datetime_stored":null,"datetime_uploaded":"2021-07-22T06:51:13.085531Z","image_info":{"width":48,"height":12,"format":"PNG","color_mode":"RGBA","geo_location":null,"orientation":null,"dpi":[72,72],"datetime_original":null,"sequence":false},"is_image":true,"is_ready":true,"mime_type":"image/png","original_file_url":null,"original_filename":"-17.0\u00b0\u0421
56
- (2).png","size":514,"url":"https://api.uploadcare.com/files/5ae54c37-754c-4982-8de4-3f242a88ce17/","uuid":"5ae54c37-754c-4982-8de4-3f242a88ce17","source":null}'
57
- recorded_at: Thu, 22 Jul 2021 07:01:53 GMT
58
- recorded_with: VCR 6.0.0
59
+ string: '{"datetime_removed":"2022-10-29T16:40:34.463022Z","datetime_stored":null,"datetime_uploaded":"2022-10-25T11:11:47.120330Z","is_image":true,"is_ready":true,"mime_type":"image/png","original_file_url":null,"original_filename":"image.png","size":2182,"url":"https://api.uploadcare.com/files/2254146d-3652-4419-abf6-305d36ef30a8/","uuid":"2254146d-3652-4419-abf6-305d36ef30a8","variations":null,"content_info":{"mime":{"mime":"image/png","type":"image","subtype":"png"},"image":{"dpi":null,"width":50,"format":"PNG","height":42,"sequence":false,"color_mode":"RGBA","orientation":null,"geo_location":null,"datetime_original":null}},"metadata":{}}'
60
+ recorded_at: Sat, 29 Oct 2022 16:40:34 GMT
61
+ recorded_with: VCR 6.1.0
@@ -10,7 +10,7 @@ http_interactions:
10
10
  Content-Type:
11
11
  - application/json
12
12
  Accept:
13
- - application/vnd.uploadcare-v0.5+json
13
+ - application/vnd.uploadcare-v0.7+json
14
14
  User-Agent:
15
15
  - UploadcareRuby/3.0.5/5d5bb5639e3f2df33674 (Ruby/2.7.0)
16
16
  Date:
@@ -29,7 +29,7 @@ http_interactions:
29
29
  Date:
30
30
  - Thu, 22 Jul 2021 08:38:39 GMT
31
31
  Content-Type:
32
- - application/vnd.uploadcare-v0.5+json
32
+ - application/vnd.uploadcare-v0.7+json
33
33
  Content-Length:
34
34
  - '611'
35
35
  Connection:
@@ -2,7 +2,7 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: get
5
- uri: https://api.uploadcare.com/files/5ae54c37-754c-4982-8de4-3f242a88ce17/
5
+ uri: https://api.uploadcare.com/files/2254146d-3652-4419-abf6-305d36ef30a8/
6
6
  body:
7
7
  encoding: UTF-8
8
8
  string: ''
@@ -10,13 +10,13 @@ http_interactions:
10
10
  Content-Type:
11
11
  - application/json
12
12
  Accept:
13
- - application/vnd.uploadcare-v0.5+json
13
+ - application/vnd.uploadcare-v0.7+json
14
14
  User-Agent:
15
- - UploadcareRuby/3.0.5/5d5bb5639e3f2df33674 (Ruby/3.0.0)
15
+ - UploadcareRuby/4.0.0/5d5bb5639e3f2df33674 (Ruby/2.7.6)
16
16
  Date:
17
- - Thu, 22 Jul 2021 07:01:51 GMT
17
+ - Sat, 29 Oct 2022 19:18:31 GMT
18
18
  Authorization:
19
- - Uploadcare 5d5bb5639e3f2df33674:d9638db72d751c7f8fe116dca66aa60470c3c505
19
+ - Uploadcare 5d5bb5639e3f2df33674:4c67808ffd1d97a64c79881888d981dab9b55363
20
20
  Connection:
21
21
  - close
22
22
  Host:
@@ -27,15 +27,17 @@ http_interactions:
27
27
  message: OK
28
28
  headers:
29
29
  Date:
30
- - Thu, 22 Jul 2021 07:01:52 GMT
30
+ - Sat, 29 Oct 2022 19:18:31 GMT
31
31
  Content-Type:
32
- - application/vnd.uploadcare-v0.5+json
32
+ - application/vnd.uploadcare-v0.7+json
33
33
  Content-Length:
34
- - '609'
34
+ - '641'
35
35
  Connection:
36
36
  - close
37
37
  Server:
38
38
  - nginx
39
+ Warning:
40
+ - '199 Miscellaneous warning: Please use API version 0.5, not 0.7'
39
41
  Access-Control-Allow-Origin:
40
42
  - https://uploadcare.com
41
43
  Vary:
@@ -46,13 +48,14 @@ http_interactions:
46
48
  - 1; mode=block
47
49
  X-Content-Type-Options:
48
50
  - nosniff
51
+ X-Uploadcare-Request-Id:
52
+ - 6e16f52f-b124-428c-a0a9-6ac9317fd2df
49
53
  X-Frame-Options:
50
54
  - SAMEORIGIN
51
55
  X-Robots-Tag:
52
56
  - noindex, nofollow, nosnippet, noarchive
53
57
  body:
54
58
  encoding: ASCII-8BIT
55
- string: '{"datetime_removed":null,"datetime_stored":null,"datetime_uploaded":"2021-07-22T06:51:13.085531Z","image_info":{"width":48,"height":12,"format":"PNG","color_mode":"RGBA","geo_location":null,"orientation":null,"dpi":[72,72],"datetime_original":null,"sequence":false},"is_image":true,"is_ready":true,"mime_type":"image/png","original_file_url":"https://ucarecdn.com/5ae54c37-754c-4982-8de4-3f242a88ce17/1702.png","original_filename":"-17.0\u00b0\u0421
56
- (2).png","size":514,"url":"https://api.uploadcare.com/files/5ae54c37-754c-4982-8de4-3f242a88ce17/","uuid":"5ae54c37-754c-4982-8de4-3f242a88ce17","source":null}'
57
- recorded_at: Thu, 22 Jul 2021 07:01:52 GMT
58
- recorded_with: VCR 6.0.0
59
+ string: '{"datetime_removed":"2022-10-29T16:40:34.463022Z","datetime_stored":null,"datetime_uploaded":"2022-10-25T11:11:47.120330Z","is_image":true,"is_ready":true,"mime_type":"image/png","original_file_url":null,"original_filename":"image.png","size":2182,"url":"https://api.uploadcare.com/files/2254146d-3652-4419-abf6-305d36ef30a8/","uuid":"2254146d-3652-4419-abf6-305d36ef30a8","variations":null,"content_info":{"mime":{"mime":"image/png","type":"image","subtype":"png"},"image":{"dpi":null,"width":50,"format":"PNG","height":42,"sequence":false,"color_mode":"RGBA","orientation":null,"geo_location":null,"datetime_original":null}},"metadata":{}}'
60
+ recorded_at: Sat, 29 Oct 2022 19:18:31 GMT
61
+ recorded_with: VCR 6.1.0