settings Params

Param name Description
id required . Must be String

The requested id

coalition optional , nil allowed . Must be a Hash
coalition[bloc_id] optional . Must be Fixnum

The bloc id.

coalition[user_id] optional . Must be Fixnum

The user id.

coalition[name] optional . Must be String

The name. Must be unique in the scope of a given bloc.

coalition[image] optional . Must be File

The image.

coalition[slug] optional , nil allowed . Must be String

The slug.

coalition[color] optional . Must be String

The color.

coalition[cover] optional , nil allowed . Must be File

The cover.

comments powered by <span class='logo-disqus'>Disqus</span>
GET /v2/coalitions/2
200
{
  "id": 2,
  "name": "Kansas giants",
  "slug": "super-slug",
  "image_url": "https://admin.intra.42.fr/uploads/coalition/image/2/logo.svg",
  "color": "#087262",
  "score": 83,
  "user_id": 90
}
curl  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" "https://api.intra.42.fr/v2/coalitions/2"

{
  "id": 2,
  "name": "Kansas giants",
  "slug": "super-slug",
  "image_url": "https://admin.intra.42.fr/uploads/coalition/image/2/logo.svg",
  "color": "#087262",
  "score": 83,
  "user_id": 90
}
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/2")
response.status
# => 200
response.parsed
# => {"id"=>2, "name"=>"Kansas giants", "slug"=>"super-slug", "image_url"=>"https://admin.intra.42.fr/uploads/coalition/image/2/logo.svg", "color"=>"#087262", "score"=>83, "user_id"=>90}