Sha256: 66cc064d417117292f159b6e4ac24a1d57d49dc88a55e3dadcc55831d53b1e73

Contents?: true

Size: 854 Bytes

Versions: 1

Compression:

Stored size: 854 Bytes

Contents

# frozen_string_literal: true

module NatureRemo
  module Endpoints
    # Endpoints for user infomation
    module Users
      # Fetch the authenticated user's information.
      # @return [String] User information.
      # @raise [NatureRemo::ServerError] Raise error if resposonse status is NOT success.
      #
      # https://swagger.nature.global/#/default/get_1_users_me
      def user_me
        get('users/me')
      end

      # Update authenticated user nickname.
      # @param [String] nickname New user's nickname.
      # @return [String] Updated user information.
      # @raise [NatureRemo::ServerError] Raise error if resposonse status is NOT success.
      #
      # https://swagger.nature.global/#/default/post_1_users_me
      def update_user_me(nickname:)
        post('users/me', { nickname: nickname })
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
nature_remo_client-0.1.0 lib/nature_remo/endpoints/users.rb