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": "Never tell me the odds!",
    "author": {
      "id": 110,
      "login": "kki-adi2",
      "url": "https://api.intra.42.fr/v2/users/kki-adi2"
    },
    "kind": "normal",
    "created_at": "2017-11-22T13:42:13.251Z",
    "updated_at": "2017-11-22T13:42:20.680Z",
    "pinned_at": null,
    "locked_at": null,
    "pinner": null,
    "locker": null,
    "language": {
      "id": 2,
      "name": "English",
      "identifier": "en",
      "created_at": "2017-11-22T13:40:59.465Z",
      "updated_at": "2017-11-22T13:40:59.465Z"
    },
    "messages_url": "https://api.intra.42.fr/v2/topics/1/messages",
    "message": {
      "id": 1,
      "content": {
        "markdown": "Five dollar toast freegan kickstarter. Blue bottle swag pitchfork cornhole schlitz. Fashion axe pbr&b austin. Ethical echo deep v. Fashion axe franzen twee organic vegan marfa authentic tilde.\nWayfarers direct trade tofu bespoke tilde portland plaid messenger bag. Jean shorts locavore tousled fanny pack freegan. Normcore gluten-free franzen plaid irony.\nSynth irony retro single-origin coffee squid meggings. Street trust fund disrupt iphone keffiyeh 90's lo-fi heirloom. Beard disrupt pitchfork. Craft beer vegan butcher keffiyeh mumblecore gentrify pickled tacos.",
        "html": null
      }
    }
  },
  "cursus": {
    "id": 1,
    "created_at": "2017-11-22T13:41:00.750Z",
    "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": "Never tell me the odds!",
    "author": {
      "id": 110,
      "login": "kki-adi2",
      "url": "https://api.intra.42.fr/v2/users/kki-adi2"
    },
    "kind": "normal",
    "created_at": "2017-11-22T13:42:13.251Z",
    "updated_at": "2017-11-22T13:42:20.680Z",
    "pinned_at": null,
    "locked_at": null,
    "pinner": null,
    "locker": null,
    "language": {
      "id": 2,
      "name": "English",
      "identifier": "en",
      "created_at": "2017-11-22T13:40:59.465Z",
      "updated_at": "2017-11-22T13:40:59.465Z"
    },
    "messages_url": "https://api.intra.42.fr/v2/topics/1/messages",
    "message": {
      "id": 1,
      "content": {
        "markdown": "Five dollar toast freegan kickstarter. Blue bottle swag pitchfork cornhole schlitz. Fashion axe pbr&b austin. Ethical echo deep v. Fashion axe franzen twee organic vegan marfa authentic tilde.\nWayfarers direct trade tofu bespoke tilde portland plaid messenger bag. Jean shorts locavore tousled fanny pack freegan. Normcore gluten-free franzen plaid irony.\nSynth irony retro single-origin coffee squid meggings. Street trust fund disrupt iphone keffiyeh 90's lo-fi heirloom. Beard disrupt pitchfork. Craft beer vegan butcher keffiyeh mumblecore gentrify pickled tacos.",
        "html": null
      }
    }
  },
  "cursus": {
    "id": 1,
    "created_at": "2017-11-22T13:41:00.750Z",
    "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"=>"Never tell me the odds!", "author"=>{"id"=>110, "login"=>"kki-adi2", "url"=>"https://api.intra.42.fr/v2/users/kki-adi2"}, "kind"=>"normal", "created_at"=>"2017-11-22T13:42:13.251Z", "updated_at"=>"2017-11-22T13:42:20.680Z", "pinned_at"=>nil, "locked_at"=>nil, "pinner"=>nil, "locker"=>nil, "language"=>{"id"=>2, "name"=>"English", "identifier"=>"en", "created_at"=>"2017-11-22T13:40:59.465Z", "updated_at"=>"2017-11-22T13:40:59.465Z"}, "messages_url"=>"https://api.intra.42.fr/v2/topics/1/messages", "message"=>{"id"=>1, "content"=>{"markdown"=>"Five dollar toast freegan kickstarter. Blue bottle swag pitchfork cornhole schlitz. Fashion axe pbr&b austin. Ethical echo deep v. Fashion axe franzen twee organic vegan marfa authentic tilde.\nWayfarers direct trade tofu bespoke tilde portland plaid messenger bag. Jean shorts locavore tousled fanny pack freegan. Normcore gluten-free franzen plaid irony.\nSynth irony retro single-origin coffee squid meggings. Street trust fund disrupt iphone keffiyeh 90's lo-fi heirloom. Beard disrupt pitchfork. Craft beer vegan butcher keffiyeh mumblecore gentrify pickled tacos.", "html"=>nil}}}, "cursus"=>{"id"=>1, "created_at"=>"2017-11-22T13:41:00.750Z", "name"=>"Piscine C", "slug"=>"piscine-c"}}