GET /v2/cursus/:cursus_id/events
Return all the events of the given Cursus
GET /v2/campus/:campus_id/events
Return all the events of the given Campus
GET /v2/campus/:campus_id/cursus/:cursus_id/events
Return all the events of the given Cursus, associated with the given Campus
GET /v2/users/:user_id/events
Return all the events of the given User
GET /v2/events
Return all the events
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 |
campus_id |
optional
. Must be String
The campus id or slug |
user_id |
optional
. Must be String
The user id or slug |
sort |
optional
. Must be one of: id , begin_at , end_at , name , description , location , kind , max_people , created_at , updated_at , prohibition_of_cancellation , difficulty , remote .
The sort field. Sorted by begin_at desc, id desc by default. MoreExample:To sort on events on the fields difficulty on a descending order and remote on a ascending order: ...&sort=-difficulty,remote |
filter |
optional
. Must be one of: id , begin_at , end_at , name , description , location , kind , max_people , created_at , updated_at , prohibition_of_cancellation , difficulty , remote , future , end .
Filtering on one or more fields MoreExample:
To filter on events with the
...&filter[id]=a_value,another_value Filterable fields:
|
range |
optional
. Must be one of: id , begin_at , end_at , name , description , location , kind , max_people , created_at , updated_at , prohibition_of_cancellation , difficulty , remote .
Select on a particular range MoreExample:
To range on events with the
...&range[remote]=min_value,max_value Rangeable fields:
|
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 |
Examples
GET /v2/events
200
[
{
"id": 4,
"name": "Oklahoma whales",
"description": "Et selfies beard williamsburg quisquam ramps. Molestiae craft beer consectetur asperiores dolor. Small batch placeat banjo vhs mollitia aut vero. Distinctio est readymade offal tote bag +1.",
"location": "West Wisozk",
"kind": "rush",
"max_people": 112,
"nbr_subscribers": 0,
"begin_at": "2017-11-25T13:42:10.090Z",
"end_at": "2017-11-25T15:42:10.090Z",
"campus_ids": [
3
],
"cursus_ids": [
1
],
"themes": [
{
"created_at": "2019-01-09T17:18:54.779Z",
"id": 36,
"name": "AI",
"updated_at": "2019-01-09T17:18:54.779Z"
},
{
"created_at": "2019-01-09T17:18:54.819Z",
"id": 37,
"name": "Entrepreneurship",
"updated_at": "2019-01-09T17:18:54.819Z"
}
],
"waitlist": null,
"prohibition_of_cancellation": 15,
"created_at": "2017-11-22T13:42:10.110Z",
"updated_at": "2017-11-22T13:42:10.127Z"
},
{
"id": 3,
"name": "Wyoming cattle",
"description": "Accusantium lumbersexual pug minima you probably haven't heard of them. Dolore officiis kitsch lumbersexual temporibus twee church-key. Ramps molestiae ut esse squid. Molestiae delectus est optio. Biodiesel roof maiores iphone nobis.",
"location": "Southern Bauch",
"kind": "other",
"max_people": 39,
"nbr_subscribers": 0,
"begin_at": "2017-11-24T13:42:10.014Z",
"end_at": "2017-11-24T15:42:10.015Z",
"campus_ids": [
6
],
"cursus_ids": [
1
],
"themes": [
{
"created_at": "2019-01-09T17:18:54.779Z",
"id": 10,
"name": "Meeting",
"updated_at": "2019-01-09T17:18:54.779Z"
},
{
"created_at": "2019-01-09T17:18:54.819Z",
"id": 15,
"name": "Association",
"updated_at": "2019-01-09T17:18:54.819Z"
}
],
"waitlist": {
"created_at": "2019-01-14T16:25:05.941Z",
"id": 392,
"updated_at": "2019-01-14T16:25:05.941Z",
"waitlistable_id": 3,
"waitlistable_type": "Event"
},
"prohibition_of_cancellation": 2,
"created_at": "2017-11-22T13:42:10.037Z",
"updated_at": "2017-11-22T13:42:10.082Z"
},
{
"id": 2,
"name": "Nevada sheep",
"description": "Et tousled small batch street voluptas +1. Nisi small batch shoreditch est bicycle rights similique sed. Pbr&b sit exercitationem etsy ea. Cumque et forage reprehenderit officia quas. Chartreuse ad tacos commodi.",
"location": "South Wisconsin Academy",
"kind": "association",
"max_people": 94,
"nbr_subscribers": 0,
"begin_at": "2017-11-23T13:42:09.970Z",
"end_at": "2017-11-23T15:42:09.970Z",
"campus_ids": [
4
],
"cursus_ids": [
1
],
"themes": [
{
"created_at": "2019-01-09T17:18:54.779Z",
"id": 12,
"name": "Security",
"updated_at": "2019-01-09T17:18:54.779Z"
},
{
"created_at": "2019-01-09T17:18:54.819Z",
"id": 42,
"name": "Recrutement",
"updated_at": "2019-01-09T17:18:54.819Z"
}
],
"waitlist": {
"created_at": "2019-01-14T16:25:05.941Z",
"id": 33,
"updated_at": "2019-01-14T16:25:05.941Z",
"waitlistable_id": 2,
"waitlistable_type": "Event"
},
"prohibition_of_cancellation": 10,
"created_at": "2017-11-22T13:42:09.991Z",
"updated_at": "2017-11-22T13:42:10.009Z"
}
]
curl -H "Authorization: Bearer YOUR_ACCESS_TOKEN" "https://api.intra.42.fr/v2/events"
[
{
"id": 4,
"name": "Oklahoma whales",
"description": "Et selfies beard williamsburg quisquam ramps. Molestiae craft beer consectetur asperiores dolor. Small batch placeat banjo vhs mollitia aut vero. Distinctio est readymade offal tote bag +1.",
"location": "West Wisozk",
"kind": "rush",
"max_people": 112,
"nbr_subscribers": 0,
"begin_at": "2017-11-25T13:42:10.090Z",
"end_at": "2017-11-25T15:42:10.090Z",
"campus_ids": [
3
],
"cursus_ids": [
1
],
"themes": [
{
"created_at": "2019-01-09T17:18:54.779Z",
"id": 36,
"name": "AI",
"updated_at": "2019-01-09T17:18:54.779Z"
},
{
"created_at": "2019-01-09T17:18:54.819Z",
"id": 37,
"name": "Entrepreneurship",
"updated_at": "2019-01-09T17:18:54.819Z"
}
],
"waitlist": null,
"prohibition_of_cancellation": 15,
"created_at": "2017-11-22T13:42:10.110Z",
"updated_at": "2017-11-22T13:42:10.127Z"
},
{
"id": 3,
"name": "Wyoming cattle",
"description": "Accusantium lumbersexual pug minima you probably haven't heard of them. Dolore officiis kitsch lumbersexual temporibus twee church-key. Ramps molestiae ut esse squid. Molestiae delectus est optio. Biodiesel roof maiores iphone nobis.",
"location": "Southern Bauch",
"kind": "other",
"max_people": 39,
"nbr_subscribers": 0,
"begin_at": "2017-11-24T13:42:10.014Z",
"end_at": "2017-11-24T15:42:10.015Z",
"campus_ids": [
6
],
"cursus_ids": [
1
],
"themes": [
{
"created_at": "2019-01-09T17:18:54.779Z",
"id": 10,
"name": "Meeting",
"updated_at": "2019-01-09T17:18:54.779Z"
},
{
"created_at": "2019-01-09T17:18:54.819Z",
"id": 15,
"name": "Association",
"updated_at": "2019-01-09T17:18:54.819Z"
}
],
"waitlist": {
"created_at": "2019-01-14T16:25:05.941Z",
"id": 392,
"updated_at": "2019-01-14T16:25:05.941Z",
"waitlistable_id": 3,
"waitlistable_type": "Event"
},
"prohibition_of_cancellation": 2,
"created_at": "2017-11-22T13:42:10.037Z",
"updated_at": "2017-11-22T13:42:10.082Z"
},
{
"id": 2,
"name": "Nevada sheep",
"description": "Et tousled small batch street voluptas +1. Nisi small batch shoreditch est bicycle rights similique sed. Pbr&b sit exercitationem etsy ea. Cumque et forage reprehenderit officia quas. Chartreuse ad tacos commodi.",
"location": "South Wisconsin Academy",
"kind": "association",
"max_people": 94,
"nbr_subscribers": 0,
"begin_at": "2017-11-23T13:42:09.970Z",
"end_at": "2017-11-23T15:42:09.970Z",
"campus_ids": [
4
],
"cursus_ids": [
1
],
"themes": [
{
"created_at": "2019-01-09T17:18:54.779Z",
"id": 12,
"name": "Security",
"updated_at": "2019-01-09T17:18:54.779Z"
},
{
"created_at": "2019-01-09T17:18:54.819Z",
"id": 42,
"name": "Recrutement",
"updated_at": "2019-01-09T17:18:54.819Z"
}
],
"waitlist": {
"created_at": "2019-01-14T16:25:05.941Z",
"id": 33,
"updated_at": "2019-01-14T16:25:05.941Z",
"waitlistable_id": 2,
"waitlistable_type": "Event"
},
"prohibition_of_cancellation": 10,
"created_at": "2017-11-22T13:42:09.991Z",
"updated_at": "2017-11-22T13:42:10.009Z"
}
]
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/events")
response.status
# => 200
response.parsed
# => [{"id"=>4, "name"=>"Oklahoma whales", "description"=>"Et selfies beard williamsburg quisquam ramps. Molestiae craft beer consectetur asperiores dolor. Small batch placeat banjo vhs mollitia aut vero. Distinctio est readymade offal tote bag +1.", "location"=>"West Wisozk", "kind"=>"rush", "max_people"=>112, "nbr_subscribers"=>0, "begin_at"=>"2017-11-25T13:42:10.090Z", "end_at"=>"2017-11-25T15:42:10.090Z", "campus_ids"=>[3], "cursus_ids"=>[1], "themes"=>[{"created_at"=>"2019-01-09T17:18:54.779Z", "id"=>36, "name"=>"AI", "updated_at"=>"2019-01-09T17:18:54.779Z"}, {"created_at"=>"2019-01-09T17:18:54.819Z", "id"=>37, "name"=>"Entrepreneurship", "updated_at"=>"2019-01-09T17:18:54.819Z"}], "waitlist"=>nil, "prohibition_of_cancellation"=>15, "created_at"=>"2017-11-22T13:42:10.110Z", "updated_at"=>"2017-11-22T13:42:10.127Z"}, {"id"=>3, "name"=>"Wyoming cattle", "description"=>"Accusantium lumbersexual pug minima you probably haven't heard of them. Dolore officiis kitsch lumbersexual temporibus twee church-key. Ramps molestiae ut esse squid. Molestiae delectus est optio. Biodiesel roof maiores iphone nobis.", "location"=>"Southern Bauch", "kind"=>"other", "max_people"=>39, "nbr_subscribers"=>0, "begin_at"=>"2017-11-24T13:42:10.014Z", "end_at"=>"2017-11-24T15:42:10.015Z", "campus_ids"=>[6], "cursus_ids"=>[1], "themes"=>[{"created_at"=>"2019-01-09T17:18:54.779Z", "id"=>10, "name"=>"Meeting", "updated_at"=>"2019-01-09T17:18:54.779Z"}, {"created_at"=>"2019-01-09T17:18:54.819Z", "id"=>15, "name"=>"Association", "updated_at"=>"2019-01-09T17:18:54.819Z"}], "waitlist"=>{"created_at"=>"2019-01-14T16:25:05.941Z", "id"=>392, "updated_at"=>"2019-01-14T16:25:05.941Z", "waitlistable_id"=>3, "waitlistable_type"=>"Event"}, "prohibition_of_cancellation"=>2, "created_at"=>"2017-11-22T13:42:10.037Z", "updated_at"=>"2017-11-22T13:42:10.082Z"}, {"id"=>2, "name"=>"Nevada sheep", "description"=>"Et tousled small batch street voluptas +1. Nisi small batch shoreditch est bicycle rights similique sed. Pbr&b sit exercitationem etsy ea. Cumque et forage reprehenderit officia quas. Chartreuse ad tacos commodi.", "location"=>"South Wisconsin Academy", "kind"=>"association", "max_people"=>94, "nbr_subscribers"=>0, "begin_at"=>"2017-11-23T13:42:09.970Z", "end_at"=>"2017-11-23T15:42:09.970Z", "campus_ids"=>[4], "cursus_ids"=>[1], "themes"=>[{"created_at"=>"2019-01-09T17:18:54.779Z", "id"=>12, "name"=>"Security", "updated_at"=>"2019-01-09T17:18:54.779Z"}, {"created_at"=>"2019-01-09T17:18:54.819Z", "id"=>42, "name"=>"Recrutement", "updated_at"=>"2019-01-09T17:18:54.819Z"}], "waitlist"=>{"created_at"=>"2019-01-14T16:25:05.941Z", "id"=>33, "updated_at"=>"2019-01-14T16:25:05.941Z", "waitlistable_id"=>2, "waitlistable_type"=>"Event"}, "prohibition_of_cancellation"=>10, "created_at"=>"2017-11-22T13:42:09.991Z", "updated_at"=>"2017-11-22T13:42:10.009Z"}]