lib/smartsheet/endpoints/users/users.rb in smartsheet-2.77.2 vs lib/smartsheet/endpoints/users/users.rb in smartsheet-2.86.0

- old
+ new

@@ -72,7 +72,53 @@ body: body, user_id: user_id ) client.make_request(endpoint_spec, request_spec) end + + def add_profile_image( + user_id:, + file:, + filename:, + file_length:, + content_type: '', + params: {}, + header_overrides: {} + ) + endpoint_spec = Smartsheet::API::EndpointSpec.new( + :post, + ['users', :user_id, 'profileimage'], + body_type: :file + ) + request_spec = Smartsheet::API::RequestSpec.new( + header_overrides: header_overrides, + params: params, + file_spec: Smartsheet::API::ObjectFileSpec.new(file, filename, file_length, content_type), + user_id: user_id + ) + client.make_request(endpoint_spec, request_spec) + end + + def add_profile_image_from_path( + user_id:, + path:, + filename: nil, + content_type: '', + params: {}, + header_overrides: {} + ) + endpoint_spec = Smartsheet::API::EndpointSpec.new( + :post, + ['users', :user_id, 'profileimage'], + body_type: :file + ) + request_spec = Smartsheet::API::RequestSpec.new( + header_overrides: header_overrides, + params: params, + file_spec: Smartsheet::API::PathFileSpec.new(path, filename, content_type), + user_id: user_id + ) + client.make_request(endpoint_spec, request_spec) + end + end end \ No newline at end of file