GET /v2/expertises_users/:id
Get an expertises user
settings Params
Param name | Description |
---|---|
id |
required
. Must be String
The requested id |
Examples
GET /v2/expertises_users/3
200
{
"id": 3,
"expertise_id": 6,
"interested": false,
"value": 2,
"contact_me": false,
"created_at": "2017-11-22T13:41:22.512Z",
"user_id": 3,
"expertise": {
"id": 6,
"name": "AngularJS",
"slug": "angularjs",
"url": "https://api.intra.42.fr/v2/expertises/angularjs",
"kind": "frameworks",
"created_at": "2017-11-22T13:41:01.803Z",
"expertises_users_url": "https://api.intra.42.fr/v2/expertises/angularjs/expertises_users"
},
"user": {
"id": 3,
"login": "gargamel",
"url": "https://api.intra.42.fr/v2/users/gargamel"
}
}
curl -H "Authorization: Bearer YOUR_ACCESS_TOKEN" "https://api.intra.42.fr/v2/expertises_users/3"
{
"id": 3,
"expertise_id": 6,
"interested": false,
"value": 2,
"contact_me": false,
"created_at": "2017-11-22T13:41:22.512Z",
"user_id": 3,
"expertise": {
"id": 6,
"name": "AngularJS",
"slug": "angularjs",
"url": "https://api.intra.42.fr/v2/expertises/angularjs",
"kind": "frameworks",
"created_at": "2017-11-22T13:41:01.803Z",
"expertises_users_url": "https://api.intra.42.fr/v2/expertises/angularjs/expertises_users"
},
"user": {
"id": 3,
"login": "gargamel",
"url": "https://api.intra.42.fr/v2/users/gargamel"
}
}
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/expertises_users/3")
response.status
# => 200
response.parsed
# => {"id"=>3, "expertise_id"=>6, "interested"=>false, "value"=>2, "contact_me"=>false, "created_at"=>"2017-11-22T13:41:22.512Z", "user_id"=>3, "expertise"=>{"id"=>6, "name"=>"AngularJS", "slug"=>"angularjs", "url"=>"https://api.intra.42.fr/v2/expertises/angularjs", "kind"=>"frameworks", "created_at"=>"2017-11-22T13:41:01.803Z", "expertises_users_url"=>"https://api.intra.42.fr/v2/expertises/angularjs/expertises_users"}, "user"=>{"id"=>3, "login"=>"gargamel", "url"=>"https://api.intra.42.fr/v2/users/gargamel"}}