settings Params

Param name Description
id required . Must be String

The requested id

comments powered by <span class='logo-disqus'>Disqus</span>
GET /v2/cursus_topics/1
200
{
  "id": 1,
  "topic_id": 1,
  "cursus_id": 1,
  "topic": {
    "id": 1,
    "name": "Shut him up or shut him down.",
    "author": {
      "id": 20,
      "login": "pamidala",
      "url": "https://api.intra.42.fr/v2/users/pamidala"
    },
    "kind": "normal",
    "created_at": "2017-03-06T14:59:37.752Z",
    "updated_at": "2017-03-06T14:59:44.626Z",
    "pinned_at": null,
    "locked_at": null,
    "pinner": null,
    "locker": null,
    "language": {
      "id": 1,
      "name": "Français",
      "identifier": "fr",
      "created_at": "2017-03-06T14:58:43.167Z",
      "updated_at": "2017-03-06T14:59:04.330Z"
    },
    "messages_url": "https://api.intra.42.fr/v2/topics/1/messages",
    "message": {
      "id": 1,
      "content": {
        "markdown": "Cliche seitan hella post-ironic chicharrones everyday chia health. Wolf intelligentsia vice polaroid carry. Sustainable chillwave asymmetrical church-key pour-over letterpress.\nEthical tacos leggings vegan sriracha. Helvetica kogi master chillwave forage kinfolk williamsburg. Bushwick kinfolk bitters echo crucifix salvia. Kickstarter semiotics park cold-pressed. Cornhole stumptown pitchfork hammock tousled chambray meggings twee.\nVegan typewriter marfa helvetica portland. Squid ethical neutra cold-pressed tumblr. Everyday vice umami. Shabby chic vice chartreuse keffiyeh umami migas pop-up. Sriracha lomo cred 90's typewriter selvage fanny pack.",
        "html": null
      }
    }
  },
  "cursus": {
    "id": 1,
    "created_at": "2017-03-06T14:58:43.965Z",
    "name": "Piscine C",
    "slug": "piscine-c"
  }
}
curl  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" "https://api.intra.42.fr/v2/cursus_topics/1"

{
  "id": 1,
  "topic_id": 1,
  "cursus_id": 1,
  "topic": {
    "id": 1,
    "name": "Shut him up or shut him down.",
    "author": {
      "id": 20,
      "login": "pamidala",
      "url": "https://api.intra.42.fr/v2/users/pamidala"
    },
    "kind": "normal",
    "created_at": "2017-03-06T14:59:37.752Z",
    "updated_at": "2017-03-06T14:59:44.626Z",
    "pinned_at": null,
    "locked_at": null,
    "pinner": null,
    "locker": null,
    "language": {
      "id": 1,
      "name": "Français",
      "identifier": "fr",
      "created_at": "2017-03-06T14:58:43.167Z",
      "updated_at": "2017-03-06T14:59:04.330Z"
    },
    "messages_url": "https://api.intra.42.fr/v2/topics/1/messages",
    "message": {
      "id": 1,
      "content": {
        "markdown": "Cliche seitan hella post-ironic chicharrones everyday chia health. Wolf intelligentsia vice polaroid carry. Sustainable chillwave asymmetrical church-key pour-over letterpress.\nEthical tacos leggings vegan sriracha. Helvetica kogi master chillwave forage kinfolk williamsburg. Bushwick kinfolk bitters echo crucifix salvia. Kickstarter semiotics park cold-pressed. Cornhole stumptown pitchfork hammock tousled chambray meggings twee.\nVegan typewriter marfa helvetica portland. Squid ethical neutra cold-pressed tumblr. Everyday vice umami. Shabby chic vice chartreuse keffiyeh umami migas pop-up. Sriracha lomo cred 90's typewriter selvage fanny pack.",
        "html": null
      }
    }
  },
  "cursus": {
    "id": 1,
    "created_at": "2017-03-06T14:58:43.965Z",
    "name": "Piscine C",
    "slug": "piscine-c"
  }
}
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/cursus_topics/1")
response.status
# => 200
response.parsed
# => {"id"=>1, "topic_id"=>1, "cursus_id"=>1, "topic"=>{"id"=>1, "name"=>"Shut him up or shut him down.", "author"=>{"id"=>20, "login"=>"pamidala", "url"=>"https://api.intra.42.fr/v2/users/pamidala"}, "kind"=>"normal", "created_at"=>"2017-03-06T14:59:37.752Z", "updated_at"=>"2017-03-06T14:59:44.626Z", "pinned_at"=>nil, "locked_at"=>nil, "pinner"=>nil, "locker"=>nil, "language"=>{"id"=>1, "name"=>"Français", "identifier"=>"fr", "created_at"=>"2017-03-06T14:58:43.167Z", "updated_at"=>"2017-03-06T14:59:04.330Z"}, "messages_url"=>"https://api.intra.42.fr/v2/topics/1/messages", "message"=>{"id"=>1, "content"=>{"markdown"=>"Cliche seitan hella post-ironic chicharrones everyday chia health. Wolf intelligentsia vice polaroid carry. Sustainable chillwave asymmetrical church-key pour-over letterpress.\nEthical tacos leggings vegan sriracha. Helvetica kogi master chillwave forage kinfolk williamsburg. Bushwick kinfolk bitters echo crucifix salvia. Kickstarter semiotics park cold-pressed. Cornhole stumptown pitchfork hammock tousled chambray meggings twee.\nVegan typewriter marfa helvetica portland. Squid ethical neutra cold-pressed tumblr. Everyday vice umami. Shabby chic vice chartreuse keffiyeh umami migas pop-up. Sriracha lomo cred 90's typewriter selvage fanny pack.", "html"=>nil}}}, "cursus"=>{"id"=>1, "created_at"=>"2017-03-06T14:58:43.965Z", "name"=>"Piscine C", "slug"=>"piscine-c"}}