Sha256: f9be2feb5b0e7fcaaadb694c022b4d49afe324e8b0ce98eb9c666b4e12a6fef9

Contents?: true

Size: 1.79 KB

Versions: 1

Compression:

Stored size: 1.79 KB

Contents

# frozen_string_literal: true

module RubyLokaliseApi
  module Rest
    module TeamUsers
      # Returns all team users for the given team
      #
      # @see https://app.lokalise.com/api2docs/curl/#transition-list-all-team-users-get
      # @return [RubyLokaliseApi::Collection::TeamUser<RubyLokaliseApi::Resources::TeamUser>]
      # @param team_id [String]
      # @param params [Hash]
      def team_users(team_id, params = {})
        c_r RubyLokaliseApi::Collections::TeamUser, :all, team_id, params
      end

      # Returns team user from the given team
      #
      # @see https://app.lokalise.com/api2docs/curl/#transition-retrieve-a-team-user-get
      # @return [RubyLokaliseApi::Resources::TeamUser]
      # @param team_id [String]
      # @param user_id [String, Integer]
      def team_user(team_id, user_id)
        c_r RubyLokaliseApi::Resources::TeamUser, :find, [team_id, user_id]
      end

      # Updates team user for the given team
      #
      # @see https://app.lokalise.com/api2docs/curl/#transition-update-a-team-user-put
      # @return [RubyLokaliseApi::Resources::TeamUser]
      # @param team_id [String]
      # @param user_id [String, Integer]
      # @param params [Hash]
      def update_team_user(team_id, user_id, params)
        c_r RubyLokaliseApi::Resources::TeamUser, :update, [team_id, user_id], params
      end

      # Deletes team user from the given team
      #
      # @see https://app.lokalise.com/api2docs/curl/#transition-delete-a-team-user-delete
      # @return [RubyLokaliseApi::Resources::TeamUser]
      # @param team_id [String]
      # @param user_id [String, Integer]
      def destroy_team_user(team_id, user_id)
        c_r RubyLokaliseApi::Resources::TeamUser, :destroy, [team_id, user_id]
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ruby-lokalise-api-6.0.0 lib/ruby_lokalise_api/rest/team_users.rb