live_help Notes

assignment This action requires one of theses roles: Advanced tutor

settings Params

Param name Description
id required . Must be String

The requested id

pool_id optional . Must be String

The pool id

balance optional , nil allowed . Must be a Hash
balance[begin_at] optional . Must be Fixnum

The begin at. Must be before end at. .

balance[end_at] optional . Must be Fixnum

The end at. .

balance[pool_id] optional , nil allowed . Must be Fixnum

The pool id.

GET /v2/balances/191
200
{
  "id": 191,
  "begin_at": "2018-06-16 10:49:28",
  "end_at": "2018-06-16 14:03:41",
  "pool_id": 21
}
curl  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" "https://api.intra.42.fr/v2/balances/191"

{
  "id": 191,
  "begin_at": "2018-06-16 10:49:28",
  "end_at": "2018-06-16 14:03:41",
  "pool_id": 21
}
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/balances/191")
response.status
# => 200
response.parsed
# => {"id"=>191, "begin_at"=>"2018-06-16 10:49:28", "end_at"=>"2018-06-16 14:03:41", "pool_id"=>21}