lib/pixela/client/user_methods.rb in pixela-0.1.1 vs lib/pixela/client/user_methods.rb in pixela-0.2.0
- old
+ new
@@ -7,10 +7,13 @@
# @return [Hashie::Mash]
#
# @raise [Pixela::PixelaError] API is failed
#
# @see https://pixe.la/#api-user
+ #
+ # @example
+ # client.create_user(agree_terms_of_service: true, not_minor: true)
def create_user(agree_terms_of_service:, not_minor:)
params = {
token: token,
username: username,
agreeTermsOfService: to_boolean_string(agree_terms_of_service),
@@ -29,10 +32,13 @@
# @return [Hashie::Mash]
#
# @raise [Pixela::PixelaError] API is failed
#
# @see https://pixe.la/#api-user
+ #
+ # @example
+ # client.update_user(new_token: "thisissecret")
def update_user(new_token:)
params = {
newToken: new_token,
}
@@ -51,9 +57,12 @@
# @return [Hashie::Mash]
#
# @raise [Pixela::PixelaError] API is failed
#
# @see https://pixe.la/#api-user
+ #
+ # @example
+ # client.delete_user
def delete_user
with_error_handling do
connection.delete("users/#{username}", nil, user_token_headers).body
end
end