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/14
200
{
  "id": 14,
  "kind": "downvote",
  "created_at": "2017-03-06T14:59:44.599Z",
  "user": null,
  "message": {
    "id": 66,
    "author": {
      "login": "pdameron",
      "id": 39,
      "url": "https://profile.intra.42.fr/users/pdameron"
    },
    "content": "Keytar sriracha etsy yr. Pinterest you probably haven't heard of them polaroid selfies scenester 90's ramps. Gastropub tacos venmo.\nYr beard 8-bit vinegar carry intelligentsia sustainable loko. Hashtag freegan yuccie before they sold out. Craft beer art party taxidermy trust fund. Gastropub pabst blue bottle. Mixtape semiotics aesthetic.\nPlaid bitters banjo yuccie dreamcatcher meditation cred. Helvetica ugh heirloom +1 tilde wes anderson pinterest hashtag. Selvage hashtag narwhal. Yuccie ugh irony. Seitan stumptown vinegar.",
    "content_html": null,
    "replies": [
      {
        "id": 69,
        "author": {
          "id": 40,
          "login": "chchewba",
          "url": "https://api.intra.42.fr/v2/users/chchewba"
        },
        "content": "Actually swag kickstarter. Brunch synth venmo shoreditch distillery. Blue bottle food truck lomo taxidermy.\nCronut hoodie occupy chia health. Small batch poutine fingerstache bitters fixie skateboard. Messenger bag kickstarter meditation.\nCold-pressed pickled narwhal kogi cray freegan wayfarers. Williamsburg pug before they sold out blue bottle heirloom. Lo-fi celiac migas whatever brunch. Slow-carb kitsch bespoke before they sold out cliche church-key vinegar.",
        "content_html": null,
        "replies": [],
        "created_at": "2017-03-06T14:59:42.295Z",
        "updated_at": "2017-03-06T14:59:42.295Z",
        "parent_id": 66,
        "is_root": false,
        "messageable_id": 7,
        "messageable_type": "Topic",
        "votes_count": {
          "upvote": 0,
          "downvote": 0,
          "trollvote": 0,
          "problem": 0
        },
        "user_votes": {
          "upvote": false,
          "downvote": false,
          "trollvote": false,
          "problem": false
        },
        "readings": 0
      }
    ],
    "created_at": "2017-03-06T14:59:42.122Z",
    "updated_at": "2017-03-06T14:59:44.604Z",
    "parent_id": null,
    "is_root": false,
    "messageable_id": 7,
    "messageable_type": "Topic",
    "votes_count": {
      "upvote": 0,
      "downvote": 1,
      "trollvote": 0,
      "problem": 0
    },
    "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/14"

{
  "id": 14,
  "kind": "downvote",
  "created_at": "2017-03-06T14:59:44.599Z",
  "user": null,
  "message": {
    "id": 66,
    "author": {
      "login": "pdameron",
      "id": 39,
      "url": "https://profile.intra.42.fr/users/pdameron"
    },
    "content": "Keytar sriracha etsy yr. Pinterest you probably haven't heard of them polaroid selfies scenester 90's ramps. Gastropub tacos venmo.\nYr beard 8-bit vinegar carry intelligentsia sustainable loko. Hashtag freegan yuccie before they sold out. Craft beer art party taxidermy trust fund. Gastropub pabst blue bottle. Mixtape semiotics aesthetic.\nPlaid bitters banjo yuccie dreamcatcher meditation cred. Helvetica ugh heirloom +1 tilde wes anderson pinterest hashtag. Selvage hashtag narwhal. Yuccie ugh irony. Seitan stumptown vinegar.",
    "content_html": null,
    "replies": [
      {
        "id": 69,
        "author": {
          "id": 40,
          "login": "chchewba",
          "url": "https://api.intra.42.fr/v2/users/chchewba"
        },
        "content": "Actually swag kickstarter. Brunch synth venmo shoreditch distillery. Blue bottle food truck lomo taxidermy.\nCronut hoodie occupy chia health. Small batch poutine fingerstache bitters fixie skateboard. Messenger bag kickstarter meditation.\nCold-pressed pickled narwhal kogi cray freegan wayfarers. Williamsburg pug before they sold out blue bottle heirloom. Lo-fi celiac migas whatever brunch. Slow-carb kitsch bespoke before they sold out cliche church-key vinegar.",
        "content_html": null,
        "replies": [],
        "created_at": "2017-03-06T14:59:42.295Z",
        "updated_at": "2017-03-06T14:59:42.295Z",
        "parent_id": 66,
        "is_root": false,
        "messageable_id": 7,
        "messageable_type": "Topic",
        "votes_count": {
          "upvote": 0,
          "downvote": 0,
          "trollvote": 0,
          "problem": 0
        },
        "user_votes": {
          "upvote": false,
          "downvote": false,
          "trollvote": false,
          "problem": false
        },
        "readings": 0
      }
    ],
    "created_at": "2017-03-06T14:59:42.122Z",
    "updated_at": "2017-03-06T14:59:44.604Z",
    "parent_id": null,
    "is_root": false,
    "messageable_id": 7,
    "messageable_type": "Topic",
    "votes_count": {
      "upvote": 0,
      "downvote": 1,
      "trollvote": 0,
      "problem": 0
    },
    "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/14")
response.status
# => 200
response.parsed
# => {"id"=>14, "kind"=>"downvote", "created_at"=>"2017-03-06T14:59:44.599Z", "user"=>nil, "message"=>{"id"=>66, "author"=>{"login"=>"pdameron", "id"=>39, "url"=>"https://profile.intra.42.fr/users/pdameron"}, "content"=>"Keytar sriracha etsy yr. Pinterest you probably haven't heard of them polaroid selfies scenester 90's ramps. Gastropub tacos venmo.\nYr beard 8-bit vinegar carry intelligentsia sustainable loko. Hashtag freegan yuccie before they sold out. Craft beer art party taxidermy trust fund. Gastropub pabst blue bottle. Mixtape semiotics aesthetic.\nPlaid bitters banjo yuccie dreamcatcher meditation cred. Helvetica ugh heirloom +1 tilde wes anderson pinterest hashtag. Selvage hashtag narwhal. Yuccie ugh irony. Seitan stumptown vinegar.", "content_html"=>nil, "replies"=>[{"id"=>69, "author"=>{"id"=>40, "login"=>"chchewba", "url"=>"https://api.intra.42.fr/v2/users/chchewba"}, "content"=>"Actually swag kickstarter. Brunch synth venmo shoreditch distillery. Blue bottle food truck lomo taxidermy.\nCronut hoodie occupy chia health. Small batch poutine fingerstache bitters fixie skateboard. Messenger bag kickstarter meditation.\nCold-pressed pickled narwhal kogi cray freegan wayfarers. Williamsburg pug before they sold out blue bottle heirloom. Lo-fi celiac migas whatever brunch. Slow-carb kitsch bespoke before they sold out cliche church-key vinegar.", "content_html"=>nil, "replies"=>[], "created_at"=>"2017-03-06T14:59:42.295Z", "updated_at"=>"2017-03-06T14:59:42.295Z", "parent_id"=>66, "is_root"=>false, "messageable_id"=>7, "messageable_type"=>"Topic", "votes_count"=>{"upvote"=>0, "downvote"=>0, "trollvote"=>0, "problem"=>0}, "user_votes"=>{"upvote"=>false, "downvote"=>false, "trollvote"=>false, "problem"=>false}, "readings"=>0}], "created_at"=>"2017-03-06T14:59:42.122Z", "updated_at"=>"2017-03-06T14:59:44.604Z", "parent_id"=>nil, "is_root"=>false, "messageable_id"=>7, "messageable_type"=>"Topic", "votes_count"=>{"upvote"=>0, "downvote"=>1, "trollvote"=>0, "problem"=>0}, "user_votes"=>{"upvote"=>false, "downvote"=>false, "trollvote"=>false, "problem"=>false}, "readings"=>0}}