Lokalise APIv2 Ruby SDK

Ruby interface for the Lokalise APIv2 that represents returned data as Ruby objects.

View the Project on GitHub lokalise/ruby-lokalise-api




Team users

Team user attributes

Fetch team users

Doc

@client.team_users(team_id, params = {})  # Input:
                                          ## team_id (string, required)
                                          ## params (hash)
                                          ### :page and :limit
                                          # Output:
                                          ## Collection of team users

For example:

@client.team_users team_id, limit: 1, page: 3

Fetch a single team user

Doc

@client.team_user(team_id, user_id) # Input:
                                    ## team_id (string, required)
                                    ## user_id (string, required)
                                    # Output:
                                    ## Team user

Update team user

Doc

@client.update_team_user(team_id, user_id, params)  # Input:
                                                    ## team_id (string, required)
                                                    ## user_id (string, required)
                                                    ## params (hash, required):
                                                    ### :role (string, required) - :owner, :admin, or :member
                                                    # Output:
                                                    ## Updated team user

Alternatively:

user = @client.team_user('team_id', 'user_id')
user.update(params)

For example:

@client.update_team_user team_id, team_user_id, role: 'admin'

Delete team user

Doc

@client.destroy_team_user(team_id, user_id) # Input:
                                            ## team_id (string, required)
                                            ## user_id (string, required)
                                            # Output:
                                            ## Hash with "team_id" and "team_user_deleted" set to "true"

Alternatively:

user = @client.team_user('team_id', 'user_id')
user.destroy