Skip to content

Commit

Permalink
add UserRequest
Browse files Browse the repository at this point in the history
  • Loading branch information
bourda_c committed Apr 26, 2024
1 parent d80d9dd commit 5692332
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
- Add new request: Update a collection's item.
- Add new request: Update a job's cell.
- Add new request: Delete a collection's item.
- Fetch the details for the given user.

## [0.4.0] - 2023-09-12

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ module KazeClient
# @see KazeClient::Request
# @see KazeClient::Utils::FinalRequest
# @see KazeClient::Utils::AuthentifiedRequest
# @since 0.1.0
# @since 0.4.1
class UpdateJobCell < Utils::FinalRequest

include Utils::AuthentifiedRequest
Expand Down
21 changes: 21 additions & 0 deletions lib/kaze_client/request/requests/user_request.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# frozen_string_literal: true

module KazeClient

# @author [email protected]
# Show a given user's informations.
# @see KazeClient::Request
# @see KazeClient::Utils::FinalRequest
# @see KazeClient::Utils::AuthentifiedRequest
# @since 0.4.1
class UserRequest < Utils::FinalRequest

include Utils::AuthentifiedRequest

def initialize(user_id)
super(:get, "api/users/#{user_id}")
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 @@ -50,3 +50,4 @@
require_relative 'request/requests/upload_image_request'
require_relative 'request/requests/upload_attachment_request'
require_relative 'request/requests/users_request'
require_relative 'request/requests/user_request'

0 comments on commit 5692332

Please sign in to comment.