GET /v2/coalitions_users/:id
Get a coalitions user
settings Params
Param name | Description |
---|---|
id |
required
. Must be String
The requested id |
coalitions_user | optional , nil allowed . Must be a Hash |
coalitions_user[coalition_id] |
optional
. Must be Fixnum
The coalition id. |
coalitions_user[user_id] |
optional
. Must be Fixnum
The user id. Must be unique in the scope of a given coalition. |
coalitions_user[this_year_score] |
optional
. Must be Fixnum
The this year score. |
coalitions_user[this_year_score_updated_at] |
optional
, nil allowed
. Must be DateTime
The this year score updated at. |
Examples
GET /v2/coalitions_users/4
200
{
"id": 4,
"coalition_id": 1,
"user_id": 67,
"created_at": "2017-11-22T13:42:09.775Z",
"updated_at": "2017-11-22T13:42:09.775Z"
}
curl -H "Authorization: Bearer YOUR_ACCESS_TOKEN" "https://api.intra.42.fr/v2/coalitions_users/4"
{
"id": 4,
"coalition_id": 1,
"user_id": 67,
"created_at": "2017-11-22T13:42:09.775Z",
"updated_at": "2017-11-22T13:42:09.775Z"
}
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
response = token.get("/v2/coalitions_users/4")
response.status
# => 200
response.parsed
# => {"id"=>4, "coalition_id"=>1, "user_id"=>67, "created_at"=>"2017-11-22T13:42:09.775Z", "updated_at"=>"2017-11-22T13:42:09.775Z"}