live_help Notes

chrome_reader_mode This resource is paginated by 30 items

settings Params

Param name Description
cursus_id optional . Must be String

The cursus id or slug

topic_id optional . Must be String

The topic id

sort optional . Must be one of: id, cursus_id, topic_id, created_at, updated_at.

The sort field. Sorted by created_at desc by default.

Example:

To sort on cursus topics on the fields created_at on a descending order and updated_at on a ascending order:

...&sort=-created_at,updated_at

filter optional . Must be one of: id, cursus_id, topic_id, created_at, updated_at.

Filtering on one or more fields

Example:

To filter on cursus topics with the id field matching a_value or another_value:

...&filter[id]=a_value,another_value

Filterable fields:
  • id (standard field)
  • cursus_id (standard field)
  • topic_id (standard field)
  • created_at (standard field)
  • updated_at (standard field)
range optional . Must be one of: id, cursus_id, topic_id, created_at, updated_at.

Select on a particular range

Example:

To range on cursus topics with the updated_at field between min_value and max_value:

...&range[updated_at]=min_value,max_value

Rangeable fields:
  • id
  • cursus_id
  • topic_id
  • created_at
  • updated_at
page optional . Must be a Hash

The pagination params, as a hash

page[number] optional . Must be Fixnum

The current page

page[size] optional . Must be Fixnum

The number of items per page, defaults to 30, maximum 100

comments powered by <span class='logo-disqus'>Disqus</span>
GET /v2/cursus_topics
200
[
  {
    "id": 10,
    "topic_id": 10,
    "cursus_id": 2,
    "topic": {
      "id": 10,
      "name": "Adventure. Excitement. A Jedi craves not these things.",
      "author": {
        "id": 49,
        "login": "podamero",
        "url": "https://api.intra.42.fr/v2/users/podamero"
      },
      "kind": "normal",
      "created_at": "2017-03-06T14:59:43.686Z",
      "updated_at": "2017-03-06T14:59:44.569Z",
      "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/10/messages",
      "message": {
        "id": 91,
        "content": {
          "markdown": "You probably haven't heard of them ugh lo-fi selfies tofu diy hoodie yolo. Neutra vice brunch scenester sartorial authentic jean shorts. Plaid selvage goth aesthetic echo poutine irony yuccie.\nKnausgaard disrupt irony listicle messenger bag. Cliche raw denim freegan street wes anderson distillery hammock. Taxidermy salvia pork belly cronut. Taxidermy banh mi paleo. Church-key cliche seitan flexitarian tousled green juice wolf.\nMessenger bag neutra pabst schlitz godard irony. Squid roof fanny pack wes anderson. Swag vinyl organic waistcoat. Crucifix banh mi put a bird on it plaid. Lumbersexual tote bag blue bottle food truck selfies ramps.",
          "html": null
        }
      }
    },
    "cursus": {
      "id": 2,
      "created_at": "2017-03-06T14:58:44.047Z",
      "name": "42",
      "slug": "42"
    }
  },
  {
    "id": 9,
    "topic_id": 9,
    "cursus_id": 2,
    "topic": {
      "id": 9,
      "name": "That is why you fail.",
      "author": {
        "id": 49,
        "login": "podamero",
        "url": "https://api.intra.42.fr/v2/users/podamero"
      },
      "kind": "normal",
      "created_at": "2017-03-06T14:59:43.081Z",
      "updated_at": "2017-03-06T14:59:44.327Z",
      "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/9/messages",
      "message": {
        "id": 81,
        "content": {
          "markdown": "Actually whatever authentic. Fixie bespoke lumbersexual chicharrones kickstarter thundercats mumblecore cray. Offal salvia dreamcatcher. Vegan beard lomo goth. Chicharrones franzen helvetica tumblr seitan.\n+1 forage drinking you probably haven't heard of them. Before they sold out umami artisan heirloom church-key hashtag. Irony pour-over meggings small batch godard. Mixtape shabby chic disrupt lo-fi narwhal poutine.\nTruffaut locavore lumbersexual umami messenger bag. Kinfolk single-origin coffee deep v hella direct trade lo-fi pitchfork vhs. Bushwick xoxo scenester kickstarter.",
          "html": null
        }
      }
    },
    "cursus": {
      "id": 2,
      "created_at": "2017-03-06T14:58:44.047Z",
      "name": "42",
      "slug": "42"
    }
  },
  {
    "id": 8,
    "topic_id": 8,
    "cursus_id": 2,
    "topic": {
      "id": 8,
      "name": "Shut him up or shut him down.",
      "author": {
        "id": 14,
        "login": "kki-adi-",
        "url": "https://api.intra.42.fr/v2/users/kki-adi-"
      },
      "kind": "normal",
      "created_at": "2017-03-06T14:59:42.437Z",
      "updated_at": "2017-03-06T14:59:44.444Z",
      "pinned_at": null,
      "locked_at": null,
      "pinner": null,
      "locker": null,
      "language": {
        "id": 2,
        "name": "English",
        "identifier": "en",
        "created_at": "2017-03-06T14:58:43.172Z",
        "updated_at": "2017-03-06T14:58:43.172Z"
      },
      "messages_url": "https://api.intra.42.fr/v2/topics/8/messages",
      "message": {
        "id": 71,
        "content": {
          "markdown": "Craft beer hoodie truffaut. Listicle helvetica meh gluten-free farm-to-table meggings venmo. Lumbersexual aesthetic vice chambray migas.\nGluten-free kogi church-key sartorial. Migas drinking kitsch pop-up godard neutra. Umami mlkshk scenester flexitarian gluten-free hammock artisan. Letterpress banh mi ugh chartreuse.\nDisrupt blog twee mixtape swag. Banh mi fashion axe bushwick mixtape celiac kinfolk. Trust fund truffaut fap. Keffiyeh stumptown next level.",
          "html": null
        }
      }
    },
    "cursus": {
      "id": 2,
      "created_at": "2017-03-06T14:58:44.047Z",
      "name": "42",
      "slug": "42"
    }
  }
]
curl  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" "https://api.intra.42.fr/v2/cursus_topics"

[
  {
    "id": 10,
    "topic_id": 10,
    "cursus_id": 2,
    "topic": {
      "id": 10,
      "name": "Adventure. Excitement. A Jedi craves not these things.",
      "author": {
        "id": 49,
        "login": "podamero",
        "url": "https://api.intra.42.fr/v2/users/podamero"
      },
      "kind": "normal",
      "created_at": "2017-03-06T14:59:43.686Z",
      "updated_at": "2017-03-06T14:59:44.569Z",
      "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/10/messages",
      "message": {
        "id": 91,
        "content": {
          "markdown": "You probably haven't heard of them ugh lo-fi selfies tofu diy hoodie yolo. Neutra vice brunch scenester sartorial authentic jean shorts. Plaid selvage goth aesthetic echo poutine irony yuccie.\nKnausgaard disrupt irony listicle messenger bag. Cliche raw denim freegan street wes anderson distillery hammock. Taxidermy salvia pork belly cronut. Taxidermy banh mi paleo. Church-key cliche seitan flexitarian tousled green juice wolf.\nMessenger bag neutra pabst schlitz godard irony. Squid roof fanny pack wes anderson. Swag vinyl organic waistcoat. Crucifix banh mi put a bird on it plaid. Lumbersexual tote bag blue bottle food truck selfies ramps.",
          "html": null
        }
      }
    },
    "cursus": {
      "id": 2,
      "created_at": "2017-03-06T14:58:44.047Z",
      "name": "42",
      "slug": "42"
    }
  },
  {
    "id": 9,
    "topic_id": 9,
    "cursus_id": 2,
    "topic": {
      "id": 9,
      "name": "That is why you fail.",
      "author": {
        "id": 49,
        "login": "podamero",
        "url": "https://api.intra.42.fr/v2/users/podamero"
      },
      "kind": "normal",
      "created_at": "2017-03-06T14:59:43.081Z",
      "updated_at": "2017-03-06T14:59:44.327Z",
      "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/9/messages",
      "message": {
        "id": 81,
        "content": {
          "markdown": "Actually whatever authentic. Fixie bespoke lumbersexual chicharrones kickstarter thundercats mumblecore cray. Offal salvia dreamcatcher. Vegan beard lomo goth. Chicharrones franzen helvetica tumblr seitan.\n+1 forage drinking you probably haven't heard of them. Before they sold out umami artisan heirloom church-key hashtag. Irony pour-over meggings small batch godard. Mixtape shabby chic disrupt lo-fi narwhal poutine.\nTruffaut locavore lumbersexual umami messenger bag. Kinfolk single-origin coffee deep v hella direct trade lo-fi pitchfork vhs. Bushwick xoxo scenester kickstarter.",
          "html": null
        }
      }
    },
    "cursus": {
      "id": 2,
      "created_at": "2017-03-06T14:58:44.047Z",
      "name": "42",
      "slug": "42"
    }
  },
  {
    "id": 8,
    "topic_id": 8,
    "cursus_id": 2,
    "topic": {
      "id": 8,
      "name": "Shut him up or shut him down.",
      "author": {
        "id": 14,
        "login": "kki-adi-",
        "url": "https://api.intra.42.fr/v2/users/kki-adi-"
      },
      "kind": "normal",
      "created_at": "2017-03-06T14:59:42.437Z",
      "updated_at": "2017-03-06T14:59:44.444Z",
      "pinned_at": null,
      "locked_at": null,
      "pinner": null,
      "locker": null,
      "language": {
        "id": 2,
        "name": "English",
        "identifier": "en",
        "created_at": "2017-03-06T14:58:43.172Z",
        "updated_at": "2017-03-06T14:58:43.172Z"
      },
      "messages_url": "https://api.intra.42.fr/v2/topics/8/messages",
      "message": {
        "id": 71,
        "content": {
          "markdown": "Craft beer hoodie truffaut. Listicle helvetica meh gluten-free farm-to-table meggings venmo. Lumbersexual aesthetic vice chambray migas.\nGluten-free kogi church-key sartorial. Migas drinking kitsch pop-up godard neutra. Umami mlkshk scenester flexitarian gluten-free hammock artisan. Letterpress banh mi ugh chartreuse.\nDisrupt blog twee mixtape swag. Banh mi fashion axe bushwick mixtape celiac kinfolk. Trust fund truffaut fap. Keffiyeh stumptown next level.",
          "html": null
        }
      }
    },
    "cursus": {
      "id": 2,
      "created_at": "2017-03-06T14:58:44.047Z",
      "name": "42",
      "slug": "42"
    }
  }
]
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")
response.status
# => 200
response.parsed
# => [{"id"=>10, "topic_id"=>10, "cursus_id"=>2, "topic"=>{"id"=>10, "name"=>"Adventure. Excitement. A Jedi craves not these things.", "author"=>{"id"=>49, "login"=>"podamero", "url"=>"https://api.intra.42.fr/v2/users/podamero"}, "kind"=>"normal", "created_at"=>"2017-03-06T14:59:43.686Z", "updated_at"=>"2017-03-06T14:59:44.569Z", "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/10/messages", "message"=>{"id"=>91, "content"=>{"markdown"=>"You probably haven't heard of them ugh lo-fi selfies tofu diy hoodie yolo. Neutra vice brunch scenester sartorial authentic jean shorts. Plaid selvage goth aesthetic echo poutine irony yuccie.\nKnausgaard disrupt irony listicle messenger bag. Cliche raw denim freegan street wes anderson distillery hammock. Taxidermy salvia pork belly cronut. Taxidermy banh mi paleo. Church-key cliche seitan flexitarian tousled green juice wolf.\nMessenger bag neutra pabst schlitz godard irony. Squid roof fanny pack wes anderson. Swag vinyl organic waistcoat. Crucifix banh mi put a bird on it plaid. Lumbersexual tote bag blue bottle food truck selfies ramps.", "html"=>nil}}}, "cursus"=>{"id"=>2, "created_at"=>"2017-03-06T14:58:44.047Z", "name"=>"42", "slug"=>"42"}}, {"id"=>9, "topic_id"=>9, "cursus_id"=>2, "topic"=>{"id"=>9, "name"=>"That is why you fail.", "author"=>{"id"=>49, "login"=>"podamero", "url"=>"https://api.intra.42.fr/v2/users/podamero"}, "kind"=>"normal", "created_at"=>"2017-03-06T14:59:43.081Z", "updated_at"=>"2017-03-06T14:59:44.327Z", "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/9/messages", "message"=>{"id"=>81, "content"=>{"markdown"=>"Actually whatever authentic. Fixie bespoke lumbersexual chicharrones kickstarter thundercats mumblecore cray. Offal salvia dreamcatcher. Vegan beard lomo goth. Chicharrones franzen helvetica tumblr seitan.\n+1 forage drinking you probably haven't heard of them. Before they sold out umami artisan heirloom church-key hashtag. Irony pour-over meggings small batch godard. Mixtape shabby chic disrupt lo-fi narwhal poutine.\nTruffaut locavore lumbersexual umami messenger bag. Kinfolk single-origin coffee deep v hella direct trade lo-fi pitchfork vhs. Bushwick xoxo scenester kickstarter.", "html"=>nil}}}, "cursus"=>{"id"=>2, "created_at"=>"2017-03-06T14:58:44.047Z", "name"=>"42", "slug"=>"42"}}, {"id"=>8, "topic_id"=>8, "cursus_id"=>2, "topic"=>{"id"=>8, "name"=>"Shut him up or shut him down.", "author"=>{"id"=>14, "login"=>"kki-adi-", "url"=>"https://api.intra.42.fr/v2/users/kki-adi-"}, "kind"=>"normal", "created_at"=>"2017-03-06T14:59:42.437Z", "updated_at"=>"2017-03-06T14:59:44.444Z", "pinned_at"=>nil, "locked_at"=>nil, "pinner"=>nil, "locker"=>nil, "language"=>{"id"=>2, "name"=>"English", "identifier"=>"en", "created_at"=>"2017-03-06T14:58:43.172Z", "updated_at"=>"2017-03-06T14:58:43.172Z"}, "messages_url"=>"https://api.intra.42.fr/v2/topics/8/messages", "message"=>{"id"=>71, "content"=>{"markdown"=>"Craft beer hoodie truffaut. Listicle helvetica meh gluten-free farm-to-table meggings venmo. Lumbersexual aesthetic vice chambray migas.\nGluten-free kogi church-key sartorial. Migas drinking kitsch pop-up godard neutra. Umami mlkshk scenester flexitarian gluten-free hammock artisan. Letterpress banh mi ugh chartreuse.\nDisrupt blog twee mixtape swag. Banh mi fashion axe bushwick mixtape celiac kinfolk. Trust fund truffaut fap. Keffiyeh stumptown next level.", "html"=>nil}}}, "cursus"=>{"id"=>2, "created_at"=>"2017-03-06T14:58:44.047Z", "name"=>"42", "slug"=>"42"}}]