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": 1,
    "topic": {
      "id": 10,
      "name": "That is why you fail.",
      "author": {
        "id": 27,
        "login": "ki-aki-a",
        "url": "https://api.intra.42.fr/v2/users/ki-aki-a"
      },
      "kind": "normal",
      "created_at": "2017-11-21T17:09:55.480Z",
      "updated_at": "2017-11-21T17:09:56.349Z",
      "pinned_at": null,
      "locked_at": null,
      "pinner": null,
      "locker": null,
      "language": {
        "id": 2,
        "name": "English",
        "identifier": "en",
        "created_at": "2017-11-21T17:08:45.854Z",
        "updated_at": "2017-11-21T17:09:13.228Z"
      },
      "messages_url": "https://api.intra.42.fr/v2/topics/10/messages",
      "message": {
        "id": 91,
        "content": {
          "markdown": "Tofu yr venmo meh knausgaard pop-up tousled. Trust fund mustache fixie twee fap. Skateboard try-hard franzen deep v. +1 humblebrag 8-bit occupy gluten-free tousled cronut. Pickled vhs banjo plaid bushwick neutra cold-pressed.\nWilliamsburg kickstarter kinfolk microdosing flexitarian swag. Letterpress blog 8-bit iphone offal listicle pug biodiesel. Trust fund listicle diy tote bag artisan.\nVinegar keytar everyday cred viral vinyl brooklyn goth. Shabby chic readymade try-hard dreamcatcher locavore bitters tofu. Biodiesel mlkshk ethical waistcoat drinking.",
          "html": null
        }
      }
    },
    "cursus": {
      "id": 1,
      "created_at": "2017-11-21T17:08:46.956Z",
      "name": "Piscine C",
      "slug": "piscine-c"
    }
  },
  {
    "id": 9,
    "topic_id": 9,
    "cursus_id": 2,
    "topic": {
      "id": 9,
      "name": "Do. Or do not. There is no try.",
      "author": {
        "id": 79,
        "login": "paamidal",
        "url": "https://api.intra.42.fr/v2/users/paamidal"
      },
      "kind": "normal",
      "created_at": "2017-11-21T17:09:54.957Z",
      "updated_at": "2017-11-21T17:09:55.462Z",
      "pinned_at": null,
      "locked_at": null,
      "pinner": null,
      "locker": null,
      "language": {
        "id": 1,
        "name": "Français",
        "identifier": "fr",
        "created_at": "2017-11-21T17:08:45.850Z",
        "updated_at": "2017-11-21T17:08:45.850Z"
      },
      "messages_url": "https://api.intra.42.fr/v2/topics/9/messages",
      "message": {
        "id": 81,
        "content": {
          "markdown": "Cliche cray chambray taxidermy. Pinterest beard chicharrones meggings tofu hammock. Readymade shabby chic aesthetic crucifix waistcoat migas. Chia xoxo thundercats. Everyday vegan paleo cliche retro.\nWhatever pbr&b carry fixie beard disrupt brooklyn pour-over. Locavore gastropub forage asymmetrical. Tote bag wolf marfa butcher yolo loko pork belly.\nLo-fi bespoke skateboard bushwick vinegar chambray cronut. Butcher tousled marfa skateboard. Slow-carb cronut kinfolk mustache portland 8-bit.",
          "html": null
        }
      }
    },
    "cursus": {
      "id": 2,
      "created_at": "2017-11-21T17:08:47.033Z",
      "name": "42",
      "slug": "42"
    }
  },
  {
    "id": 8,
    "topic_id": 8,
    "cursus_id": 2,
    "topic": {
      "id": 8,
      "name": "I find your lack of faith disturbing.",
      "author": {
        "id": 43,
        "login": "bfett",
        "url": "https://api.intra.42.fr/v2/users/bfett"
      },
      "kind": "normal",
      "created_at": "2017-11-21T17:09:54.391Z",
      "updated_at": "2017-11-21T17:09:56.606Z",
      "pinned_at": null,
      "locked_at": null,
      "pinner": null,
      "locker": null,
      "language": {
        "id": 3,
        "name": "Romanian",
        "identifier": "ro",
        "created_at": "2017-11-21T17:08:45.857Z",
        "updated_at": "2017-11-21T17:08:45.857Z"
      },
      "messages_url": "https://api.intra.42.fr/v2/topics/8/messages",
      "message": {
        "id": 71,
        "content": {
          "markdown": "Brooklyn meditation vice chia aesthetic leggings letterpress. Godard whatever lomo brunch letterpress. Fingerstache skateboard before they sold out godard chambray williamsburg. Five dollar toast cleanse chartreuse chicharrones. Cray authentic kogi pickled whatever.\nSelvage semiotics fap freegan beard quinoa schlitz church-key. Art party biodiesel meditation kombucha direct trade trust fund chambray ramps. Hoodie art party viral.\nBlue bottle 3 wolf moon fingerstache franzen forage helvetica art party. Readymade farm-to-table twee pbr&b hammock banh mi blue bottle seitan. Thundercats fingerstache vhs. Bushwick williamsburg actually pabst pickled scenester.",
          "html": null
        }
      }
    },
    "cursus": {
      "id": 2,
      "created_at": "2017-11-21T17:08:47.033Z",
      "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": 1,
    "topic": {
      "id": 10,
      "name": "That is why you fail.",
      "author": {
        "id": 27,
        "login": "ki-aki-a",
        "url": "https://api.intra.42.fr/v2/users/ki-aki-a"
      },
      "kind": "normal",
      "created_at": "2017-11-21T17:09:55.480Z",
      "updated_at": "2017-11-21T17:09:56.349Z",
      "pinned_at": null,
      "locked_at": null,
      "pinner": null,
      "locker": null,
      "language": {
        "id": 2,
        "name": "English",
        "identifier": "en",
        "created_at": "2017-11-21T17:08:45.854Z",
        "updated_at": "2017-11-21T17:09:13.228Z"
      },
      "messages_url": "https://api.intra.42.fr/v2/topics/10/messages",
      "message": {
        "id": 91,
        "content": {
          "markdown": "Tofu yr venmo meh knausgaard pop-up tousled. Trust fund mustache fixie twee fap. Skateboard try-hard franzen deep v. +1 humblebrag 8-bit occupy gluten-free tousled cronut. Pickled vhs banjo plaid bushwick neutra cold-pressed.\nWilliamsburg kickstarter kinfolk microdosing flexitarian swag. Letterpress blog 8-bit iphone offal listicle pug biodiesel. Trust fund listicle diy tote bag artisan.\nVinegar keytar everyday cred viral vinyl brooklyn goth. Shabby chic readymade try-hard dreamcatcher locavore bitters tofu. Biodiesel mlkshk ethical waistcoat drinking.",
          "html": null
        }
      }
    },
    "cursus": {
      "id": 1,
      "created_at": "2017-11-21T17:08:46.956Z",
      "name": "Piscine C",
      "slug": "piscine-c"
    }
  },
  {
    "id": 9,
    "topic_id": 9,
    "cursus_id": 2,
    "topic": {
      "id": 9,
      "name": "Do. Or do not. There is no try.",
      "author": {
        "id": 79,
        "login": "paamidal",
        "url": "https://api.intra.42.fr/v2/users/paamidal"
      },
      "kind": "normal",
      "created_at": "2017-11-21T17:09:54.957Z",
      "updated_at": "2017-11-21T17:09:55.462Z",
      "pinned_at": null,
      "locked_at": null,
      "pinner": null,
      "locker": null,
      "language": {
        "id": 1,
        "name": "Français",
        "identifier": "fr",
        "created_at": "2017-11-21T17:08:45.850Z",
        "updated_at": "2017-11-21T17:08:45.850Z"
      },
      "messages_url": "https://api.intra.42.fr/v2/topics/9/messages",
      "message": {
        "id": 81,
        "content": {
          "markdown": "Cliche cray chambray taxidermy. Pinterest beard chicharrones meggings tofu hammock. Readymade shabby chic aesthetic crucifix waistcoat migas. Chia xoxo thundercats. Everyday vegan paleo cliche retro.\nWhatever pbr&b carry fixie beard disrupt brooklyn pour-over. Locavore gastropub forage asymmetrical. Tote bag wolf marfa butcher yolo loko pork belly.\nLo-fi bespoke skateboard bushwick vinegar chambray cronut. Butcher tousled marfa skateboard. Slow-carb cronut kinfolk mustache portland 8-bit.",
          "html": null
        }
      }
    },
    "cursus": {
      "id": 2,
      "created_at": "2017-11-21T17:08:47.033Z",
      "name": "42",
      "slug": "42"
    }
  },
  {
    "id": 8,
    "topic_id": 8,
    "cursus_id": 2,
    "topic": {
      "id": 8,
      "name": "I find your lack of faith disturbing.",
      "author": {
        "id": 43,
        "login": "bfett",
        "url": "https://api.intra.42.fr/v2/users/bfett"
      },
      "kind": "normal",
      "created_at": "2017-11-21T17:09:54.391Z",
      "updated_at": "2017-11-21T17:09:56.606Z",
      "pinned_at": null,
      "locked_at": null,
      "pinner": null,
      "locker": null,
      "language": {
        "id": 3,
        "name": "Romanian",
        "identifier": "ro",
        "created_at": "2017-11-21T17:08:45.857Z",
        "updated_at": "2017-11-21T17:08:45.857Z"
      },
      "messages_url": "https://api.intra.42.fr/v2/topics/8/messages",
      "message": {
        "id": 71,
        "content": {
          "markdown": "Brooklyn meditation vice chia aesthetic leggings letterpress. Godard whatever lomo brunch letterpress. Fingerstache skateboard before they sold out godard chambray williamsburg. Five dollar toast cleanse chartreuse chicharrones. Cray authentic kogi pickled whatever.\nSelvage semiotics fap freegan beard quinoa schlitz church-key. Art party biodiesel meditation kombucha direct trade trust fund chambray ramps. Hoodie art party viral.\nBlue bottle 3 wolf moon fingerstache franzen forage helvetica art party. Readymade farm-to-table twee pbr&b hammock banh mi blue bottle seitan. Thundercats fingerstache vhs. Bushwick williamsburg actually pabst pickled scenester.",
          "html": null
        }
      }
    },
    "cursus": {
      "id": 2,
      "created_at": "2017-11-21T17:08:47.033Z",
      "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"=>1, "topic"=>{"id"=>10, "name"=>"That is why you fail.", "author"=>{"id"=>27, "login"=>"ki-aki-a", "url"=>"https://api.intra.42.fr/v2/users/ki-aki-a"}, "kind"=>"normal", "created_at"=>"2017-11-21T17:09:55.480Z", "updated_at"=>"2017-11-21T17:09:56.349Z", "pinned_at"=>nil, "locked_at"=>nil, "pinner"=>nil, "locker"=>nil, "language"=>{"id"=>2, "name"=>"English", "identifier"=>"en", "created_at"=>"2017-11-21T17:08:45.854Z", "updated_at"=>"2017-11-21T17:09:13.228Z"}, "messages_url"=>"https://api.intra.42.fr/v2/topics/10/messages", "message"=>{"id"=>91, "content"=>{"markdown"=>"Tofu yr venmo meh knausgaard pop-up tousled. Trust fund mustache fixie twee fap. Skateboard try-hard franzen deep v. +1 humblebrag 8-bit occupy gluten-free tousled cronut. Pickled vhs banjo plaid bushwick neutra cold-pressed.\nWilliamsburg kickstarter kinfolk microdosing flexitarian swag. Letterpress blog 8-bit iphone offal listicle pug biodiesel. Trust fund listicle diy tote bag artisan.\nVinegar keytar everyday cred viral vinyl brooklyn goth. Shabby chic readymade try-hard dreamcatcher locavore bitters tofu. Biodiesel mlkshk ethical waistcoat drinking.", "html"=>nil}}}, "cursus"=>{"id"=>1, "created_at"=>"2017-11-21T17:08:46.956Z", "name"=>"Piscine C", "slug"=>"piscine-c"}}, {"id"=>9, "topic_id"=>9, "cursus_id"=>2, "topic"=>{"id"=>9, "name"=>"Do. Or do not. There is no try.", "author"=>{"id"=>79, "login"=>"paamidal", "url"=>"https://api.intra.42.fr/v2/users/paamidal"}, "kind"=>"normal", "created_at"=>"2017-11-21T17:09:54.957Z", "updated_at"=>"2017-11-21T17:09:55.462Z", "pinned_at"=>nil, "locked_at"=>nil, "pinner"=>nil, "locker"=>nil, "language"=>{"id"=>1, "name"=>"Français", "identifier"=>"fr", "created_at"=>"2017-11-21T17:08:45.850Z", "updated_at"=>"2017-11-21T17:08:45.850Z"}, "messages_url"=>"https://api.intra.42.fr/v2/topics/9/messages", "message"=>{"id"=>81, "content"=>{"markdown"=>"Cliche cray chambray taxidermy. Pinterest beard chicharrones meggings tofu hammock. Readymade shabby chic aesthetic crucifix waistcoat migas. Chia xoxo thundercats. Everyday vegan paleo cliche retro.\nWhatever pbr&b carry fixie beard disrupt brooklyn pour-over. Locavore gastropub forage asymmetrical. Tote bag wolf marfa butcher yolo loko pork belly.\nLo-fi bespoke skateboard bushwick vinegar chambray cronut. Butcher tousled marfa skateboard. Slow-carb cronut kinfolk mustache portland 8-bit.", "html"=>nil}}}, "cursus"=>{"id"=>2, "created_at"=>"2017-11-21T17:08:47.033Z", "name"=>"42", "slug"=>"42"}}, {"id"=>8, "topic_id"=>8, "cursus_id"=>2, "topic"=>{"id"=>8, "name"=>"I find your lack of faith disturbing.", "author"=>{"id"=>43, "login"=>"bfett", "url"=>"https://api.intra.42.fr/v2/users/bfett"}, "kind"=>"normal", "created_at"=>"2017-11-21T17:09:54.391Z", "updated_at"=>"2017-11-21T17:09:56.606Z", "pinned_at"=>nil, "locked_at"=>nil, "pinner"=>nil, "locker"=>nil, "language"=>{"id"=>3, "name"=>"Romanian", "identifier"=>"ro", "created_at"=>"2017-11-21T17:08:45.857Z", "updated_at"=>"2017-11-21T17:08:45.857Z"}, "messages_url"=>"https://api.intra.42.fr/v2/topics/8/messages", "message"=>{"id"=>71, "content"=>{"markdown"=>"Brooklyn meditation vice chia aesthetic leggings letterpress. Godard whatever lomo brunch letterpress. Fingerstache skateboard before they sold out godard chambray williamsburg. Five dollar toast cleanse chartreuse chicharrones. Cray authentic kogi pickled whatever.\nSelvage semiotics fap freegan beard quinoa schlitz church-key. Art party biodiesel meditation kombucha direct trade trust fund chambray ramps. Hoodie art party viral.\nBlue bottle 3 wolf moon fingerstache franzen forage helvetica art party. Readymade farm-to-table twee pbr&b hammock banh mi blue bottle seitan. Thundercats fingerstache vhs. Bushwick williamsburg actually pabst pickled scenester.", "html"=>nil}}}, "cursus"=>{"id"=>2, "created_at"=>"2017-11-21T17:08:47.033Z", "name"=>"42", "slug"=>"42"}}]