live_help Notes

assignment This action requires one of theses roles: Tutor

settings Params

Param name Description
user_id optional . Must be String

The user id or slug

id required . Must be String

The requested id

languages_user optional , nil allowed . Must be a Hash
languages_user[language_id] optional . Must be Fixnum

The language id.

languages_user[user_id] optional , nil allowed . Must be Fixnum

The user id. Must be unique in the scope of a given language.

languages_user[position] optional , nil allowed . Must be Fixnum

The position.

comments powered by <span class='logo-disqus'>Disqus</span>
PUT /v2/languages_users/27
{
  "languages_user": {
    "language_id": "3",
    "position": "1",
    "user_id": "7"
  }
}
204
curl  -X PUT -H "Authorization: Bearer YOUR_ACCESS_TOKEN" -H "Content-Type: application/json" -d '{"languages_user":{"language_id":"3","position":"1","user_id":"7"}}' "https://api.intra.42.fr/v2/languages_users/27"
require "oauth2"
UID = "Your application uid"
SECRET = "Your application secret"
client = OAuth2::Client.new(UID, SECRET, site: "https://api.intra.42.fr")
token = client.client_credentials.get_token

params = {languages_user: {language_id: "3", position: "1", user_id: "7"}}
response = token.put("/v2/languages_users/27", params: params)
response.status
# => 204
response.parsed
# =>