settings Params

Param name Description
id required . Must be String

The requested id

comments powered by <span class='logo-disqus'>Disqus</span>
GET /v2/votes/25
200
{
  "id": 25,
  "kind": "problem",
  "created_at": "2017-11-22T13:42:20.577Z",
  "user": null,
  "message": {
    "id": 61,
    "author": {
      "login": "dmaul",
      "id": 47,
      "url": "https://profile.intra.42.fr/users/dmaul"
    },
    "content": "Pabst chicharrones williamsburg poutine butcher vegan brooklyn leggings. Beard wolf umami meh mlkshk park pug. Cred mustache blue bottle tattooed everyday. Irony yr loko bitters raw denim 90's migas portland. Artisan ethical pinterest pug keffiyeh microdosing migas.\nLo-fi intelligentsia cliche plaid chillwave church-key offal. Microdosing swag austin art party carry pitchfork migas xoxo. Aesthetic pabst actually viral food truck franzen keffiyeh squid. Ethical blog blue bottle cornhole ugh.\nChambray disrupt lomo marfa. Bitters artisan tilde. Stumptown williamsburg venmo helvetica mustache deep v drinking.",
    "content_html": null,
    "replies": [],
    "created_at": "2017-11-22T13:42:17.382Z",
    "updated_at": "2017-11-22T13:42:20.579Z",
    "parent_id": null,
    "is_root": true,
    "messageable_id": 7,
    "messageable_type": "Topic",
    "votes_count": {
      "upvote": 0,
      "downvote": 0,
      "trollvote": 0,
      "problem": 1
    },
    "user_votes": {
      "upvote": false,
      "downvote": false,
      "trollvote": false,
      "problem": false
    },
    "readings": 0
  }
}
curl  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" "https://api.intra.42.fr/v2/votes/25"

{
  "id": 25,
  "kind": "problem",
  "created_at": "2017-11-22T13:42:20.577Z",
  "user": null,
  "message": {
    "id": 61,
    "author": {
      "login": "dmaul",
      "id": 47,
      "url": "https://profile.intra.42.fr/users/dmaul"
    },
    "content": "Pabst chicharrones williamsburg poutine butcher vegan brooklyn leggings. Beard wolf umami meh mlkshk park pug. Cred mustache blue bottle tattooed everyday. Irony yr loko bitters raw denim 90's migas portland. Artisan ethical pinterest pug keffiyeh microdosing migas.\nLo-fi intelligentsia cliche plaid chillwave church-key offal. Microdosing swag austin art party carry pitchfork migas xoxo. Aesthetic pabst actually viral food truck franzen keffiyeh squid. Ethical blog blue bottle cornhole ugh.\nChambray disrupt lomo marfa. Bitters artisan tilde. Stumptown williamsburg venmo helvetica mustache deep v drinking.",
    "content_html": null,
    "replies": [],
    "created_at": "2017-11-22T13:42:17.382Z",
    "updated_at": "2017-11-22T13:42:20.579Z",
    "parent_id": null,
    "is_root": true,
    "messageable_id": 7,
    "messageable_type": "Topic",
    "votes_count": {
      "upvote": 0,
      "downvote": 0,
      "trollvote": 0,
      "problem": 1
    },
    "user_votes": {
      "upvote": false,
      "downvote": false,
      "trollvote": false,
      "problem": false
    },
    "readings": 0
  }
}
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/votes/25")
response.status
# => 200
response.parsed
# => {"id"=>25, "kind"=>"problem", "created_at"=>"2017-11-22T13:42:20.577Z", "user"=>nil, "message"=>{"id"=>61, "author"=>{"login"=>"dmaul", "id"=>47, "url"=>"https://profile.intra.42.fr/users/dmaul"}, "content"=>"Pabst chicharrones williamsburg poutine butcher vegan brooklyn leggings. Beard wolf umami meh mlkshk park pug. Cred mustache blue bottle tattooed everyday. Irony yr loko bitters raw denim 90's migas portland. Artisan ethical pinterest pug keffiyeh microdosing migas.\nLo-fi intelligentsia cliche plaid chillwave church-key offal. Microdosing swag austin art party carry pitchfork migas xoxo. Aesthetic pabst actually viral food truck franzen keffiyeh squid. Ethical blog blue bottle cornhole ugh.\nChambray disrupt lomo marfa. Bitters artisan tilde. Stumptown williamsburg venmo helvetica mustache deep v drinking.", "content_html"=>nil, "replies"=>[], "created_at"=>"2017-11-22T13:42:17.382Z", "updated_at"=>"2017-11-22T13:42:20.579Z", "parent_id"=>nil, "is_root"=>true, "messageable_id"=>7, "messageable_type"=>"Topic", "votes_count"=>{"upvote"=>0, "downvote"=>0, "trollvote"=>0, "problem"=>1}, "user_votes"=>{"upvote"=>false, "downvote"=>false, "trollvote"=>false, "problem"=>false}, "readings"=>0}}