brick_ftp 1.0.1 → 2.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (99) hide show
  1. checksums.yaml +4 -4
  2. data/.circleci/config.yml +8 -11
  3. data/.github/action/publish_gem/Dockerfile +14 -0
  4. data/.github/action/publish_gem/entrypoint.sh +18 -0
  5. data/.github/action/write_github_release/Dockerfile +14 -0
  6. data/.github/action/write_github_release/entrypoint.sh +48 -0
  7. data/.github/main.workflow +14 -0
  8. data/.rubocop.yml +1 -1
  9. data/.rubocop_todo.yml +7 -0
  10. data/CHANGELOG.md +99 -2
  11. data/README.md +10 -11
  12. data/brick_ftp.gemspec +2 -3
  13. data/docker-compose.yml +7 -0
  14. data/lib/brick_ftp/client.rb +17 -4
  15. data/lib/brick_ftp/core_ext/hash/symbolize_keys.rb +4 -4
  16. data/lib/brick_ftp/restful_api/add_group_member.rb +2 -2
  17. data/lib/brick_ftp/restful_api/client.rb +23 -9
  18. data/lib/brick_ftp/restful_api/complete_upload.rb +2 -2
  19. data/lib/brick_ftp/restful_api/continue_upload.rb +2 -2
  20. data/lib/brick_ftp/restful_api/copy_folder.rb +1 -1
  21. data/lib/brick_ftp/restful_api/count_folder_contents.rb +3 -3
  22. data/lib/brick_ftp/restful_api/count_users.rb +1 -1
  23. data/lib/brick_ftp/restful_api/create_api_key.rb +2 -2
  24. data/lib/brick_ftp/restful_api/create_behavior.rb +2 -2
  25. data/lib/brick_ftp/restful_api/create_bundle.rb +2 -2
  26. data/lib/brick_ftp/restful_api/create_folder.rb +1 -1
  27. data/lib/brick_ftp/restful_api/create_group.rb +2 -2
  28. data/lib/brick_ftp/restful_api/create_notification.rb +2 -2
  29. data/lib/brick_ftp/restful_api/create_permission.rb +2 -2
  30. data/lib/brick_ftp/restful_api/create_public_key.rb +2 -2
  31. data/lib/brick_ftp/restful_api/create_user.rb +2 -2
  32. data/lib/brick_ftp/restful_api/create_user_in_group.rb +2 -2
  33. data/lib/brick_ftp/restful_api/delete_api_key.rb +1 -1
  34. data/lib/brick_ftp/restful_api/delete_behavior.rb +1 -1
  35. data/lib/brick_ftp/restful_api/delete_bundle.rb +1 -1
  36. data/lib/brick_ftp/restful_api/delete_folder.rb +5 -7
  37. data/lib/brick_ftp/restful_api/delete_group.rb +1 -1
  38. data/lib/brick_ftp/restful_api/delete_notification.rb +1 -1
  39. data/lib/brick_ftp/restful_api/delete_permission.rb +1 -1
  40. data/lib/brick_ftp/restful_api/delete_public_key.rb +1 -1
  41. data/lib/brick_ftp/restful_api/delete_user.rb +1 -1
  42. data/lib/brick_ftp/restful_api/download_file.rb +2 -2
  43. data/lib/brick_ftp/restful_api/get_api_key.rb +2 -2
  44. data/lib/brick_ftp/restful_api/get_behavior.rb +2 -2
  45. data/lib/brick_ftp/restful_api/get_bundle.rb +2 -2
  46. data/lib/brick_ftp/restful_api/get_bundle_zip.rb +2 -2
  47. data/lib/brick_ftp/restful_api/get_file_in_bundle.rb +2 -2
  48. data/lib/brick_ftp/restful_api/get_folder_size.rb +1 -1
  49. data/lib/brick_ftp/restful_api/get_group.rb +2 -2
  50. data/lib/brick_ftp/restful_api/get_public_key.rb +2 -2
  51. data/lib/brick_ftp/restful_api/get_site_usage.rb +1 -1
  52. data/lib/brick_ftp/restful_api/get_user.rb +2 -2
  53. data/lib/brick_ftp/restful_api/list_api_keys.rb +2 -2
  54. data/lib/brick_ftp/restful_api/list_behaviors.rb +2 -2
  55. data/lib/brick_ftp/restful_api/list_bundle_contents.rb +2 -2
  56. data/lib/brick_ftp/restful_api/list_bundles.rb +2 -2
  57. data/lib/brick_ftp/restful_api/list_folder_behaviors.rb +2 -2
  58. data/lib/brick_ftp/restful_api/list_folders.rb +2 -2
  59. data/lib/brick_ftp/restful_api/list_groups.rb +2 -2
  60. data/lib/brick_ftp/restful_api/list_notifications.rb +2 -2
  61. data/lib/brick_ftp/restful_api/list_permissions.rb +2 -2
  62. data/lib/brick_ftp/restful_api/list_public_keys.rb +2 -2
  63. data/lib/brick_ftp/restful_api/list_users.rb +2 -2
  64. data/lib/brick_ftp/restful_api/move_folder.rb +1 -1
  65. data/lib/brick_ftp/restful_api/remove_group_member.rb +1 -1
  66. data/lib/brick_ftp/restful_api/retrieve_file_history.rb +1 -1
  67. data/lib/brick_ftp/restful_api/retrieve_folder_history.rb +1 -1
  68. data/lib/brick_ftp/restful_api/retrieve_history.rb +1 -1
  69. data/lib/brick_ftp/restful_api/retrieve_login_history.rb +1 -1
  70. data/lib/brick_ftp/restful_api/retrieve_site_history.rb +1 -1
  71. data/lib/brick_ftp/restful_api/retrieve_user_history.rb +1 -1
  72. data/lib/brick_ftp/restful_api/search_user.rb +2 -2
  73. data/lib/brick_ftp/restful_api/start_upload.rb +2 -2
  74. data/lib/brick_ftp/restful_api/unlock_user.rb +2 -2
  75. data/lib/brick_ftp/restful_api/update_behavior.rb +2 -2
  76. data/lib/brick_ftp/restful_api/update_group.rb +2 -2
  77. data/lib/brick_ftp/restful_api/update_group_member.rb +2 -2
  78. data/lib/brick_ftp/restful_api/update_user.rb +3 -3
  79. data/lib/brick_ftp/restful_api/upload_file.rb +5 -5
  80. data/lib/brick_ftp/restful_api.rb +11 -11
  81. data/lib/brick_ftp/types/behavior.rb +1 -1
  82. data/lib/brick_ftp/types/bundle.rb +1 -1
  83. data/lib/brick_ftp/types/bundle_content.rb +1 -1
  84. data/lib/brick_ftp/types/bundle_zip.rb +1 -1
  85. data/lib/brick_ftp/types/file.rb +1 -1
  86. data/lib/brick_ftp/types/file_in_bundle.rb +1 -1
  87. data/lib/brick_ftp/types/folder_contents_count.rb +2 -2
  88. data/lib/brick_ftp/types/group.rb +1 -1
  89. data/lib/brick_ftp/types/group_membership.rb +1 -1
  90. data/lib/brick_ftp/types/history.rb +1 -1
  91. data/lib/brick_ftp/types/notification.rb +1 -1
  92. data/lib/brick_ftp/types/permission.rb +1 -1
  93. data/lib/brick_ftp/types/upload.rb +1 -1
  94. data/lib/brick_ftp/types/user.rb +1 -1
  95. data/lib/brick_ftp/types/user_api_key.rb +1 -1
  96. data/lib/brick_ftp/types/user_public_key.rb +1 -1
  97. data/lib/brick_ftp/version.rb +1 -1
  98. data/lib/brick_ftp.rb +1 -1
  99. metadata +15 -24
@@ -4,7 +4,7 @@ module BrickFTP
4
4
  module RESTfulAPI
5
5
  # Create a group
6
6
  #
7
- # @see https://developers.brickftp.com/#create-a-group Create a group
7
+ # @see https://developers.files.com/#create-a-group Create a group
8
8
  #
9
9
  # ### Params
10
10
  #
@@ -35,7 +35,7 @@ module BrickFTP
35
35
  def call(params)
36
36
  res = client.post('/api/rest/v1/groups.json', params.to_h.compact)
37
37
 
38
- BrickFTP::Types::Group.new(res.symbolize_keys)
38
+ BrickFTP::Types::Group.new(**res.symbolize_keys)
39
39
  end
40
40
  end
41
41
  end
@@ -4,7 +4,7 @@ module BrickFTP
4
4
  module RESTfulAPI
5
5
  # Create a notification
6
6
  #
7
- # @see https://developers.brickftp.com/#create-a-notification Create a notification
7
+ # @see https://developers.files.com/#create-a-notification Create a notification
8
8
  #
9
9
  # ### Params
10
10
  #
@@ -37,7 +37,7 @@ module BrickFTP
37
37
  def call(params)
38
38
  res = client.post('/api/rest/v1/notifications.json', params.to_h.compact)
39
39
 
40
- BrickFTP::Types::Notification.new(res.symbolize_keys)
40
+ BrickFTP::Types::Notification.new(**res.symbolize_keys)
41
41
  end
42
42
  end
43
43
  end
@@ -4,7 +4,7 @@ module BrickFTP
4
4
  module RESTfulAPI
5
5
  # Create a permission
6
6
  #
7
- # @see https://developers.brickftp.com/#create-a-permission Create a permission
7
+ # @see https://developers.files.com/#create-a-permission Create a permission
8
8
  #
9
9
  # ### Params
10
10
  #
@@ -41,7 +41,7 @@ module BrickFTP
41
41
  def call(params)
42
42
  res = client.post('/api/rest/v1/permissions.json', params.to_h.compact)
43
43
 
44
- BrickFTP::Types::Permission.new(res.symbolize_keys)
44
+ BrickFTP::Types::Permission.new(**res.symbolize_keys)
45
45
  end
46
46
  end
47
47
  end
@@ -4,7 +4,7 @@ module BrickFTP
4
4
  module RESTfulAPI
5
5
  # Create a public key
6
6
  #
7
- # @see https://developers.brickftp.com/#create-a-public-key Create a public key
7
+ # @see https://developers.files.com/#create-a-public-key Create a public key
8
8
  #
9
9
  # ### Params
10
10
  #
@@ -35,7 +35,7 @@ module BrickFTP
35
35
  def call(id, params)
36
36
  res = client.post("/api/rest/v1/users/#{id}/public_keys.json", params.to_h.compact)
37
37
 
38
- BrickFTP::Types::UserPublicKey.new(res.symbolize_keys)
38
+ BrickFTP::Types::UserPublicKey.new(**res.symbolize_keys)
39
39
  end
40
40
  end
41
41
  end
@@ -4,7 +4,7 @@ module BrickFTP
4
4
  module RESTfulAPI
5
5
  # Create a user
6
6
  #
7
- # @see https://developers.brickftp.com/#create-a-user Create a user
7
+ # @see https://developers.files.com/#create-a-user Create a user
8
8
  #
9
9
  # ### Params
10
10
  #
@@ -83,7 +83,7 @@ module BrickFTP
83
83
  def call(params)
84
84
  res = client.post('/api/rest/v1/users.json', params.to_h.compact)
85
85
 
86
- BrickFTP::Types::User.new(res.symbolize_keys)
86
+ BrickFTP::Types::User.new(**res.symbolize_keys)
87
87
  end
88
88
  end
89
89
  end
@@ -4,7 +4,7 @@ module BrickFTP
4
4
  module RESTfulAPI
5
5
  # Create a user in a group
6
6
  #
7
- # @see https://developers.brickftp.com/#create-a-user-in-a-groupCreate a user in a group
7
+ # @see https://developers.files.com/#create-a-user-in-a-groupCreate a user in a group
8
8
  #
9
9
  # ### Params
10
10
  #
@@ -53,7 +53,7 @@ module BrickFTP
53
53
  def call(id, params)
54
54
  res = client.post("/api/rest/v1/groups/#{id}/users.json", user: params.to_h.compact)
55
55
 
56
- BrickFTP::Types::User.new(res.symbolize_keys)
56
+ BrickFTP::Types::User.new(**res.symbolize_keys)
57
57
  end
58
58
  end
59
59
  end
@@ -4,7 +4,7 @@ module BrickFTP
4
4
  module RESTfulAPI
5
5
  # Delete an API key
6
6
  #
7
- # @see https://developers.brickftp.com/#delete-an-api-key Delete an API key
7
+ # @see https://developers.files.com/#delete-an-api-key Delete an API key
8
8
  #
9
9
  class DeleteAPIKey
10
10
  include Command
@@ -4,7 +4,7 @@ module BrickFTP
4
4
  module RESTfulAPI
5
5
  # Delete a behavior
6
6
  #
7
- # @see https://developers.brickftp.com/#delete-a-behavior Delete a behavior
7
+ # @see https://developers.files.com/#delete-a-behavior Delete a behavior
8
8
  #
9
9
  class DeleteBehavior
10
10
  include Command
@@ -4,7 +4,7 @@ module BrickFTP
4
4
  module RESTfulAPI
5
5
  # Delete a bundle
6
6
  #
7
- # @see https://developers.brickftp.com/#delete-a-bundle Delete a bundle
7
+ # @see https://developers.files.com/#delete-a-bundle Delete a bundle
8
8
  #
9
9
  class DeleteBundle
10
10
  include Command
@@ -6,25 +6,23 @@ module BrickFTP
6
6
  module RESTfulAPI
7
7
  # Delete a file or folder
8
8
  #
9
- # @see https://developers.brickftp.com/#delete-a-file-or-folder Delete a file or folder
9
+ # @see https://developers.files.com/#delete-file-folder Delete file/folder
10
10
  #
11
11
  class DeleteFolder
12
12
  include Command
13
13
 
14
14
  # Deletes a file or folder.
15
15
  #
16
- # Note that this operation works for both files and folders, but normally it will only work on empty folders.
17
- # If you want to recursively delete a folder and all its contents, send the request with a `Depth` header
18
- # with the value set to `infinity`.
16
+ # > If true, will recursively delete folers. Otherwise, will error on non-empty folders.
19
17
  #
20
18
  # @param [String] path Full path of the file or folder. Maximum of 550 characters.
21
19
  # @param [Boolean] recursive
22
20
  #
23
21
  def call(path, recursive: false)
24
- headers = {}
25
- headers = { 'Depth' => 'infinity' } if recursive
22
+ url = "/api/rest/v1/files/#{ERB::Util.url_encode(path)}"
23
+ url += '?recursive=true' if recursive
26
24
 
27
- client.delete("/api/rest/v1/files/#{ERB::Util.url_encode(path)}", headers)
25
+ client.delete(url)
28
26
  true
29
27
  end
30
28
  end
@@ -4,7 +4,7 @@ module BrickFTP
4
4
  module RESTfulAPI
5
5
  # Delete a group
6
6
  #
7
- # @see https://developers.brickftp.com/#delete-a-group Delete a group
7
+ # @see https://developers.files.com/#delete-a-group Delete a group
8
8
  #
9
9
  class DeleteGroup
10
10
  include Command
@@ -4,7 +4,7 @@ module BrickFTP
4
4
  module RESTfulAPI
5
5
  # Delete a notification
6
6
  #
7
- # @see https://developers.brickftp.com/#delete-a-notification Delete a notification
7
+ # @see https://developers.files.com/#delete-a-notification Delete a notification
8
8
  #
9
9
  class DeleteNotification
10
10
  include Command
@@ -4,7 +4,7 @@ module BrickFTP
4
4
  module RESTfulAPI
5
5
  # Delete a permission
6
6
  #
7
- # @see https://developers.brickftp.com/#delete-a-permission Delete a permission
7
+ # @see https://developers.files.com/#delete-a-permission Delete a permission
8
8
  #
9
9
  class DeletePermission
10
10
  include Command
@@ -4,7 +4,7 @@ module BrickFTP
4
4
  module RESTfulAPI
5
5
  # Delete a public key
6
6
  #
7
- # @see https://developers.brickftp.com/#delete-a-public-key Delete a public key
7
+ # @see https://developers.files.com/#delete-a-public-key Delete a public key
8
8
  #
9
9
  class DeletePublicKey
10
10
  include Command
@@ -4,7 +4,7 @@ module BrickFTP
4
4
  module RESTfulAPI
5
5
  # Delete a user
6
6
  #
7
- # @see https://developers.brickftp.com/#delete-a-user Delete a user
7
+ # @see https://developers.files.com/#delete-a-user Delete a user
8
8
  #
9
9
  class DeleteUser
10
10
  include Command
@@ -4,7 +4,7 @@ module BrickFTP
4
4
  module RESTfulAPI
5
5
  # Download a file
6
6
  #
7
- # @see https://developers.brickftp.com/#download-a-file Download a file
7
+ # @see https://developers.files.com/#download-a-file Download a file
8
8
  #
9
9
  # ### Params
10
10
  #
@@ -38,7 +38,7 @@ module BrickFTP
38
38
  res = client.get(endpoint)
39
39
  return nil if !res || res.empty?
40
40
 
41
- BrickFTP::Types::File.new(res.symbolize_keys)
41
+ BrickFTP::Types::File.new(**res.symbolize_keys)
42
42
  end
43
43
  end
44
44
  end
@@ -4,7 +4,7 @@ module BrickFTP
4
4
  module RESTfulAPI
5
5
  # Show an API key
6
6
  #
7
- # @see https://developers.brickftp.com/#show-an-api-key Show an API key
7
+ # @see https://developers.files.com/#show-an-api-key Show an API key
8
8
  #
9
9
  class GetAPIKey
10
10
  include Command
@@ -19,7 +19,7 @@ module BrickFTP
19
19
  def call(id)
20
20
  res = client.get("/api/rest/v1/api_keys/#{id}.json")
21
21
 
22
- BrickFTP::Types::UserAPIKey.new(res.symbolize_keys)
22
+ BrickFTP::Types::UserAPIKey.new(**res.symbolize_keys)
23
23
  end
24
24
  end
25
25
  end
@@ -4,7 +4,7 @@ module BrickFTP
4
4
  module RESTfulAPI
5
5
  # Show a behavior
6
6
  #
7
- # @see https://developers.brickftp.com/#show-a-behavior Show a behavior
7
+ # @see https://developers.files.com/#show-a-behavior Show a behavior
8
8
  #
9
9
  class GetBehavior
10
10
  include Command
@@ -19,7 +19,7 @@ module BrickFTP
19
19
  res = client.get("/api/rest/v1/behaviors/#{id}.json")
20
20
  return nil if !res || res.empty?
21
21
 
22
- BrickFTP::Types::Behavior.new(res.symbolize_keys)
22
+ BrickFTP::Types::Behavior.new(**res.symbolize_keys)
23
23
  end
24
24
  end
25
25
  end
@@ -4,7 +4,7 @@ module BrickFTP
4
4
  module RESTfulAPI
5
5
  # Show a bundle
6
6
  #
7
- # @see https://developers.brickftp.com/#show-a-bundle Show a bundle
7
+ # @see https://developers.files.com/#show-a-bundle Show a bundle
8
8
  #
9
9
  class GetBundle
10
10
  include Command
@@ -19,7 +19,7 @@ module BrickFTP
19
19
  res = client.get("/api/rest/v1/bundles/#{id}.json")
20
20
  return nil if !res || res.empty?
21
21
 
22
- BrickFTP::Types::Bundle.new(res.symbolize_keys)
22
+ BrickFTP::Types::Bundle.new(**res.symbolize_keys)
23
23
  end
24
24
  end
25
25
  end
@@ -4,7 +4,7 @@ module BrickFTP
4
4
  module RESTfulAPI
5
5
  # Download entire bundle as ZIP
6
6
  #
7
- # @see https://developers.brickftp.com/#download-entire-bundle-as-zip Download entire bundle as ZIP
7
+ # @see https://developers.files.com/#download-entire-bundle-as-zip Download entire bundle as ZIP
8
8
  #
9
9
  # ### Params
10
10
  #
@@ -41,7 +41,7 @@ module BrickFTP
41
41
  def call(params)
42
42
  res = client.post('/api/rest/v1/bundles/zip.json', params.to_h.compact)
43
43
 
44
- BrickFTP::Types::BundleZip.new(res.symbolize_keys)
44
+ BrickFTP::Types::BundleZip.new(**res.symbolize_keys)
45
45
  end
46
46
  end
47
47
  end
@@ -4,7 +4,7 @@ module BrickFTP
4
4
  module RESTfulAPI
5
5
  # Download one file in a bundle
6
6
  #
7
- # @see https://developers.brickftp.com/#download-one-file-in-a-bundle Download one file in a bundle
7
+ # @see https://developers.files.com/#download-one-file-in-a-bundle Download one file in a bundle
8
8
  #
9
9
  # ### Params
10
10
  #
@@ -42,7 +42,7 @@ module BrickFTP
42
42
  def call(params)
43
43
  res = client.post('/api/rest/v1/bundles/download.json', params.to_h.compact)
44
44
 
45
- BrickFTP::Types::FileInBundle.new(res.symbolize_keys)
45
+ BrickFTP::Types::FileInBundle.new(**res.symbolize_keys)
46
46
  end
47
47
  end
48
48
  end
@@ -6,7 +6,7 @@ module BrickFTP
6
6
  module RESTfulAPI
7
7
  # Get folder size
8
8
  #
9
- # @see https://developers.brickftp.com/#get-folder-size Get folder size
9
+ # @see https://developers.files.com/#get-folder-size Get folder size
10
10
  #
11
11
  class GetFolderSize
12
12
  include Command
@@ -4,7 +4,7 @@ module BrickFTP
4
4
  module RESTfulAPI
5
5
  # Show a group
6
6
  #
7
- # @see https://developers.brickftp.com/#show-a-group Show a group
7
+ # @see https://developers.files.com/#show-a-group Show a group
8
8
  #
9
9
  class GetGroup
10
10
  include Command
@@ -20,7 +20,7 @@ module BrickFTP
20
20
  res = client.get("/api/rest/v1/groups/#{id}.json")
21
21
  return nil if !res || res.empty?
22
22
 
23
- BrickFTP::Types::Group.new(res.symbolize_keys)
23
+ BrickFTP::Types::Group.new(**res.symbolize_keys)
24
24
  end
25
25
  end
26
26
  end
@@ -4,7 +4,7 @@ module BrickFTP
4
4
  module RESTfulAPI
5
5
  # Show a public key
6
6
  #
7
- # @see https://developers.brickftp.com/#show-a-public-key Show a public key
7
+ # @see https://developers.files.com/#show-a-public-key Show a public key
8
8
  #
9
9
  class GetPublicKey
10
10
  include Command
@@ -19,7 +19,7 @@ module BrickFTP
19
19
  def call(id)
20
20
  res = client.get("/api/rest/v1/public_keys/#{id}.json")
21
21
 
22
- BrickFTP::Types::UserPublicKey.new(res.symbolize_keys)
22
+ BrickFTP::Types::UserPublicKey.new(**res.symbolize_keys)
23
23
  end
24
24
  end
25
25
  end
@@ -13,7 +13,7 @@ module BrickFTP
13
13
  def call
14
14
  res = client.get('/api/rest/v1/site/usage.json')
15
15
 
16
- BrickFTP::Types::SiteUsage.new(res.symbolize_keys)
16
+ BrickFTP::Types::SiteUsage.new(**res.symbolize_keys)
17
17
  end
18
18
  end
19
19
  end
@@ -4,7 +4,7 @@ module BrickFTP
4
4
  module RESTfulAPI
5
5
  # Show a user
6
6
  #
7
- # @see https://developers.brickftp.com/#show-a-user Show a user
7
+ # @see https://developers.files.com/#show-a-user Show a user
8
8
  #
9
9
  class GetUser
10
10
  include Command
@@ -20,7 +20,7 @@ module BrickFTP
20
20
  res = client.get("/api/rest/v1/users/#{id}.json")
21
21
  return nil if !res || res.empty?
22
22
 
23
- BrickFTP::Types::User.new(res.symbolize_keys)
23
+ BrickFTP::Types::User.new(**res.symbolize_keys)
24
24
  end
25
25
  end
26
26
  end
@@ -4,7 +4,7 @@ module BrickFTP
4
4
  module RESTfulAPI
5
5
  # List API keys
6
6
  #
7
- # @see https://developers.brickftp.com/#list-api-keys List API keys
7
+ # @see https://developers.files.com/#list-api-keys List API keys
8
8
  #
9
9
  class ListAPIKeys
10
10
  include Command
@@ -19,7 +19,7 @@ module BrickFTP
19
19
  def call(id)
20
20
  res = client.get("/api/rest/v1/users/#{id}/api_keys.json")
21
21
 
22
- res.map { |i| BrickFTP::Types::UserAPIKey.new(i.symbolize_keys) }
22
+ res.map { |i| BrickFTP::Types::UserAPIKey.new(**i.symbolize_keys) }
23
23
  end
24
24
  end
25
25
  end
@@ -4,7 +4,7 @@ module BrickFTP
4
4
  module RESTfulAPI
5
5
  # List all behaviors
6
6
  #
7
- # @see https://developers.brickftp.com/#list-all-behaviors List all behaviors
7
+ # @see https://developers.files.com/#list-all-behaviors List all behaviors
8
8
  #
9
9
  class ListBehaviors
10
10
  include Command
@@ -17,7 +17,7 @@ module BrickFTP
17
17
  def call
18
18
  res = client.get('/api/rest/v1/behaviors.json')
19
19
 
20
- res.map { |i| BrickFTP::Types::Behavior.new(i.symbolize_keys) }
20
+ res.map { |i| BrickFTP::Types::Behavior.new(**i.symbolize_keys) }
21
21
  end
22
22
  end
23
23
  end
@@ -6,7 +6,7 @@ module BrickFTP
6
6
  module RESTfulAPI
7
7
  # List bundle contents
8
8
  #
9
- # @see https://developers.brickftp.com/#list-bundle-contents List bundle contents
9
+ # @see https://developers.files.com/#list-bundle-contents List bundle contents
10
10
  #
11
11
  # ### Params
12
12
  #
@@ -51,7 +51,7 @@ module BrickFTP
51
51
  end
52
52
  res = client.post(endpoint, params.to_h.compact)
53
53
 
54
- res.map { |i| BrickFTP::Types::BundleContent.new(i.symbolize_keys) }
54
+ res.map { |i| BrickFTP::Types::BundleContent.new(**i.symbolize_keys) }
55
55
  end
56
56
  end
57
57
  end
@@ -4,7 +4,7 @@ module BrickFTP
4
4
  module RESTfulAPI
5
5
  # List all bundles
6
6
  #
7
- # @see https://developers.brickftp.com/#list-all-bundles List all bundles
7
+ # @see https://developers.files.com/#list-all-bundles List all bundles
8
8
  #
9
9
  class ListBundles
10
10
  include Command
@@ -17,7 +17,7 @@ module BrickFTP
17
17
  def call
18
18
  res = client.get('/api/rest/v1/bundles.json')
19
19
 
20
- res.map { |i| BrickFTP::Types::Bundle.new(i.symbolize_keys) }
20
+ res.map { |i| BrickFTP::Types::Bundle.new(**i.symbolize_keys) }
21
21
  end
22
22
  end
23
23
  end
@@ -6,7 +6,7 @@ module BrickFTP
6
6
  module RESTfulAPI
7
7
  # List behaviors for a folder
8
8
  #
9
- # @see https://developers.brickftp.com/#list-behaviors-for-a-folder List behaviors for a folder
9
+ # @see https://developers.files.com/#list-behaviors-for-a-folder List behaviors for a folder
10
10
  #
11
11
  # ### Params
12
12
  #
@@ -33,7 +33,7 @@ module BrickFTP
33
33
  endpoint = "#{endpoint}?recursive=1" if recursive
34
34
  res = client.get(endpoint)
35
35
 
36
- res.map { |i| BrickFTP::Types::Behavior.new(i.symbolize_keys) }
36
+ res.map { |i| BrickFTP::Types::Behavior.new(**i.symbolize_keys) }
37
37
  end
38
38
  end
39
39
  end
@@ -6,7 +6,7 @@ module BrickFTP
6
6
  module RESTfulAPI
7
7
  # List folder contents
8
8
  #
9
- # @see https://developers.brickftp.com/#list-folder-contents List folder contents
9
+ # @see https://developers.files.com/#list-folder-contents List folder contents
10
10
  #
11
11
  # ### Params
12
12
  #
@@ -59,7 +59,7 @@ module BrickFTP
59
59
 
60
60
  res = client.get(endpoint)
61
61
 
62
- res.map { |i| BrickFTP::Types::File.new(i.symbolize_keys) }
62
+ res.map { |i| BrickFTP::Types::File.new(**i.symbolize_keys) }
63
63
  end
64
64
 
65
65
  private
@@ -4,7 +4,7 @@ module BrickFTP
4
4
  module RESTfulAPI
5
5
  # List all groups
6
6
  #
7
- # @see https://developers.brickftp.com/#list-all-groups List all groups
7
+ # @see https://developers.files.com/#list-all-groups List all groups
8
8
  #
9
9
  class ListGroups
10
10
  include Command
@@ -17,7 +17,7 @@ module BrickFTP
17
17
  def call
18
18
  res = client.get('/api/rest/v1/groups.json')
19
19
 
20
- res.map { |i| BrickFTP::Types::Group.new(i.symbolize_keys) }
20
+ res.map { |i| BrickFTP::Types::Group.new(**i.symbolize_keys) }
21
21
  end
22
22
  end
23
23
  end
@@ -4,7 +4,7 @@ module BrickFTP
4
4
  module RESTfulAPI
5
5
  # List all notifications
6
6
  #
7
- # @see https://developers.brickftp.com/#list-all-notifications List all notifications
7
+ # @see https://developers.files.com/#list-all-notifications List all notifications
8
8
  #
9
9
  class ListNotifications
10
10
  include Command
@@ -17,7 +17,7 @@ module BrickFTP
17
17
  def call
18
18
  res = client.get('/api/rest/v1/notifications.json')
19
19
 
20
- res.map { |i| BrickFTP::Types::Notification.new(i.symbolize_keys) }
20
+ res.map { |i| BrickFTP::Types::Notification.new(**i.symbolize_keys) }
21
21
  end
22
22
  end
23
23
  end
@@ -6,7 +6,7 @@ module BrickFTP
6
6
  module RESTfulAPI
7
7
  # List permissions
8
8
  #
9
- # @see https://developers.brickftp.com/#list-permissions List permissions
9
+ # @see https://developers.files.com/#list-permissions List permissions
10
10
  #
11
11
  # ### Params
12
12
  #
@@ -35,7 +35,7 @@ module BrickFTP
35
35
  endpoint = "#{endpoint}?path=#{ERB::Util.url_encode(path)}" unless path.nil?
36
36
  res = client.get(endpoint)
37
37
 
38
- res.map { |i| BrickFTP::Types::Permission.new(i.symbolize_keys) }
38
+ res.map { |i| BrickFTP::Types::Permission.new(**i.symbolize_keys) }
39
39
  end
40
40
  end
41
41
  end
@@ -4,7 +4,7 @@ module BrickFTP
4
4
  module RESTfulAPI
5
5
  # List public keys
6
6
  #
7
- # @see https://developers.brickftp.com/#list-public-keys List public keys
7
+ # @see https://developers.files.com/#list-public-keys List public keys
8
8
  #
9
9
  class ListPublicKeys
10
10
  include Command
@@ -19,7 +19,7 @@ module BrickFTP
19
19
  def call(id)
20
20
  res = client.get("/api/rest/v1/users/#{id}/public_keys.json")
21
21
 
22
- res.map { |i| BrickFTP::Types::UserPublicKey.new(i.symbolize_keys) }
22
+ res.map { |i| BrickFTP::Types::UserPublicKey.new(**i.symbolize_keys) }
23
23
  end
24
24
  end
25
25
  end
@@ -4,7 +4,7 @@ module BrickFTP
4
4
  module RESTfulAPI
5
5
  # List users
6
6
  #
7
- # @see https://developers.brickftp.com/#list-users List users
7
+ # @see https://developers.files.com/#list-users List users
8
8
  #
9
9
  # ### Params
10
10
  #
@@ -38,7 +38,7 @@ module BrickFTP
38
38
  endpoint = "#{endpoint}?#{query}" unless query.empty?
39
39
  res = client.get(endpoint)
40
40
 
41
- res.map { |i| BrickFTP::Types::User.new(i.symbolize_keys) }
41
+ res.map { |i| BrickFTP::Types::User.new(**i.symbolize_keys) }
42
42
  end
43
43
 
44
44
  private
@@ -6,7 +6,7 @@ module BrickFTP
6
6
  module RESTfulAPI
7
7
  # Move or rename a file or folder
8
8
  #
9
- # @see https://developers.brickftp.com/#move-or-rename-a-file-or-folder Move or rename a file or folder
9
+ # @see https://developers.files.com/#move-or-rename-a-file-or-folder Move or rename a file or folder
10
10
  #
11
11
  # ### Params
12
12
  #
@@ -4,7 +4,7 @@ module BrickFTP
4
4
  module RESTfulAPI
5
5
  # Remove a member
6
6
  #
7
- # @see https://developers.brickftp.com/#remove-a-member Remove a member
7
+ # @see https://developers.files.com/#remove-a-member Remove a member
8
8
  #
9
9
  class RemoveGroupMember
10
10
  include Command
@@ -6,7 +6,7 @@ module BrickFTP
6
6
  module RESTfulAPI
7
7
  # Retrieve file history
8
8
  #
9
- # @see https://developers.brickftp.com/#retrieve-file-history Retrieve file history
9
+ # @see https://developers.files.com/#retrieve-file-history Retrieve file history
10
10
  #
11
11
  # ### Params
12
12
  #