Skip to content

Commit

Permalink
add LinkedCollectionsRequest
Browse files Browse the repository at this point in the history
  • Loading branch information
bourda_c committed Apr 8, 2024
1 parent 7baf026 commit 3f5ccdb
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 0 deletions.
1 change: 1 addition & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ GEM

PLATFORMS
aarch64-linux
arm64-darwin-22
x86_64-darwin-20

DEPENDENCIES
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# frozen_string_literal: true

module KazeClient

module Collection

module Item

class LinkedCollectionsRequest < Utils::FinalRequest

include Utils::AuthentifiedRequest
include Utils::ListRequest

# @author [email protected]
# Fetch all items linked to a given item
# @see KazeClient::Request
# @see KazeClient::Utils::FinalRequest
# @see KazeClient::Utils::AuthentifiedRequest
# @since 0.4.0
def initialize(collection_id, collection_item_id)
super(:get, "api/collections/#{collection_id}/items/#{collection_item_id}/linked_collections")
end

end

end

end

end
1 change: 1 addition & 0 deletions lib/kaze_client/requests.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
require_relative 'request/requests/collections/items/items_request'
require_relative 'request/requests/collections/items/create_link_request'
require_relative 'request/requests/collections/items/create_collection_item_request'
require_relative 'request/requests/collections/items/linked_collections_request'

# => Tags
require_relative 'request/requests/tags/tag_request'
Expand Down

0 comments on commit 3f5ccdb

Please sign in to comment.