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

GET /v2/cursus_topics
200
[
  {
    "id": 10,
    "topic_id": 10,
    "cursus_id": 1,
    "topic": {
      "id": 10,
      "name": "R2-D2, you know better than to trust a strange computer!",
      "author": {
        "id": 110,
        "login": "kki-adi2",
        "url": "https://api.intra.42.fr/v2/users/kki-adi2"
      },
      "kind": "normal",
      "created_at": "2017-11-22T13:42:19.352Z",
      "updated_at": "2017-11-22T13:42:20.396Z",
      "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/10/messages",
      "message": {
        "id": 91,
        "content": {
          "markdown": "Paleo viral next level mixtape cold-pressed taxidermy. Blue bottle shoreditch wes anderson master gastropub shabby chic put a bird on it tofu. Letterpress echo butcher vinegar selfies kale chips.\nPop-up scenester thundercats selfies jean shorts raw denim try-hard. Cold-pressed venmo viral wayfarers iphone. Tousled semiotics blue bottle banh mi locavore schlitz trust fund godard. Helvetica mustache dreamcatcher wes anderson truffaut kinfolk tote bag williamsburg. Disrupt brooklyn beard authentic pabst try-hard.\nRetro butcher post-ironic kale chips artisan mixtape chillwave. Vegan meggings master helvetica plaid gentrify bespoke. Single-origin coffee bespoke chicharrones. Shoreditch locavore disrupt everyday pour-over tumblr bespoke.",
          "html": null
        }
      }
    },
    "cursus": {
      "id": 1,
      "created_at": "2017-11-22T13:41:00.750Z",
      "name": "Piscine C",
      "slug": "piscine-c"
    }
  },
  {
    "id": 9,
    "topic_id": 9,
    "cursus_id": 1,
    "topic": {
      "id": 9,
      "name": "Who's the more foolish; the fool, or the fool who follows him?",
      "author": {
        "id": 16,
        "login": "cdooku",
        "url": "https://api.intra.42.fr/v2/users/cdooku"
      },
      "kind": "normal",
      "created_at": "2017-11-22T13:42:18.720Z",
      "updated_at": "2017-11-22T13:42:20.566Z",
      "pinned_at": null,
      "locked_at": null,
      "pinner": null,
      "locker": null,
      "language": {
        "id": 3,
        "name": "Romanian",
        "identifier": "ro",
        "created_at": "2017-11-22T13:40:59.468Z",
        "updated_at": "2017-11-22T13:41:26.139Z"
      },
      "messages_url": "https://api.intra.42.fr/v2/topics/9/messages",
      "message": {
        "id": 81,
        "content": {
          "markdown": "Ennui try-hard yuccie chia bicycle rights semiotics. Schlitz kickstarter shabby chic hoodie chicharrones tacos vinyl. Kale chips wolf twee kogi master banjo synth.\n+1 truffaut everyday. Viral church-key freegan marfa pabst tofu photo booth. Polaroid diy trust fund roof fashion axe pinterest. Microdosing pitchfork carry. Aesthetic semiotics sriracha knausgaard microdosing heirloom skateboard cred.\nHelvetica you probably haven't heard of them post-ironic. Seitan scenester hoodie ramps kombucha tumblr. Helvetica tilde meggings intelligentsia meh small batch.",
          "html": null
        }
      }
    },
    "cursus": {
      "id": 1,
      "created_at": "2017-11-22T13:41:00.750Z",
      "name": "Piscine C",
      "slug": "piscine-c"
    }
  },
  {
    "id": 8,
    "topic_id": 8,
    "cursus_id": 1,
    "topic": {
      "id": 8,
      "name": "Shut him up or shut him down.",
      "author": {
        "id": 43,
        "login": "bfett",
        "url": "https://api.intra.42.fr/v2/users/bfett"
      },
      "kind": "normal",
      "created_at": "2017-11-22T13:42:17.991Z",
      "updated_at": "2017-11-22T13:42:20.540Z",
      "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/8/messages",
      "message": {
        "id": 71,
        "content": {
          "markdown": "Post-ironic tote bag cornhole single-origin coffee yuccie authentic. Tattooed truffaut scenester pork belly flannel yolo messenger bag irony. Ramps asymmetrical viral chambray tote bag cray meggings fap. Five dollar toast green juice flannel occupy letterpress kickstarter. Mlkshk shoreditch ethical franzen swag kogi.\nForage hella five dollar toast bicycle rights food truck keffiyeh. Intelligentsia drinking gastropub pickled helvetica freegan. Plaid freegan gluten-free cred keytar. Fixie synth whatever photo booth irony. Park health synth chillwave ennui neutra vinegar.\nSemiotics bicycle rights neutra gastropub green juice. Skateboard messenger bag deep v keffiyeh brooklyn carry microdosing gastropub. Migas salvia meggings bushwick chia brunch. Irony readymade migas keffiyeh. Food truck stumptown listicle.",
          "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"

[
  {
    "id": 10,
    "topic_id": 10,
    "cursus_id": 1,
    "topic": {
      "id": 10,
      "name": "R2-D2, you know better than to trust a strange computer!",
      "author": {
        "id": 110,
        "login": "kki-adi2",
        "url": "https://api.intra.42.fr/v2/users/kki-adi2"
      },
      "kind": "normal",
      "created_at": "2017-11-22T13:42:19.352Z",
      "updated_at": "2017-11-22T13:42:20.396Z",
      "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/10/messages",
      "message": {
        "id": 91,
        "content": {
          "markdown": "Paleo viral next level mixtape cold-pressed taxidermy. Blue bottle shoreditch wes anderson master gastropub shabby chic put a bird on it tofu. Letterpress echo butcher vinegar selfies kale chips.\nPop-up scenester thundercats selfies jean shorts raw denim try-hard. Cold-pressed venmo viral wayfarers iphone. Tousled semiotics blue bottle banh mi locavore schlitz trust fund godard. Helvetica mustache dreamcatcher wes anderson truffaut kinfolk tote bag williamsburg. Disrupt brooklyn beard authentic pabst try-hard.\nRetro butcher post-ironic kale chips artisan mixtape chillwave. Vegan meggings master helvetica plaid gentrify bespoke. Single-origin coffee bespoke chicharrones. Shoreditch locavore disrupt everyday pour-over tumblr bespoke.",
          "html": null
        }
      }
    },
    "cursus": {
      "id": 1,
      "created_at": "2017-11-22T13:41:00.750Z",
      "name": "Piscine C",
      "slug": "piscine-c"
    }
  },
  {
    "id": 9,
    "topic_id": 9,
    "cursus_id": 1,
    "topic": {
      "id": 9,
      "name": "Who's the more foolish; the fool, or the fool who follows him?",
      "author": {
        "id": 16,
        "login": "cdooku",
        "url": "https://api.intra.42.fr/v2/users/cdooku"
      },
      "kind": "normal",
      "created_at": "2017-11-22T13:42:18.720Z",
      "updated_at": "2017-11-22T13:42:20.566Z",
      "pinned_at": null,
      "locked_at": null,
      "pinner": null,
      "locker": null,
      "language": {
        "id": 3,
        "name": "Romanian",
        "identifier": "ro",
        "created_at": "2017-11-22T13:40:59.468Z",
        "updated_at": "2017-11-22T13:41:26.139Z"
      },
      "messages_url": "https://api.intra.42.fr/v2/topics/9/messages",
      "message": {
        "id": 81,
        "content": {
          "markdown": "Ennui try-hard yuccie chia bicycle rights semiotics. Schlitz kickstarter shabby chic hoodie chicharrones tacos vinyl. Kale chips wolf twee kogi master banjo synth.\n+1 truffaut everyday. Viral church-key freegan marfa pabst tofu photo booth. Polaroid diy trust fund roof fashion axe pinterest. Microdosing pitchfork carry. Aesthetic semiotics sriracha knausgaard microdosing heirloom skateboard cred.\nHelvetica you probably haven't heard of them post-ironic. Seitan scenester hoodie ramps kombucha tumblr. Helvetica tilde meggings intelligentsia meh small batch.",
          "html": null
        }
      }
    },
    "cursus": {
      "id": 1,
      "created_at": "2017-11-22T13:41:00.750Z",
      "name": "Piscine C",
      "slug": "piscine-c"
    }
  },
  {
    "id": 8,
    "topic_id": 8,
    "cursus_id": 1,
    "topic": {
      "id": 8,
      "name": "Shut him up or shut him down.",
      "author": {
        "id": 43,
        "login": "bfett",
        "url": "https://api.intra.42.fr/v2/users/bfett"
      },
      "kind": "normal",
      "created_at": "2017-11-22T13:42:17.991Z",
      "updated_at": "2017-11-22T13:42:20.540Z",
      "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/8/messages",
      "message": {
        "id": 71,
        "content": {
          "markdown": "Post-ironic tote bag cornhole single-origin coffee yuccie authentic. Tattooed truffaut scenester pork belly flannel yolo messenger bag irony. Ramps asymmetrical viral chambray tote bag cray meggings fap. Five dollar toast green juice flannel occupy letterpress kickstarter. Mlkshk shoreditch ethical franzen swag kogi.\nForage hella five dollar toast bicycle rights food truck keffiyeh. Intelligentsia drinking gastropub pickled helvetica freegan. Plaid freegan gluten-free cred keytar. Fixie synth whatever photo booth irony. Park health synth chillwave ennui neutra vinegar.\nSemiotics bicycle rights neutra gastropub green juice. Skateboard messenger bag deep v keffiyeh brooklyn carry microdosing gastropub. Migas salvia meggings bushwick chia brunch. Irony readymade migas keffiyeh. Food truck stumptown listicle.",
          "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")
response.status
# => 200
response.parsed
# => [{"id"=>10, "topic_id"=>10, "cursus_id"=>1, "topic"=>{"id"=>10, "name"=>"R2-D2, you know better than to trust a strange computer!", "author"=>{"id"=>110, "login"=>"kki-adi2", "url"=>"https://api.intra.42.fr/v2/users/kki-adi2"}, "kind"=>"normal", "created_at"=>"2017-11-22T13:42:19.352Z", "updated_at"=>"2017-11-22T13:42:20.396Z", "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/10/messages", "message"=>{"id"=>91, "content"=>{"markdown"=>"Paleo viral next level mixtape cold-pressed taxidermy. Blue bottle shoreditch wes anderson master gastropub shabby chic put a bird on it tofu. Letterpress echo butcher vinegar selfies kale chips.\nPop-up scenester thundercats selfies jean shorts raw denim try-hard. Cold-pressed venmo viral wayfarers iphone. Tousled semiotics blue bottle banh mi locavore schlitz trust fund godard. Helvetica mustache dreamcatcher wes anderson truffaut kinfolk tote bag williamsburg. Disrupt brooklyn beard authentic pabst try-hard.\nRetro butcher post-ironic kale chips artisan mixtape chillwave. Vegan meggings master helvetica plaid gentrify bespoke. Single-origin coffee bespoke chicharrones. Shoreditch locavore disrupt everyday pour-over tumblr bespoke.", "html"=>nil}}}, "cursus"=>{"id"=>1, "created_at"=>"2017-11-22T13:41:00.750Z", "name"=>"Piscine C", "slug"=>"piscine-c"}}, {"id"=>9, "topic_id"=>9, "cursus_id"=>1, "topic"=>{"id"=>9, "name"=>"Who's the more foolish; the fool, or the fool who follows him?", "author"=>{"id"=>16, "login"=>"cdooku", "url"=>"https://api.intra.42.fr/v2/users/cdooku"}, "kind"=>"normal", "created_at"=>"2017-11-22T13:42:18.720Z", "updated_at"=>"2017-11-22T13:42:20.566Z", "pinned_at"=>nil, "locked_at"=>nil, "pinner"=>nil, "locker"=>nil, "language"=>{"id"=>3, "name"=>"Romanian", "identifier"=>"ro", "created_at"=>"2017-11-22T13:40:59.468Z", "updated_at"=>"2017-11-22T13:41:26.139Z"}, "messages_url"=>"https://api.intra.42.fr/v2/topics/9/messages", "message"=>{"id"=>81, "content"=>{"markdown"=>"Ennui try-hard yuccie chia bicycle rights semiotics. Schlitz kickstarter shabby chic hoodie chicharrones tacos vinyl. Kale chips wolf twee kogi master banjo synth.\n+1 truffaut everyday. Viral church-key freegan marfa pabst tofu photo booth. Polaroid diy trust fund roof fashion axe pinterest. Microdosing pitchfork carry. Aesthetic semiotics sriracha knausgaard microdosing heirloom skateboard cred.\nHelvetica you probably haven't heard of them post-ironic. Seitan scenester hoodie ramps kombucha tumblr. Helvetica tilde meggings intelligentsia meh small batch.", "html"=>nil}}}, "cursus"=>{"id"=>1, "created_at"=>"2017-11-22T13:41:00.750Z", "name"=>"Piscine C", "slug"=>"piscine-c"}}, {"id"=>8, "topic_id"=>8, "cursus_id"=>1, "topic"=>{"id"=>8, "name"=>"Shut him up or shut him down.", "author"=>{"id"=>43, "login"=>"bfett", "url"=>"https://api.intra.42.fr/v2/users/bfett"}, "kind"=>"normal", "created_at"=>"2017-11-22T13:42:17.991Z", "updated_at"=>"2017-11-22T13:42:20.540Z", "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/8/messages", "message"=>{"id"=>71, "content"=>{"markdown"=>"Post-ironic tote bag cornhole single-origin coffee yuccie authentic. Tattooed truffaut scenester pork belly flannel yolo messenger bag irony. Ramps asymmetrical viral chambray tote bag cray meggings fap. Five dollar toast green juice flannel occupy letterpress kickstarter. Mlkshk shoreditch ethical franzen swag kogi.\nForage hella five dollar toast bicycle rights food truck keffiyeh. Intelligentsia drinking gastropub pickled helvetica freegan. Plaid freegan gluten-free cred keytar. Fixie synth whatever photo booth irony. Park health synth chillwave ennui neutra vinegar.\nSemiotics bicycle rights neutra gastropub green juice. Skateboard messenger bag deep v keffiyeh brooklyn carry microdosing gastropub. Migas salvia meggings bushwick chia brunch. Irony readymade migas keffiyeh. Food truck stumptown listicle.", "html"=>nil}}}, "cursus"=>{"id"=>1, "created_at"=>"2017-11-22T13:41:00.750Z", "name"=>"Piscine C", "slug"=>"piscine-c"}}]