From 72812dbc1656098a887e878c7e08989db0ac2fc6 Mon Sep 17 00:00:00 2001 From: Anastasia Beglova Date: Fri, 3 May 2024 13:48:42 -0400 Subject: [PATCH] Api sort fixes (#846) --- frontends/api/src/generated/v1/api.ts | 8337 ++++------------- .../api/src/hooks/learningResources/index.ts | 11 - .../src/hooks/learningResources/keyFactory.ts | 9 - frontends/api/src/test-utils/urls.ts | 2 - .../TabbedCarousel/TabbedCarousel.test.tsx | 24 +- .../TabbedCarousel/TabbedCarousel.tsx | 22 +- .../page-components/TabbedCarousel/types.ts | 15 +- .../src/pages/HomePage/HomePage.test.tsx | 11 +- .../mit-open/src/pages/HomePage/HomePage.tsx | 13 +- .../src/pages/SearchPage/SearchPage.tsx | 2 +- learning_resources/constants.py | 12 +- learning_resources/etl/loaders.py | 22 + learning_resources/etl/loaders_test.py | 21 +- learning_resources/filters.py | 10 +- learning_resources/filters_test.py | 21 +- .../0045_learningresource_next_start_date.py | 39 + learning_resources/models.py | 6 +- learning_resources/serializers_test.py | 1 + learning_resources/tasks.py | 11 + learning_resources/tasks_test.py | 19 + learning_resources/views.py | 124 +- learning_resources/views_test.py | 169 +- learning_resources_search/api_test.py | 4 +- learning_resources_search/constants.py | 3 +- main/settings_celery.py | 4 + openapi/specs/v1.yaml | 6994 ++++---------- 26 files changed, 3640 insertions(+), 12266 deletions(-) create mode 100644 learning_resources/migrations/0045_learningresource_next_start_date.py diff --git a/frontends/api/src/generated/v1/api.ts b/frontends/api/src/generated/v1/api.ts index 409c276654..1cfe1d3861 100644 --- a/frontends/api/src/generated/v1/api.ts +++ b/frontends/api/src/generated/v1/api.ts @@ -602,6 +602,12 @@ export interface CourseResource { * @memberof CourseResource */ professional: boolean + /** + * + * @type {string} + * @memberof CourseResource + */ + next_start_date?: string | null } /** @@ -693,6 +699,12 @@ export interface CourseResourceRequest { * @memberof CourseResourceRequest */ url?: string | null + /** + * + * @type {string} + * @memberof CourseResourceRequest + */ + next_start_date?: string | null } /** * @@ -1008,6 +1020,12 @@ export interface LearningPathResource { * @memberof LearningPathResource */ professional?: boolean + /** + * + * @type {string} + * @memberof LearningPathResource + */ + next_start_date?: string | null } /** @@ -1070,6 +1088,12 @@ export interface LearningPathResourceRequest { * @memberof LearningPathResourceRequest */ professional?: boolean + /** + * + * @type {string} + * @memberof LearningPathResourceRequest + */ + next_start_date?: string | null } /** * @@ -2813,6 +2837,12 @@ export interface PatchedLearningPathResourceRequest { * @memberof PatchedLearningPathResourceRequest */ professional?: boolean + /** + * + * @type {string} + * @memberof PatchedLearningPathResourceRequest + */ + next_start_date?: string | null } /** * Serializer for UserListRelationship model @@ -3199,6 +3229,12 @@ export interface PodcastEpisodeResource { * @memberof PodcastEpisodeResource */ professional: boolean + /** + * + * @type {string} + * @memberof PodcastEpisodeResource + */ + next_start_date?: string | null } /** @@ -3261,6 +3297,12 @@ export interface PodcastEpisodeResourceRequest { * @memberof PodcastEpisodeResourceRequest */ url?: string | null + /** + * + * @type {string} + * @memberof PodcastEpisodeResourceRequest + */ + next_start_date?: string | null } /** * @@ -3456,6 +3498,12 @@ export interface PodcastResource { * @memberof PodcastResource */ professional: boolean + /** + * + * @type {string} + * @memberof PodcastResource + */ + next_start_date?: string | null } /** @@ -3518,6 +3566,12 @@ export interface PodcastResourceRequest { * @memberof PodcastResourceRequest */ url?: string | null + /** + * + * @type {string} + * @memberof PodcastResourceRequest + */ + next_start_date?: string | null } /** * @@ -3940,6 +3994,12 @@ export interface ProgramResource { * @memberof ProgramResource */ professional: boolean + /** + * + * @type {string} + * @memberof ProgramResource + */ + next_start_date?: string | null } /** @@ -4002,6 +4062,12 @@ export interface ProgramResourceRequest { * @memberof ProgramResourceRequest */ url?: string | null + /** + * + * @type {string} + * @memberof ProgramResourceRequest + */ + next_start_date?: string | null } /** * @@ -4052,7 +4118,7 @@ export type ResourceTypeEnum = (typeof ResourceTypeEnum)[keyof typeof ResourceTypeEnum] /** - * * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `created_on` - Creation Date ascending * `-created_on` - CreationDate descending * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending + * * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `new` - Newest resources first * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending * `upcoming` - Next start date ascending * @export * @enum {string} */ @@ -4064,14 +4130,14 @@ export const SortbyEnum = { ReadableId2: "-readable_id", LastModified: "last_modified", LastModified2: "-last_modified", - CreatedOn: "created_on", - CreatedOn2: "-created_on", + New: "new", StartDate: "start_date", StartDate2: "-start_date", Mitcoursenumber: "mitcoursenumber", Mitcoursenumber2: "-mitcoursenumber", Views: "views", Views2: "-views", + Upcoming: "upcoming", } as const export type SortbyEnum = (typeof SortbyEnum)[keyof typeof SortbyEnum] @@ -4483,6 +4549,12 @@ export interface VideoPlaylistResource { * @memberof VideoPlaylistResource */ professional: boolean + /** + * + * @type {string} + * @memberof VideoPlaylistResource + */ + next_start_date?: string | null } /** @@ -4545,6 +4617,12 @@ export interface VideoPlaylistResourceRequest { * @memberof VideoPlaylistResourceRequest */ url?: string | null + /** + * + * @type {string} + * @memberof VideoPlaylistResourceRequest + */ + next_start_date?: string | null } /** * @@ -4734,6 +4812,12 @@ export interface VideoResource { * @memberof VideoResource */ professional: boolean + /** + * + * @type {string} + * @memberof VideoResource + */ + next_start_date?: string | null } /** @@ -4796,6 +4880,12 @@ export interface VideoResourceRequest { * @memberof VideoResourceRequest */ url?: string | null + /** + * + * @type {string} + * @memberof VideoResourceRequest + */ + next_start_date?: string | null } /** * @@ -6929,7 +7019,7 @@ export const CoursesApiAxiosParamCreator = function ( * @param {boolean} [professional] * @param {Array} [readable_id] Multiple values may be separated by commas. * @param {Array} [resource_type] The type of learning resource * `course` - Course * `program` - Program * `learning_path` - Learning Path * `podcast` - Podcast * `podcast_episode` - Podcast Episode * `video` - Video * `video_playlist` - Video Playlist - * @param {CoursesListSortbyEnum} [sortby] Sort By * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `created_on` - Creation Date ascending * `-created_on` - CreationDate descending * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending + * @param {CoursesListSortbyEnum} [sortby] Sort By * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `new` - Newest resources first * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending * `upcoming` - Next start date ascending * @param {Array} [topic] Multiple values may be separated by commas. * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -7041,172 +7131,6 @@ export const CoursesApiAxiosParamCreator = function ( options: localVarRequestOptions, } }, - /** - * Get a paginated list of popular Courses. - * @summary List New - * @param {Array} [course_feature] Multiple values may be separated by commas. - * @param {Array} [department] The department that offers learning resources * `1` - Civil and Environmental Engineering * `2` - Mechanical Engineering * `3` - Materials Science and Engineering * `4` - Architecture * `5` - Chemistry * `6` - Electrical Engineering and Computer Science * `7` - Biology * `8` - Physics * `9` - Brain and Cognitive Sciences * `10` - Chemical Engineering * `11` - Urban Studies and Planning * `12` - Earth, Atmospheric, and Planetary Sciences * `14` - Economics * `15` - Sloan School of Management * `16` - Aeronautics and Astronautics * `17` - Political Science * `18` - Mathematics * `20` - Biological Engineering * `21A` - Anthropology * `21G` - Global Studies and Languages * `21H` - History * `21L` - Literature * `21M` - Music and Theater Arts * `22` - Nuclear Science and Engineering * `24` - Linguistics and Philosophy * `CC` - Concourse * `CMS-W` - Comparative Media Studies/Writing * `EC` - Edgerton Center * `ES` - Experimental Study Group * `ESD` - Engineering Systems Division * `HST` - Health Sciences and Technology * `IDS` - Institute for Data, Systems, and Society * `MAS` - Media Arts and Sciences * `PE` - Athletics, Physical Education and Recreation * `RES` - Supplemental Resources * `STS` - Science, Technology, and Society * `WGS` - Women\'s and Gender Studies - * @param {boolean} [free] The course/program is offered for free - * @param {Array>} [learning_format] The learning format of course/program resources * `online` - Online * `hybrid` - Hybrid * `in_person` - In person - * @param {Array} [level] The academic level of the resources * `undergraduate` - Undergraduate * `graduate` - Graduate * `high_school` - High School * `noncredit` - Non-Credit * `advanced` - Advanced * `intermediate` - Intermediate * `introductory` - Introductory - * @param {number} [limit] Number of results to return per page. - * @param {Array} [offered_by] The organization that offers a learning resource * `mitx` - MITx * `ocw` - OCW * `bootcamps` - Bootcamps * `xpro` - xPRO * `csail` - CSAIL * `mitpe` - Professional Education * `see` - Sloan Executive Education * `scc` - Schwarzman College of Computing * `ctl` - Center for Transportation & Logistics - * @param {number} [offset] The initial index from which to return the results. - * @param {Array} [platform] The platform on which learning resources are offered * `edx` - edX * `ocw` - OCW * `oll` - Open Learning Library * `mitxonline` - MITx Online * `bootcamps` - Bootcamps * `xpro` - xPRO * `csail` - CSAIL * `mitpe` - Professional Education * `see` - Sloan Executive Education * `scc` - Schwarzman College of Computing * `ctl` - Center for Transportation & Logistics * `whu` - WHU * `susskind` - Susskind * `globalalumni` - Global Alumni * `simplilearn` - Simplilearn * `emeritus` - Emeritus * `podcast` - Podcast * `youtube` - YouTube - * @param {boolean} [professional] - * @param {Array} [readable_id] Multiple values may be separated by commas. - * @param {Array} [resource_type] The type of learning resource * `course` - Course * `program` - Program * `learning_path` - Learning Path * `podcast` - Podcast * `podcast_episode` - Podcast Episode * `video` - Video * `video_playlist` - Video Playlist - * @param {CoursesNewListSortbyEnum} [sortby] Sort By * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `created_on` - Creation Date ascending * `-created_on` - CreationDate descending * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending - * @param {Array} [topic] Multiple values may be separated by commas. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - coursesNewList: async ( - course_feature?: Array, - department?: Array, - free?: boolean, - learning_format?: Array>, - level?: Array, - limit?: number, - offered_by?: Array, - offset?: number, - platform?: Array, - professional?: boolean, - readable_id?: Array, - resource_type?: Array, - sortby?: CoursesNewListSortbyEnum, - topic?: Array, - options: RawAxiosRequestConfig = {}, - ): Promise => { - const localVarPath = `/api/v1/courses/new/` - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) - let baseOptions - if (configuration) { - baseOptions = configuration.baseOptions - } - - const localVarRequestOptions = { - method: "GET", - ...baseOptions, - ...options, - } - const localVarHeaderParameter = {} as any - const localVarQueryParameter = {} as any - - if (course_feature) { - localVarQueryParameter["course_feature"] = course_feature.join( - COLLECTION_FORMATS.csv, - ) - } - - if (department) { - localVarQueryParameter["department"] = department - } - - if (free !== undefined) { - localVarQueryParameter["free"] = free - } - - if (learning_format) { - localVarQueryParameter["learning_format"] = learning_format - } - - if (level) { - localVarQueryParameter["level"] = level - } - - if (limit !== undefined) { - localVarQueryParameter["limit"] = limit - } - - if (offered_by) { - localVarQueryParameter["offered_by"] = offered_by - } - - if (offset !== undefined) { - localVarQueryParameter["offset"] = offset - } - - if (platform) { - localVarQueryParameter["platform"] = platform - } - - if (professional !== undefined) { - localVarQueryParameter["professional"] = professional - } - - if (readable_id) { - localVarQueryParameter["readable_id"] = readable_id.join( - COLLECTION_FORMATS.csv, - ) - } - - if (resource_type) { - localVarQueryParameter["resource_type"] = resource_type - } - - if (sortby !== undefined) { - localVarQueryParameter["sortby"] = sortby - } - - if (topic) { - localVarQueryParameter["topic"] = topic.join(COLLECTION_FORMATS.csv) - } - - setSearchParams(localVarUrlObj, localVarQueryParameter) - let headersFromBaseOptions = - baseOptions && baseOptions.headers ? baseOptions.headers : {} - localVarRequestOptions.headers = { - ...localVarHeaderParameter, - ...headersFromBaseOptions, - ...options.headers, - } - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - } - }, - /** - * Retrieve a list of popular resources - * @summary List Popular - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - coursesPopularRetrieve: async ( - options: RawAxiosRequestConfig = {}, - ): Promise => { - const localVarPath = `/api/v1/courses/popular/` - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) - let baseOptions - if (configuration) { - baseOptions = configuration.baseOptions - } - - const localVarRequestOptions = { - method: "GET", - ...baseOptions, - ...options, - } - const localVarHeaderParameter = {} as any - const localVarQueryParameter = {} as any - - setSearchParams(localVarUrlObj, localVarQueryParameter) - let headersFromBaseOptions = - baseOptions && baseOptions.headers ? baseOptions.headers : {} - localVarRequestOptions.headers = { - ...localVarHeaderParameter, - ...headersFromBaseOptions, - ...options.headers, - } - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - } - }, /** * Retrieve a single course * @summary Retrieve @@ -7253,162 +7177,35 @@ export const CoursesApiAxiosParamCreator = function ( options: localVarRequestOptions, } }, + } +} + +/** + * CoursesApi - functional programming interface + * @export + */ +export const CoursesApiFp = function (configuration?: Configuration) { + const localVarAxiosParamCreator = CoursesApiAxiosParamCreator(configuration) + return { /** - * Get a paginated list of upcoming Courses. - * @summary List Upcoming - * @param {Array} [course_feature] Multiple values may be separated by commas. - * @param {Array} [department] The department that offers learning resources * `1` - Civil and Environmental Engineering * `2` - Mechanical Engineering * `3` - Materials Science and Engineering * `4` - Architecture * `5` - Chemistry * `6` - Electrical Engineering and Computer Science * `7` - Biology * `8` - Physics * `9` - Brain and Cognitive Sciences * `10` - Chemical Engineering * `11` - Urban Studies and Planning * `12` - Earth, Atmospheric, and Planetary Sciences * `14` - Economics * `15` - Sloan School of Management * `16` - Aeronautics and Astronautics * `17` - Political Science * `18` - Mathematics * `20` - Biological Engineering * `21A` - Anthropology * `21G` - Global Studies and Languages * `21H` - History * `21L` - Literature * `21M` - Music and Theater Arts * `22` - Nuclear Science and Engineering * `24` - Linguistics and Philosophy * `CC` - Concourse * `CMS-W` - Comparative Media Studies/Writing * `EC` - Edgerton Center * `ES` - Experimental Study Group * `ESD` - Engineering Systems Division * `HST` - Health Sciences and Technology * `IDS` - Institute for Data, Systems, and Society * `MAS` - Media Arts and Sciences * `PE` - Athletics, Physical Education and Recreation * `RES` - Supplemental Resources * `STS` - Science, Technology, and Society * `WGS` - Women\'s and Gender Studies - * @param {boolean} [free] The course/program is offered for free - * @param {Array>} [learning_format] The learning format of course/program resources * `online` - Online * `hybrid` - Hybrid * `in_person` - In person - * @param {Array} [level] The academic level of the resources * `undergraduate` - Undergraduate * `graduate` - Graduate * `high_school` - High School * `noncredit` - Non-Credit * `advanced` - Advanced * `intermediate` - Intermediate * `introductory` - Introductory + * Show content files for a learning resource + * @summary Learning Resource Content File List + * @param {number} learning_resource_id id of the parent learning resource + * @param {Array} [content_feature_type] Multiple values may be separated by commas. * @param {number} [limit] Number of results to return per page. - * @param {Array} [offered_by] The organization that offers a learning resource * `mitx` - MITx * `ocw` - OCW * `bootcamps` - Bootcamps * `xpro` - xPRO * `csail` - CSAIL * `mitpe` - Professional Education * `see` - Sloan Executive Education * `scc` - Schwarzman College of Computing * `ctl` - Center for Transportation & Logistics + * @param {Array} [offered_by] The organization that offers a learning resource the content file belongs to * `mitx` - MITx * `ocw` - OCW * `bootcamps` - Bootcamps * `xpro` - xPRO * `csail` - CSAIL * `mitpe` - Professional Education * `see` - Sloan Executive Education * `scc` - Schwarzman College of Computing * `ctl` - Center for Transportation & Logistics * @param {number} [offset] The initial index from which to return the results. - * @param {Array} [platform] The platform on which learning resources are offered * `edx` - edX * `ocw` - OCW * `oll` - Open Learning Library * `mitxonline` - MITx Online * `bootcamps` - Bootcamps * `xpro` - xPRO * `csail` - CSAIL * `mitpe` - Professional Education * `see` - Sloan Executive Education * `scc` - Schwarzman College of Computing * `ctl` - Center for Transportation & Logistics * `whu` - WHU * `susskind` - Susskind * `globalalumni` - Global Alumni * `simplilearn` - Simplilearn * `emeritus` - Emeritus * `podcast` - Podcast * `youtube` - YouTube - * @param {boolean} [professional] - * @param {Array} [readable_id] Multiple values may be separated by commas. - * @param {Array} [resource_type] The type of learning resource * `course` - Course * `program` - Program * `learning_path` - Learning Path * `podcast` - Podcast * `podcast_episode` - Podcast Episode * `video` - Video * `video_playlist` - Video Playlist - * @param {CoursesUpcomingListSortbyEnum} [sortby] Sort By * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `created_on` - Creation Date ascending * `-created_on` - CreationDate descending * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending - * @param {Array} [topic] Multiple values may be separated by commas. + * @param {Array} [platform] The platform on which learning resources the content file belongs to is offered * `edx` - edX * `ocw` - OCW * `oll` - Open Learning Library * `mitxonline` - MITx Online * `bootcamps` - Bootcamps * `xpro` - xPRO * `csail` - CSAIL * `mitpe` - Professional Education * `see` - Sloan Executive Education * `scc` - Schwarzman College of Computing * `ctl` - Center for Transportation & Logistics * `whu` - WHU * `susskind` - Susskind * `globalalumni` - Global Alumni * `simplilearn` - Simplilearn * `emeritus` - Emeritus * `podcast` - Podcast * `youtube` - YouTube + * @param {Array} [resource_id] Multiple values may be separated by commas. + * @param {Array} [run_id] Multiple values may be separated by commas. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - coursesUpcomingList: async ( - course_feature?: Array, - department?: Array, - free?: boolean, - learning_format?: Array>, - level?: Array, + async coursesContentfilesList( + learning_resource_id: number, + content_feature_type?: Array, limit?: number, - offered_by?: Array, - offset?: number, - platform?: Array, - professional?: boolean, - readable_id?: Array, - resource_type?: Array, - sortby?: CoursesUpcomingListSortbyEnum, - topic?: Array, - options: RawAxiosRequestConfig = {}, - ): Promise => { - const localVarPath = `/api/v1/courses/upcoming/` - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) - let baseOptions - if (configuration) { - baseOptions = configuration.baseOptions - } - - const localVarRequestOptions = { - method: "GET", - ...baseOptions, - ...options, - } - const localVarHeaderParameter = {} as any - const localVarQueryParameter = {} as any - - if (course_feature) { - localVarQueryParameter["course_feature"] = course_feature.join( - COLLECTION_FORMATS.csv, - ) - } - - if (department) { - localVarQueryParameter["department"] = department - } - - if (free !== undefined) { - localVarQueryParameter["free"] = free - } - - if (learning_format) { - localVarQueryParameter["learning_format"] = learning_format - } - - if (level) { - localVarQueryParameter["level"] = level - } - - if (limit !== undefined) { - localVarQueryParameter["limit"] = limit - } - - if (offered_by) { - localVarQueryParameter["offered_by"] = offered_by - } - - if (offset !== undefined) { - localVarQueryParameter["offset"] = offset - } - - if (platform) { - localVarQueryParameter["platform"] = platform - } - - if (professional !== undefined) { - localVarQueryParameter["professional"] = professional - } - - if (readable_id) { - localVarQueryParameter["readable_id"] = readable_id.join( - COLLECTION_FORMATS.csv, - ) - } - - if (resource_type) { - localVarQueryParameter["resource_type"] = resource_type - } - - if (sortby !== undefined) { - localVarQueryParameter["sortby"] = sortby - } - - if (topic) { - localVarQueryParameter["topic"] = topic.join(COLLECTION_FORMATS.csv) - } - - setSearchParams(localVarUrlObj, localVarQueryParameter) - let headersFromBaseOptions = - baseOptions && baseOptions.headers ? baseOptions.headers : {} - localVarRequestOptions.headers = { - ...localVarHeaderParameter, - ...headersFromBaseOptions, - ...options.headers, - } - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - } - }, - } -} - -/** - * CoursesApi - functional programming interface - * @export - */ -export const CoursesApiFp = function (configuration?: Configuration) { - const localVarAxiosParamCreator = CoursesApiAxiosParamCreator(configuration) - return { - /** - * Show content files for a learning resource - * @summary Learning Resource Content File List - * @param {number} learning_resource_id id of the parent learning resource - * @param {Array} [content_feature_type] Multiple values may be separated by commas. - * @param {number} [limit] Number of results to return per page. - * @param {Array} [offered_by] The organization that offers a learning resource the content file belongs to * `mitx` - MITx * `ocw` - OCW * `bootcamps` - Bootcamps * `xpro` - xPRO * `csail` - CSAIL * `mitpe` - Professional Education * `see` - Sloan Executive Education * `scc` - Schwarzman College of Computing * `ctl` - Center for Transportation & Logistics - * @param {number} [offset] The initial index from which to return the results. - * @param {Array} [platform] The platform on which learning resources the content file belongs to is offered * `edx` - edX * `ocw` - OCW * `oll` - Open Learning Library * `mitxonline` - MITx Online * `bootcamps` - Bootcamps * `xpro` - xPRO * `csail` - CSAIL * `mitpe` - Professional Education * `see` - Sloan Executive Education * `scc` - Schwarzman College of Computing * `ctl` - Center for Transportation & Logistics * `whu` - WHU * `susskind` - Susskind * `globalalumni` - Global Alumni * `simplilearn` - Simplilearn * `emeritus` - Emeritus * `podcast` - Podcast * `youtube` - YouTube - * @param {Array} [resource_id] Multiple values may be separated by commas. - * @param {Array} [run_id] Multiple values may be separated by commas. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async coursesContentfilesList( - learning_resource_id: number, - content_feature_type?: Array, - limit?: number, - offered_by?: Array, + offered_by?: Array, offset?: number, platform?: Array, resource_id?: Array, @@ -7491,7 +7288,7 @@ export const CoursesApiFp = function (configuration?: Configuration) { * @param {boolean} [professional] * @param {Array} [readable_id] Multiple values may be separated by commas. * @param {Array} [resource_type] The type of learning resource * `course` - Course * `program` - Program * `learning_path` - Learning Path * `podcast` - Podcast * `podcast_episode` - Podcast Episode * `video` - Video * `video_playlist` - Video Playlist - * @param {CoursesListSortbyEnum} [sortby] Sort By * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `created_on` - Creation Date ascending * `-created_on` - CreationDate descending * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending + * @param {CoursesListSortbyEnum} [sortby] Sort By * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `new` - Newest resources first * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending * `upcoming` - Next start date ascending * @param {Array} [topic] Multiple values may be separated by commas. * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -7546,100 +7343,6 @@ export const CoursesApiFp = function (configuration?: Configuration) { configuration, )(axios, operationBasePath || basePath) }, - /** - * Get a paginated list of popular Courses. - * @summary List New - * @param {Array} [course_feature] Multiple values may be separated by commas. - * @param {Array} [department] The department that offers learning resources * `1` - Civil and Environmental Engineering * `2` - Mechanical Engineering * `3` - Materials Science and Engineering * `4` - Architecture * `5` - Chemistry * `6` - Electrical Engineering and Computer Science * `7` - Biology * `8` - Physics * `9` - Brain and Cognitive Sciences * `10` - Chemical Engineering * `11` - Urban Studies and Planning * `12` - Earth, Atmospheric, and Planetary Sciences * `14` - Economics * `15` - Sloan School of Management * `16` - Aeronautics and Astronautics * `17` - Political Science * `18` - Mathematics * `20` - Biological Engineering * `21A` - Anthropology * `21G` - Global Studies and Languages * `21H` - History * `21L` - Literature * `21M` - Music and Theater Arts * `22` - Nuclear Science and Engineering * `24` - Linguistics and Philosophy * `CC` - Concourse * `CMS-W` - Comparative Media Studies/Writing * `EC` - Edgerton Center * `ES` - Experimental Study Group * `ESD` - Engineering Systems Division * `HST` - Health Sciences and Technology * `IDS` - Institute for Data, Systems, and Society * `MAS` - Media Arts and Sciences * `PE` - Athletics, Physical Education and Recreation * `RES` - Supplemental Resources * `STS` - Science, Technology, and Society * `WGS` - Women\'s and Gender Studies - * @param {boolean} [free] The course/program is offered for free - * @param {Array>} [learning_format] The learning format of course/program resources * `online` - Online * `hybrid` - Hybrid * `in_person` - In person - * @param {Array} [level] The academic level of the resources * `undergraduate` - Undergraduate * `graduate` - Graduate * `high_school` - High School * `noncredit` - Non-Credit * `advanced` - Advanced * `intermediate` - Intermediate * `introductory` - Introductory - * @param {number} [limit] Number of results to return per page. - * @param {Array} [offered_by] The organization that offers a learning resource * `mitx` - MITx * `ocw` - OCW * `bootcamps` - Bootcamps * `xpro` - xPRO * `csail` - CSAIL * `mitpe` - Professional Education * `see` - Sloan Executive Education * `scc` - Schwarzman College of Computing * `ctl` - Center for Transportation & Logistics - * @param {number} [offset] The initial index from which to return the results. - * @param {Array} [platform] The platform on which learning resources are offered * `edx` - edX * `ocw` - OCW * `oll` - Open Learning Library * `mitxonline` - MITx Online * `bootcamps` - Bootcamps * `xpro` - xPRO * `csail` - CSAIL * `mitpe` - Professional Education * `see` - Sloan Executive Education * `scc` - Schwarzman College of Computing * `ctl` - Center for Transportation & Logistics * `whu` - WHU * `susskind` - Susskind * `globalalumni` - Global Alumni * `simplilearn` - Simplilearn * `emeritus` - Emeritus * `podcast` - Podcast * `youtube` - YouTube - * @param {boolean} [professional] - * @param {Array} [readable_id] Multiple values may be separated by commas. - * @param {Array} [resource_type] The type of learning resource * `course` - Course * `program` - Program * `learning_path` - Learning Path * `podcast` - Podcast * `podcast_episode` - Podcast Episode * `video` - Video * `video_playlist` - Video Playlist - * @param {CoursesNewListSortbyEnum} [sortby] Sort By * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `created_on` - Creation Date ascending * `-created_on` - CreationDate descending * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending - * @param {Array} [topic] Multiple values may be separated by commas. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async coursesNewList( - course_feature?: Array, - department?: Array, - free?: boolean, - learning_format?: Array>, - level?: Array, - limit?: number, - offered_by?: Array, - offset?: number, - platform?: Array, - professional?: boolean, - readable_id?: Array, - resource_type?: Array, - sortby?: CoursesNewListSortbyEnum, - topic?: Array, - options?: RawAxiosRequestConfig, - ): Promise< - ( - axios?: AxiosInstance, - basePath?: string, - ) => AxiosPromise - > { - const localVarAxiosArgs = await localVarAxiosParamCreator.coursesNewList( - course_feature, - department, - free, - learning_format, - level, - limit, - offered_by, - offset, - platform, - professional, - readable_id, - resource_type, - sortby, - topic, - options, - ) - const index = configuration?.serverIndex ?? 0 - const operationBasePath = - operationServerMap["CoursesApi.coursesNewList"]?.[index]?.url - return (axios, basePath) => - createRequestFunction( - localVarAxiosArgs, - globalAxios, - BASE_PATH, - configuration, - )(axios, operationBasePath || basePath) - }, - /** - * Retrieve a list of popular resources - * @summary List Popular - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async coursesPopularRetrieve( - options?: RawAxiosRequestConfig, - ): Promise< - (axios?: AxiosInstance, basePath?: string) => AxiosPromise - > { - const localVarAxiosArgs = - await localVarAxiosParamCreator.coursesPopularRetrieve(options) - const index = configuration?.serverIndex ?? 0 - const operationBasePath = - operationServerMap["CoursesApi.coursesPopularRetrieve"]?.[index]?.url - return (axios, basePath) => - createRequestFunction( - localVarAxiosArgs, - globalAxios, - BASE_PATH, - configuration, - )(axios, operationBasePath || basePath) - }, /** * Retrieve a single course * @summary Retrieve @@ -7668,77 +7371,6 @@ export const CoursesApiFp = function (configuration?: Configuration) { configuration, )(axios, operationBasePath || basePath) }, - /** - * Get a paginated list of upcoming Courses. - * @summary List Upcoming - * @param {Array} [course_feature] Multiple values may be separated by commas. - * @param {Array} [department] The department that offers learning resources * `1` - Civil and Environmental Engineering * `2` - Mechanical Engineering * `3` - Materials Science and Engineering * `4` - Architecture * `5` - Chemistry * `6` - Electrical Engineering and Computer Science * `7` - Biology * `8` - Physics * `9` - Brain and Cognitive Sciences * `10` - Chemical Engineering * `11` - Urban Studies and Planning * `12` - Earth, Atmospheric, and Planetary Sciences * `14` - Economics * `15` - Sloan School of Management * `16` - Aeronautics and Astronautics * `17` - Political Science * `18` - Mathematics * `20` - Biological Engineering * `21A` - Anthropology * `21G` - Global Studies and Languages * `21H` - History * `21L` - Literature * `21M` - Music and Theater Arts * `22` - Nuclear Science and Engineering * `24` - Linguistics and Philosophy * `CC` - Concourse * `CMS-W` - Comparative Media Studies/Writing * `EC` - Edgerton Center * `ES` - Experimental Study Group * `ESD` - Engineering Systems Division * `HST` - Health Sciences and Technology * `IDS` - Institute for Data, Systems, and Society * `MAS` - Media Arts and Sciences * `PE` - Athletics, Physical Education and Recreation * `RES` - Supplemental Resources * `STS` - Science, Technology, and Society * `WGS` - Women\'s and Gender Studies - * @param {boolean} [free] The course/program is offered for free - * @param {Array>} [learning_format] The learning format of course/program resources * `online` - Online * `hybrid` - Hybrid * `in_person` - In person - * @param {Array} [level] The academic level of the resources * `undergraduate` - Undergraduate * `graduate` - Graduate * `high_school` - High School * `noncredit` - Non-Credit * `advanced` - Advanced * `intermediate` - Intermediate * `introductory` - Introductory - * @param {number} [limit] Number of results to return per page. - * @param {Array} [offered_by] The organization that offers a learning resource * `mitx` - MITx * `ocw` - OCW * `bootcamps` - Bootcamps * `xpro` - xPRO * `csail` - CSAIL * `mitpe` - Professional Education * `see` - Sloan Executive Education * `scc` - Schwarzman College of Computing * `ctl` - Center for Transportation & Logistics - * @param {number} [offset] The initial index from which to return the results. - * @param {Array} [platform] The platform on which learning resources are offered * `edx` - edX * `ocw` - OCW * `oll` - Open Learning Library * `mitxonline` - MITx Online * `bootcamps` - Bootcamps * `xpro` - xPRO * `csail` - CSAIL * `mitpe` - Professional Education * `see` - Sloan Executive Education * `scc` - Schwarzman College of Computing * `ctl` - Center for Transportation & Logistics * `whu` - WHU * `susskind` - Susskind * `globalalumni` - Global Alumni * `simplilearn` - Simplilearn * `emeritus` - Emeritus * `podcast` - Podcast * `youtube` - YouTube - * @param {boolean} [professional] - * @param {Array} [readable_id] Multiple values may be separated by commas. - * @param {Array} [resource_type] The type of learning resource * `course` - Course * `program` - Program * `learning_path` - Learning Path * `podcast` - Podcast * `podcast_episode` - Podcast Episode * `video` - Video * `video_playlist` - Video Playlist - * @param {CoursesUpcomingListSortbyEnum} [sortby] Sort By * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `created_on` - Creation Date ascending * `-created_on` - CreationDate descending * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending - * @param {Array} [topic] Multiple values may be separated by commas. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async coursesUpcomingList( - course_feature?: Array, - department?: Array, - free?: boolean, - learning_format?: Array>, - level?: Array, - limit?: number, - offered_by?: Array, - offset?: number, - platform?: Array, - professional?: boolean, - readable_id?: Array, - resource_type?: Array, - sortby?: CoursesUpcomingListSortbyEnum, - topic?: Array, - options?: RawAxiosRequestConfig, - ): Promise< - ( - axios?: AxiosInstance, - basePath?: string, - ) => AxiosPromise - > { - const localVarAxiosArgs = - await localVarAxiosParamCreator.coursesUpcomingList( - course_feature, - department, - free, - learning_format, - level, - limit, - offered_by, - offset, - platform, - professional, - readable_id, - resource_type, - sortby, - topic, - options, - ) - const index = configuration?.serverIndex ?? 0 - const operationBasePath = - operationServerMap["CoursesApi.coursesUpcomingList"]?.[index]?.url - return (axios, basePath) => - createRequestFunction( - localVarAxiosArgs, - globalAxios, - BASE_PATH, - configuration, - )(axios, operationBasePath || basePath) - }, } } @@ -7829,95 +7461,20 @@ export const CoursesApiFactory = function ( .then((request) => request(axios, basePath)) }, /** - * Get a paginated list of popular Courses. - * @summary List New - * @param {CoursesApiCoursesNewListRequest} requestParameters Request parameters. + * Retrieve a single course + * @summary Retrieve + * @param {CoursesApiCoursesRetrieveRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - coursesNewList( - requestParameters: CoursesApiCoursesNewListRequest = {}, + coursesRetrieve( + requestParameters: CoursesApiCoursesRetrieveRequest, options?: RawAxiosRequestConfig, - ): AxiosPromise { - return localVarFp - .coursesNewList( - requestParameters.course_feature, - requestParameters.department, - requestParameters.free, - requestParameters.learning_format, - requestParameters.level, - requestParameters.limit, - requestParameters.offered_by, - requestParameters.offset, - requestParameters.platform, - requestParameters.professional, - requestParameters.readable_id, - requestParameters.resource_type, - requestParameters.sortby, - requestParameters.topic, - options, - ) - .then((request) => request(axios, basePath)) - }, - /** - * Retrieve a list of popular resources - * @summary List Popular - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - coursesPopularRetrieve( - options?: RawAxiosRequestConfig, - ): AxiosPromise { - return localVarFp - .coursesPopularRetrieve(options) - .then((request) => request(axios, basePath)) - }, - /** - * Retrieve a single course - * @summary Retrieve - * @param {CoursesApiCoursesRetrieveRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - coursesRetrieve( - requestParameters: CoursesApiCoursesRetrieveRequest, - options?: RawAxiosRequestConfig, - ): AxiosPromise { + ): AxiosPromise { return localVarFp .coursesRetrieve(requestParameters.id, options) .then((request) => request(axios, basePath)) }, - /** - * Get a paginated list of upcoming Courses. - * @summary List Upcoming - * @param {CoursesApiCoursesUpcomingListRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - coursesUpcomingList( - requestParameters: CoursesApiCoursesUpcomingListRequest = {}, - options?: RawAxiosRequestConfig, - ): AxiosPromise { - return localVarFp - .coursesUpcomingList( - requestParameters.course_feature, - requestParameters.department, - requestParameters.free, - requestParameters.learning_format, - requestParameters.level, - requestParameters.limit, - requestParameters.offered_by, - requestParameters.offset, - requestParameters.platform, - requestParameters.professional, - requestParameters.readable_id, - requestParameters.resource_type, - requestParameters.sortby, - requestParameters.topic, - options, - ) - .then((request) => request(axios, basePath)) - }, } } @@ -8096,8 +7653,8 @@ export interface CoursesApiCoursesListRequest { readonly resource_type?: Array /** - * Sort By * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `created_on` - Creation Date ascending * `-created_on` - CreationDate descending * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending - * @type {'-created_on' | '-id' | '-last_modified' | '-mitcoursenumber' | '-readable_id' | '-start_date' | '-views' | 'created_on' | 'id' | 'last_modified' | 'mitcoursenumber' | 'readable_id' | 'start_date' | 'views'} + * Sort By * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `new` - Newest resources first * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending * `upcoming` - Next start date ascending + * @type {'-id' | '-last_modified' | '-mitcoursenumber' | '-readable_id' | '-start_date' | '-views' | 'id' | 'last_modified' | 'mitcoursenumber' | 'new' | 'readable_id' | 'start_date' | 'upcoming' | 'views'} * @memberof CoursesApiCoursesList */ readonly sortby?: CoursesListSortbyEnum @@ -8110,111 +7667,6 @@ export interface CoursesApiCoursesListRequest { readonly topic?: Array } -/** - * Request parameters for coursesNewList operation in CoursesApi. - * @export - * @interface CoursesApiCoursesNewListRequest - */ -export interface CoursesApiCoursesNewListRequest { - /** - * Multiple values may be separated by commas. - * @type {Array} - * @memberof CoursesApiCoursesNewList - */ - readonly course_feature?: Array - - /** - * The department that offers learning resources * `1` - Civil and Environmental Engineering * `2` - Mechanical Engineering * `3` - Materials Science and Engineering * `4` - Architecture * `5` - Chemistry * `6` - Electrical Engineering and Computer Science * `7` - Biology * `8` - Physics * `9` - Brain and Cognitive Sciences * `10` - Chemical Engineering * `11` - Urban Studies and Planning * `12` - Earth, Atmospheric, and Planetary Sciences * `14` - Economics * `15` - Sloan School of Management * `16` - Aeronautics and Astronautics * `17` - Political Science * `18` - Mathematics * `20` - Biological Engineering * `21A` - Anthropology * `21G` - Global Studies and Languages * `21H` - History * `21L` - Literature * `21M` - Music and Theater Arts * `22` - Nuclear Science and Engineering * `24` - Linguistics and Philosophy * `CC` - Concourse * `CMS-W` - Comparative Media Studies/Writing * `EC` - Edgerton Center * `ES` - Experimental Study Group * `ESD` - Engineering Systems Division * `HST` - Health Sciences and Technology * `IDS` - Institute for Data, Systems, and Society * `MAS` - Media Arts and Sciences * `PE` - Athletics, Physical Education and Recreation * `RES` - Supplemental Resources * `STS` - Science, Technology, and Society * `WGS` - Women\'s and Gender Studies - * @type {Array<'1' | '10' | '11' | '12' | '14' | '15' | '16' | '17' | '18' | '2' | '20' | '21A' | '21G' | '21H' | '21L' | '21M' | '22' | '24' | '3' | '4' | '5' | '6' | '7' | '8' | '9' | 'CC' | 'CMS-W' | 'EC' | 'ES' | 'ESD' | 'HST' | 'IDS' | 'MAS' | 'PE' | 'RES' | 'STS' | 'WGS'>} - * @memberof CoursesApiCoursesNewList - */ - readonly department?: Array - - /** - * The course/program is offered for free - * @type {boolean} - * @memberof CoursesApiCoursesNewList - */ - readonly free?: boolean - - /** - * The learning format of course/program resources * `online` - Online * `hybrid` - Hybrid * `in_person` - In person - * @type {Array>} - * @memberof CoursesApiCoursesNewList - */ - readonly learning_format?: Array> - - /** - * The academic level of the resources * `undergraduate` - Undergraduate * `graduate` - Graduate * `high_school` - High School * `noncredit` - Non-Credit * `advanced` - Advanced * `intermediate` - Intermediate * `introductory` - Introductory - * @type {Array<'advanced' | 'graduate' | 'high_school' | 'intermediate' | 'introductory' | 'noncredit' | 'undergraduate'>} - * @memberof CoursesApiCoursesNewList - */ - readonly level?: Array - - /** - * Number of results to return per page. - * @type {number} - * @memberof CoursesApiCoursesNewList - */ - readonly limit?: number - - /** - * The organization that offers a learning resource * `mitx` - MITx * `ocw` - OCW * `bootcamps` - Bootcamps * `xpro` - xPRO * `csail` - CSAIL * `mitpe` - Professional Education * `see` - Sloan Executive Education * `scc` - Schwarzman College of Computing * `ctl` - Center for Transportation & Logistics - * @type {Array<'bootcamps' | 'csail' | 'ctl' | 'mitpe' | 'mitx' | 'ocw' | 'scc' | 'see' | 'xpro'>} - * @memberof CoursesApiCoursesNewList - */ - readonly offered_by?: Array - - /** - * The initial index from which to return the results. - * @type {number} - * @memberof CoursesApiCoursesNewList - */ - readonly offset?: number - - /** - * The platform on which learning resources are offered * `edx` - edX * `ocw` - OCW * `oll` - Open Learning Library * `mitxonline` - MITx Online * `bootcamps` - Bootcamps * `xpro` - xPRO * `csail` - CSAIL * `mitpe` - Professional Education * `see` - Sloan Executive Education * `scc` - Schwarzman College of Computing * `ctl` - Center for Transportation & Logistics * `whu` - WHU * `susskind` - Susskind * `globalalumni` - Global Alumni * `simplilearn` - Simplilearn * `emeritus` - Emeritus * `podcast` - Podcast * `youtube` - YouTube - * @type {Array<'bootcamps' | 'csail' | 'ctl' | 'edx' | 'emeritus' | 'globalalumni' | 'mitpe' | 'mitxonline' | 'ocw' | 'oll' | 'podcast' | 'scc' | 'see' | 'simplilearn' | 'susskind' | 'whu' | 'xpro' | 'youtube'>} - * @memberof CoursesApiCoursesNewList - */ - readonly platform?: Array - - /** - * - * @type {boolean} - * @memberof CoursesApiCoursesNewList - */ - readonly professional?: boolean - - /** - * Multiple values may be separated by commas. - * @type {Array} - * @memberof CoursesApiCoursesNewList - */ - readonly readable_id?: Array - - /** - * The type of learning resource * `course` - Course * `program` - Program * `learning_path` - Learning Path * `podcast` - Podcast * `podcast_episode` - Podcast Episode * `video` - Video * `video_playlist` - Video Playlist - * @type {Array<'course' | 'learning_path' | 'podcast' | 'podcast_episode' | 'program' | 'video' | 'video_playlist'>} - * @memberof CoursesApiCoursesNewList - */ - readonly resource_type?: Array - - /** - * Sort By * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `created_on` - Creation Date ascending * `-created_on` - CreationDate descending * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending - * @type {'-created_on' | '-id' | '-last_modified' | '-mitcoursenumber' | '-readable_id' | '-start_date' | '-views' | 'created_on' | 'id' | 'last_modified' | 'mitcoursenumber' | 'readable_id' | 'start_date' | 'views'} - * @memberof CoursesApiCoursesNewList - */ - readonly sortby?: CoursesNewListSortbyEnum - - /** - * Multiple values may be separated by commas. - * @type {Array} - * @memberof CoursesApiCoursesNewList - */ - readonly topic?: Array -} - /** * Request parameters for coursesRetrieve operation in CoursesApi. * @export @@ -8229,111 +7681,6 @@ export interface CoursesApiCoursesRetrieveRequest { readonly id: number } -/** - * Request parameters for coursesUpcomingList operation in CoursesApi. - * @export - * @interface CoursesApiCoursesUpcomingListRequest - */ -export interface CoursesApiCoursesUpcomingListRequest { - /** - * Multiple values may be separated by commas. - * @type {Array} - * @memberof CoursesApiCoursesUpcomingList - */ - readonly course_feature?: Array - - /** - * The department that offers learning resources * `1` - Civil and Environmental Engineering * `2` - Mechanical Engineering * `3` - Materials Science and Engineering * `4` - Architecture * `5` - Chemistry * `6` - Electrical Engineering and Computer Science * `7` - Biology * `8` - Physics * `9` - Brain and Cognitive Sciences * `10` - Chemical Engineering * `11` - Urban Studies and Planning * `12` - Earth, Atmospheric, and Planetary Sciences * `14` - Economics * `15` - Sloan School of Management * `16` - Aeronautics and Astronautics * `17` - Political Science * `18` - Mathematics * `20` - Biological Engineering * `21A` - Anthropology * `21G` - Global Studies and Languages * `21H` - History * `21L` - Literature * `21M` - Music and Theater Arts * `22` - Nuclear Science and Engineering * `24` - Linguistics and Philosophy * `CC` - Concourse * `CMS-W` - Comparative Media Studies/Writing * `EC` - Edgerton Center * `ES` - Experimental Study Group * `ESD` - Engineering Systems Division * `HST` - Health Sciences and Technology * `IDS` - Institute for Data, Systems, and Society * `MAS` - Media Arts and Sciences * `PE` - Athletics, Physical Education and Recreation * `RES` - Supplemental Resources * `STS` - Science, Technology, and Society * `WGS` - Women\'s and Gender Studies - * @type {Array<'1' | '10' | '11' | '12' | '14' | '15' | '16' | '17' | '18' | '2' | '20' | '21A' | '21G' | '21H' | '21L' | '21M' | '22' | '24' | '3' | '4' | '5' | '6' | '7' | '8' | '9' | 'CC' | 'CMS-W' | 'EC' | 'ES' | 'ESD' | 'HST' | 'IDS' | 'MAS' | 'PE' | 'RES' | 'STS' | 'WGS'>} - * @memberof CoursesApiCoursesUpcomingList - */ - readonly department?: Array - - /** - * The course/program is offered for free - * @type {boolean} - * @memberof CoursesApiCoursesUpcomingList - */ - readonly free?: boolean - - /** - * The learning format of course/program resources * `online` - Online * `hybrid` - Hybrid * `in_person` - In person - * @type {Array>} - * @memberof CoursesApiCoursesUpcomingList - */ - readonly learning_format?: Array> - - /** - * The academic level of the resources * `undergraduate` - Undergraduate * `graduate` - Graduate * `high_school` - High School * `noncredit` - Non-Credit * `advanced` - Advanced * `intermediate` - Intermediate * `introductory` - Introductory - * @type {Array<'advanced' | 'graduate' | 'high_school' | 'intermediate' | 'introductory' | 'noncredit' | 'undergraduate'>} - * @memberof CoursesApiCoursesUpcomingList - */ - readonly level?: Array - - /** - * Number of results to return per page. - * @type {number} - * @memberof CoursesApiCoursesUpcomingList - */ - readonly limit?: number - - /** - * The organization that offers a learning resource * `mitx` - MITx * `ocw` - OCW * `bootcamps` - Bootcamps * `xpro` - xPRO * `csail` - CSAIL * `mitpe` - Professional Education * `see` - Sloan Executive Education * `scc` - Schwarzman College of Computing * `ctl` - Center for Transportation & Logistics - * @type {Array<'bootcamps' | 'csail' | 'ctl' | 'mitpe' | 'mitx' | 'ocw' | 'scc' | 'see' | 'xpro'>} - * @memberof CoursesApiCoursesUpcomingList - */ - readonly offered_by?: Array - - /** - * The initial index from which to return the results. - * @type {number} - * @memberof CoursesApiCoursesUpcomingList - */ - readonly offset?: number - - /** - * The platform on which learning resources are offered * `edx` - edX * `ocw` - OCW * `oll` - Open Learning Library * `mitxonline` - MITx Online * `bootcamps` - Bootcamps * `xpro` - xPRO * `csail` - CSAIL * `mitpe` - Professional Education * `see` - Sloan Executive Education * `scc` - Schwarzman College of Computing * `ctl` - Center for Transportation & Logistics * `whu` - WHU * `susskind` - Susskind * `globalalumni` - Global Alumni * `simplilearn` - Simplilearn * `emeritus` - Emeritus * `podcast` - Podcast * `youtube` - YouTube - * @type {Array<'bootcamps' | 'csail' | 'ctl' | 'edx' | 'emeritus' | 'globalalumni' | 'mitpe' | 'mitxonline' | 'ocw' | 'oll' | 'podcast' | 'scc' | 'see' | 'simplilearn' | 'susskind' | 'whu' | 'xpro' | 'youtube'>} - * @memberof CoursesApiCoursesUpcomingList - */ - readonly platform?: Array - - /** - * - * @type {boolean} - * @memberof CoursesApiCoursesUpcomingList - */ - readonly professional?: boolean - - /** - * Multiple values may be separated by commas. - * @type {Array} - * @memberof CoursesApiCoursesUpcomingList - */ - readonly readable_id?: Array - - /** - * The type of learning resource * `course` - Course * `program` - Program * `learning_path` - Learning Path * `podcast` - Podcast * `podcast_episode` - Podcast Episode * `video` - Video * `video_playlist` - Video Playlist - * @type {Array<'course' | 'learning_path' | 'podcast' | 'podcast_episode' | 'program' | 'video' | 'video_playlist'>} - * @memberof CoursesApiCoursesUpcomingList - */ - readonly resource_type?: Array - - /** - * Sort By * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `created_on` - Creation Date ascending * `-created_on` - CreationDate descending * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending - * @type {'-created_on' | '-id' | '-last_modified' | '-mitcoursenumber' | '-readable_id' | '-start_date' | '-views' | 'created_on' | 'id' | 'last_modified' | 'mitcoursenumber' | 'readable_id' | 'start_date' | 'views'} - * @memberof CoursesApiCoursesUpcomingList - */ - readonly sortby?: CoursesUpcomingListSortbyEnum - - /** - * Multiple values may be separated by commas. - * @type {Array} - * @memberof CoursesApiCoursesUpcomingList - */ - readonly topic?: Array -} - /** * CoursesApi - object-oriented interface * @export @@ -8423,101 +7770,22 @@ export class CoursesApi extends BaseAPI { } /** - * Get a paginated list of popular Courses. - * @summary List New - * @param {CoursesApiCoursesNewListRequest} requestParameters Request parameters. + * Retrieve a single course + * @summary Retrieve + * @param {CoursesApiCoursesRetrieveRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CoursesApi */ - public coursesNewList( - requestParameters: CoursesApiCoursesNewListRequest = {}, + public coursesRetrieve( + requestParameters: CoursesApiCoursesRetrieveRequest, options?: RawAxiosRequestConfig, ) { return CoursesApiFp(this.configuration) - .coursesNewList( - requestParameters.course_feature, - requestParameters.department, - requestParameters.free, - requestParameters.learning_format, - requestParameters.level, - requestParameters.limit, - requestParameters.offered_by, - requestParameters.offset, - requestParameters.platform, - requestParameters.professional, - requestParameters.readable_id, - requestParameters.resource_type, - requestParameters.sortby, - requestParameters.topic, - options, - ) - .then((request) => request(this.axios, this.basePath)) - } - - /** - * Retrieve a list of popular resources - * @summary List Popular - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof CoursesApi - */ - public coursesPopularRetrieve(options?: RawAxiosRequestConfig) { - return CoursesApiFp(this.configuration) - .coursesPopularRetrieve(options) + .coursesRetrieve(requestParameters.id, options) .then((request) => request(this.axios, this.basePath)) } - - /** - * Retrieve a single course - * @summary Retrieve - * @param {CoursesApiCoursesRetrieveRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof CoursesApi - */ - public coursesRetrieve( - requestParameters: CoursesApiCoursesRetrieveRequest, - options?: RawAxiosRequestConfig, - ) { - return CoursesApiFp(this.configuration) - .coursesRetrieve(requestParameters.id, options) - .then((request) => request(this.axios, this.basePath)) - } - - /** - * Get a paginated list of upcoming Courses. - * @summary List Upcoming - * @param {CoursesApiCoursesUpcomingListRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof CoursesApi - */ - public coursesUpcomingList( - requestParameters: CoursesApiCoursesUpcomingListRequest = {}, - options?: RawAxiosRequestConfig, - ) { - return CoursesApiFp(this.configuration) - .coursesUpcomingList( - requestParameters.course_feature, - requestParameters.department, - requestParameters.free, - requestParameters.learning_format, - requestParameters.level, - requestParameters.limit, - requestParameters.offered_by, - requestParameters.offset, - requestParameters.platform, - requestParameters.professional, - requestParameters.readable_id, - requestParameters.resource_type, - requestParameters.sortby, - requestParameters.topic, - options, - ) - .then((request) => request(this.axios, this.basePath)) - } -} +} /** * @export @@ -8677,402 +7945,134 @@ export type CoursesListResourceTypeEnum = * @export */ export const CoursesListSortbyEnum = { - CreatedOn: "-created_on", Id: "-id", LastModified: "-last_modified", Mitcoursenumber: "-mitcoursenumber", ReadableId: "-readable_id", StartDate: "-start_date", Views: "-views", - CreatedOn2: "created_on", Id2: "id", LastModified2: "last_modified", Mitcoursenumber2: "mitcoursenumber", + New: "new", ReadableId2: "readable_id", StartDate2: "start_date", + Upcoming: "upcoming", Views2: "views", } as const export type CoursesListSortbyEnum = (typeof CoursesListSortbyEnum)[keyof typeof CoursesListSortbyEnum] + /** + * DepartmentsApi - axios parameter creator * @export */ -export const CoursesNewListDepartmentEnum = { - _1: "1", - _10: "10", - _11: "11", - _12: "12", - _14: "14", - _15: "15", - _16: "16", - _17: "17", - _18: "18", - _2: "2", - _20: "20", - _21A: "21A", - _21G: "21G", - _21H: "21H", - _21L: "21L", - _21M: "21M", - _22: "22", - _24: "24", - _3: "3", - _4: "4", - _5: "5", - _6: "6", - _7: "7", - _8: "8", - _9: "9", - Cc: "CC", - CmsW: "CMS-W", - Ec: "EC", - Es: "ES", - Esd: "ESD", - Hst: "HST", - Ids: "IDS", - Mas: "MAS", - Pe: "PE", - Res: "RES", - Sts: "STS", - Wgs: "WGS", -} as const -export type CoursesNewListDepartmentEnum = - (typeof CoursesNewListDepartmentEnum)[keyof typeof CoursesNewListDepartmentEnum] -/** - * @export - */ -export const CoursesNewListLevelEnum = { - Advanced: "advanced", - Graduate: "graduate", - HighSchool: "high_school", - Intermediate: "intermediate", - Introductory: "introductory", - Noncredit: "noncredit", - Undergraduate: "undergraduate", -} as const -export type CoursesNewListLevelEnum = - (typeof CoursesNewListLevelEnum)[keyof typeof CoursesNewListLevelEnum] -/** - * @export - */ -export const CoursesNewListOfferedByEnum = { - Bootcamps: "bootcamps", - Csail: "csail", - Ctl: "ctl", - Mitpe: "mitpe", - Mitx: "mitx", - Ocw: "ocw", - Scc: "scc", - See: "see", - Xpro: "xpro", -} as const -export type CoursesNewListOfferedByEnum = - (typeof CoursesNewListOfferedByEnum)[keyof typeof CoursesNewListOfferedByEnum] -/** - * @export - */ -export const CoursesNewListPlatformEnum = { - Bootcamps: "bootcamps", - Csail: "csail", - Ctl: "ctl", - Edx: "edx", - Emeritus: "emeritus", - Globalalumni: "globalalumni", - Mitpe: "mitpe", - Mitxonline: "mitxonline", - Ocw: "ocw", - Oll: "oll", - Podcast: "podcast", - Scc: "scc", - See: "see", - Simplilearn: "simplilearn", - Susskind: "susskind", - Whu: "whu", - Xpro: "xpro", - Youtube: "youtube", -} as const -export type CoursesNewListPlatformEnum = - (typeof CoursesNewListPlatformEnum)[keyof typeof CoursesNewListPlatformEnum] -/** - * @export - */ -export const CoursesNewListResourceTypeEnum = { - Course: "course", - LearningPath: "learning_path", - Podcast: "podcast", - PodcastEpisode: "podcast_episode", - Program: "program", - Video: "video", - VideoPlaylist: "video_playlist", -} as const -export type CoursesNewListResourceTypeEnum = - (typeof CoursesNewListResourceTypeEnum)[keyof typeof CoursesNewListResourceTypeEnum] +export const DepartmentsApiAxiosParamCreator = function ( + configuration?: Configuration, +) { + return { + /** + * MIT academic departments + * @summary List + * @param {number} [limit] Number of results to return per page. + * @param {number} [offset] The initial index from which to return the results. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + departmentsList: async ( + limit?: number, + offset?: number, + options: RawAxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/api/v1/departments/` + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { + method: "GET", + ...baseOptions, + ...options, + } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + if (limit !== undefined) { + localVarQueryParameter["limit"] = limit + } + + if (offset !== undefined) { + localVarQueryParameter["offset"] = offset + } + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * MIT academic departments + * @summary Retrieve + * @param {string} department_id A unique value identifying this learning resource department. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + departmentsRetrieve: async ( + department_id: string, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'department_id' is not null or undefined + assertParamExists("departmentsRetrieve", "department_id", department_id) + const localVarPath = `/api/v1/departments/{department_id}/`.replace( + `{${"department_id"}}`, + encodeURIComponent(String(department_id)), + ) + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { + method: "GET", + ...baseOptions, + ...options, + } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + } +} + /** - * @export - */ -export const CoursesNewListSortbyEnum = { - CreatedOn: "-created_on", - Id: "-id", - LastModified: "-last_modified", - Mitcoursenumber: "-mitcoursenumber", - ReadableId: "-readable_id", - StartDate: "-start_date", - Views: "-views", - CreatedOn2: "created_on", - Id2: "id", - LastModified2: "last_modified", - Mitcoursenumber2: "mitcoursenumber", - ReadableId2: "readable_id", - StartDate2: "start_date", - Views2: "views", -} as const -export type CoursesNewListSortbyEnum = - (typeof CoursesNewListSortbyEnum)[keyof typeof CoursesNewListSortbyEnum] -/** - * @export - */ -export const CoursesUpcomingListDepartmentEnum = { - _1: "1", - _10: "10", - _11: "11", - _12: "12", - _14: "14", - _15: "15", - _16: "16", - _17: "17", - _18: "18", - _2: "2", - _20: "20", - _21A: "21A", - _21G: "21G", - _21H: "21H", - _21L: "21L", - _21M: "21M", - _22: "22", - _24: "24", - _3: "3", - _4: "4", - _5: "5", - _6: "6", - _7: "7", - _8: "8", - _9: "9", - Cc: "CC", - CmsW: "CMS-W", - Ec: "EC", - Es: "ES", - Esd: "ESD", - Hst: "HST", - Ids: "IDS", - Mas: "MAS", - Pe: "PE", - Res: "RES", - Sts: "STS", - Wgs: "WGS", -} as const -export type CoursesUpcomingListDepartmentEnum = - (typeof CoursesUpcomingListDepartmentEnum)[keyof typeof CoursesUpcomingListDepartmentEnum] -/** - * @export - */ -export const CoursesUpcomingListLevelEnum = { - Advanced: "advanced", - Graduate: "graduate", - HighSchool: "high_school", - Intermediate: "intermediate", - Introductory: "introductory", - Noncredit: "noncredit", - Undergraduate: "undergraduate", -} as const -export type CoursesUpcomingListLevelEnum = - (typeof CoursesUpcomingListLevelEnum)[keyof typeof CoursesUpcomingListLevelEnum] -/** - * @export - */ -export const CoursesUpcomingListOfferedByEnum = { - Bootcamps: "bootcamps", - Csail: "csail", - Ctl: "ctl", - Mitpe: "mitpe", - Mitx: "mitx", - Ocw: "ocw", - Scc: "scc", - See: "see", - Xpro: "xpro", -} as const -export type CoursesUpcomingListOfferedByEnum = - (typeof CoursesUpcomingListOfferedByEnum)[keyof typeof CoursesUpcomingListOfferedByEnum] -/** - * @export - */ -export const CoursesUpcomingListPlatformEnum = { - Bootcamps: "bootcamps", - Csail: "csail", - Ctl: "ctl", - Edx: "edx", - Emeritus: "emeritus", - Globalalumni: "globalalumni", - Mitpe: "mitpe", - Mitxonline: "mitxonline", - Ocw: "ocw", - Oll: "oll", - Podcast: "podcast", - Scc: "scc", - See: "see", - Simplilearn: "simplilearn", - Susskind: "susskind", - Whu: "whu", - Xpro: "xpro", - Youtube: "youtube", -} as const -export type CoursesUpcomingListPlatformEnum = - (typeof CoursesUpcomingListPlatformEnum)[keyof typeof CoursesUpcomingListPlatformEnum] -/** - * @export - */ -export const CoursesUpcomingListResourceTypeEnum = { - Course: "course", - LearningPath: "learning_path", - Podcast: "podcast", - PodcastEpisode: "podcast_episode", - Program: "program", - Video: "video", - VideoPlaylist: "video_playlist", -} as const -export type CoursesUpcomingListResourceTypeEnum = - (typeof CoursesUpcomingListResourceTypeEnum)[keyof typeof CoursesUpcomingListResourceTypeEnum] -/** - * @export - */ -export const CoursesUpcomingListSortbyEnum = { - CreatedOn: "-created_on", - Id: "-id", - LastModified: "-last_modified", - Mitcoursenumber: "-mitcoursenumber", - ReadableId: "-readable_id", - StartDate: "-start_date", - Views: "-views", - CreatedOn2: "created_on", - Id2: "id", - LastModified2: "last_modified", - Mitcoursenumber2: "mitcoursenumber", - ReadableId2: "readable_id", - StartDate2: "start_date", - Views2: "views", -} as const -export type CoursesUpcomingListSortbyEnum = - (typeof CoursesUpcomingListSortbyEnum)[keyof typeof CoursesUpcomingListSortbyEnum] - -/** - * DepartmentsApi - axios parameter creator - * @export - */ -export const DepartmentsApiAxiosParamCreator = function ( - configuration?: Configuration, -) { - return { - /** - * MIT academic departments - * @summary List - * @param {number} [limit] Number of results to return per page. - * @param {number} [offset] The initial index from which to return the results. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - departmentsList: async ( - limit?: number, - offset?: number, - options: RawAxiosRequestConfig = {}, - ): Promise => { - const localVarPath = `/api/v1/departments/` - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) - let baseOptions - if (configuration) { - baseOptions = configuration.baseOptions - } - - const localVarRequestOptions = { - method: "GET", - ...baseOptions, - ...options, - } - const localVarHeaderParameter = {} as any - const localVarQueryParameter = {} as any - - if (limit !== undefined) { - localVarQueryParameter["limit"] = limit - } - - if (offset !== undefined) { - localVarQueryParameter["offset"] = offset - } - - setSearchParams(localVarUrlObj, localVarQueryParameter) - let headersFromBaseOptions = - baseOptions && baseOptions.headers ? baseOptions.headers : {} - localVarRequestOptions.headers = { - ...localVarHeaderParameter, - ...headersFromBaseOptions, - ...options.headers, - } - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - } - }, - /** - * MIT academic departments - * @summary Retrieve - * @param {string} department_id A unique value identifying this learning resource department. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - departmentsRetrieve: async ( - department_id: string, - options: RawAxiosRequestConfig = {}, - ): Promise => { - // verify required parameter 'department_id' is not null or undefined - assertParamExists("departmentsRetrieve", "department_id", department_id) - const localVarPath = `/api/v1/departments/{department_id}/`.replace( - `{${"department_id"}}`, - encodeURIComponent(String(department_id)), - ) - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) - let baseOptions - if (configuration) { - baseOptions = configuration.baseOptions - } - - const localVarRequestOptions = { - method: "GET", - ...baseOptions, - ...options, - } - const localVarHeaderParameter = {} as any - const localVarQueryParameter = {} as any - - setSearchParams(localVarUrlObj, localVarQueryParameter) - let headersFromBaseOptions = - baseOptions && baseOptions.headers ? baseOptions.headers : {} - localVarRequestOptions.headers = { - ...localVarHeaderParameter, - ...headersFromBaseOptions, - ...options.headers, - } - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - } - }, - } -} - -/** - * DepartmentsApi - functional programming interface + * DepartmentsApi - functional programming interface * @export */ export const DepartmentsApiFp = function (configuration?: Configuration) { @@ -9579,7 +8579,7 @@ export const LearningResourcesApiAxiosParamCreator = function ( * @param {boolean} [professional] * @param {Array} [readable_id] Multiple values may be separated by commas. * @param {Array} [resource_type] The type of learning resource * `course` - Course * `program` - Program * `learning_path` - Learning Path * `podcast` - Podcast * `podcast_episode` - Podcast Episode * `video` - Video * `video_playlist` - Video Playlist - * @param {LearningResourcesListSortbyEnum} [sortby] Sort By * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `created_on` - Creation Date ascending * `-created_on` - CreationDate descending * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending + * @param {LearningResourcesListSortbyEnum} [sortby] Sort By * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `new` - Newest resources first * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending * `upcoming` - Next start date ascending * @param {Array} [topic] Multiple values may be separated by commas. * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -9692,43 +8692,22 @@ export const LearningResourcesApiAxiosParamCreator = function ( } }, /** - * Get a paginated list of popular Learning Resources. - * @summary List New - * @param {Array} [course_feature] Multiple values may be separated by commas. - * @param {Array} [department] The department that offers learning resources * `1` - Civil and Environmental Engineering * `2` - Mechanical Engineering * `3` - Materials Science and Engineering * `4` - Architecture * `5` - Chemistry * `6` - Electrical Engineering and Computer Science * `7` - Biology * `8` - Physics * `9` - Brain and Cognitive Sciences * `10` - Chemical Engineering * `11` - Urban Studies and Planning * `12` - Earth, Atmospheric, and Planetary Sciences * `14` - Economics * `15` - Sloan School of Management * `16` - Aeronautics and Astronautics * `17` - Political Science * `18` - Mathematics * `20` - Biological Engineering * `21A` - Anthropology * `21G` - Global Studies and Languages * `21H` - History * `21L` - Literature * `21M` - Music and Theater Arts * `22` - Nuclear Science and Engineering * `24` - Linguistics and Philosophy * `CC` - Concourse * `CMS-W` - Comparative Media Studies/Writing * `EC` - Edgerton Center * `ES` - Experimental Study Group * `ESD` - Engineering Systems Division * `HST` - Health Sciences and Technology * `IDS` - Institute for Data, Systems, and Society * `MAS` - Media Arts and Sciences * `PE` - Athletics, Physical Education and Recreation * `RES` - Supplemental Resources * `STS` - Science, Technology, and Society * `WGS` - Women\'s and Gender Studies - * @param {boolean} [free] The course/program is offered for free - * @param {Array>} [learning_format] The learning format of course/program resources * `online` - Online * `hybrid` - Hybrid * `in_person` - In person - * @param {Array} [level] The academic level of the resources * `undergraduate` - Undergraduate * `graduate` - Graduate * `high_school` - High School * `noncredit` - Non-Credit * `advanced` - Advanced * `intermediate` - Intermediate * `introductory` - Introductory - * @param {number} [limit] Number of results to return per page. - * @param {Array} [offered_by] The organization that offers a learning resource * `mitx` - MITx * `ocw` - OCW * `bootcamps` - Bootcamps * `xpro` - xPRO * `csail` - CSAIL * `mitpe` - Professional Education * `see` - Sloan Executive Education * `scc` - Schwarzman College of Computing * `ctl` - Center for Transportation & Logistics - * @param {number} [offset] The initial index from which to return the results. - * @param {Array} [platform] The platform on which learning resources are offered * `edx` - edX * `ocw` - OCW * `oll` - Open Learning Library * `mitxonline` - MITx Online * `bootcamps` - Bootcamps * `xpro` - xPRO * `csail` - CSAIL * `mitpe` - Professional Education * `see` - Sloan Executive Education * `scc` - Schwarzman College of Computing * `ctl` - Center for Transportation & Logistics * `whu` - WHU * `susskind` - Susskind * `globalalumni` - Global Alumni * `simplilearn` - Simplilearn * `emeritus` - Emeritus * `podcast` - Podcast * `youtube` - YouTube - * @param {boolean} [professional] - * @param {Array} [readable_id] Multiple values may be separated by commas. - * @param {Array} [resource_type] The type of learning resource * `course` - Course * `program` - Program * `learning_path` - Learning Path * `podcast` - Podcast * `podcast_episode` - Podcast Episode * `video` - Video * `video_playlist` - Video Playlist - * @param {LearningResourcesNewListSortbyEnum} [sortby] Sort By * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `created_on` - Creation Date ascending * `-created_on` - CreationDate descending * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending - * @param {Array} [topic] Multiple values may be separated by commas. + * Retrieve a single learning resource. + * @summary Retrieve + * @param {number} id A unique integer value identifying this learning resource. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - learningResourcesNewList: async ( - course_feature?: Array, - department?: Array, - free?: boolean, - learning_format?: Array>, - level?: Array, - limit?: number, - offered_by?: Array, - offset?: number, - platform?: Array, - professional?: boolean, - readable_id?: Array, - resource_type?: Array, - sortby?: LearningResourcesNewListSortbyEnum, - topic?: Array, + learningResourcesRetrieve: async ( + id: number, options: RawAxiosRequestConfig = {}, ): Promise => { - const localVarPath = `/api/v1/learning_resources/new/` + // verify required parameter 'id' is not null or undefined + assertParamExists("learningResourcesRetrieve", "id", id) + const localVarPath = `/api/v1/learning_resources/{id}/`.replace( + `{${"id"}}`, + encodeURIComponent(String(id)), + ) // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) let baseOptions @@ -9744,278 +8723,6 @@ export const LearningResourcesApiAxiosParamCreator = function ( const localVarHeaderParameter = {} as any const localVarQueryParameter = {} as any - if (course_feature) { - localVarQueryParameter["course_feature"] = course_feature.join( - COLLECTION_FORMATS.csv, - ) - } - - if (department) { - localVarQueryParameter["department"] = department - } - - if (free !== undefined) { - localVarQueryParameter["free"] = free - } - - if (learning_format) { - localVarQueryParameter["learning_format"] = learning_format - } - - if (level) { - localVarQueryParameter["level"] = level - } - - if (limit !== undefined) { - localVarQueryParameter["limit"] = limit - } - - if (offered_by) { - localVarQueryParameter["offered_by"] = offered_by - } - - if (offset !== undefined) { - localVarQueryParameter["offset"] = offset - } - - if (platform) { - localVarQueryParameter["platform"] = platform - } - - if (professional !== undefined) { - localVarQueryParameter["professional"] = professional - } - - if (readable_id) { - localVarQueryParameter["readable_id"] = readable_id.join( - COLLECTION_FORMATS.csv, - ) - } - - if (resource_type) { - localVarQueryParameter["resource_type"] = resource_type - } - - if (sortby !== undefined) { - localVarQueryParameter["sortby"] = sortby - } - - if (topic) { - localVarQueryParameter["topic"] = topic.join(COLLECTION_FORMATS.csv) - } - - setSearchParams(localVarUrlObj, localVarQueryParameter) - let headersFromBaseOptions = - baseOptions && baseOptions.headers ? baseOptions.headers : {} - localVarRequestOptions.headers = { - ...localVarHeaderParameter, - ...headersFromBaseOptions, - ...options.headers, - } - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - } - }, - /** - * Retrieve a list of popular resources - * @summary List Popular - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - learningResourcesPopularRetrieve: async ( - options: RawAxiosRequestConfig = {}, - ): Promise => { - const localVarPath = `/api/v1/learning_resources/popular/` - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) - let baseOptions - if (configuration) { - baseOptions = configuration.baseOptions - } - - const localVarRequestOptions = { - method: "GET", - ...baseOptions, - ...options, - } - const localVarHeaderParameter = {} as any - const localVarQueryParameter = {} as any - - setSearchParams(localVarUrlObj, localVarQueryParameter) - let headersFromBaseOptions = - baseOptions && baseOptions.headers ? baseOptions.headers : {} - localVarRequestOptions.headers = { - ...localVarHeaderParameter, - ...headersFromBaseOptions, - ...options.headers, - } - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - } - }, - /** - * Retrieve a single learning resource. - * @summary Retrieve - * @param {number} id A unique integer value identifying this learning resource. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - learningResourcesRetrieve: async ( - id: number, - options: RawAxiosRequestConfig = {}, - ): Promise => { - // verify required parameter 'id' is not null or undefined - assertParamExists("learningResourcesRetrieve", "id", id) - const localVarPath = `/api/v1/learning_resources/{id}/`.replace( - `{${"id"}}`, - encodeURIComponent(String(id)), - ) - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) - let baseOptions - if (configuration) { - baseOptions = configuration.baseOptions - } - - const localVarRequestOptions = { - method: "GET", - ...baseOptions, - ...options, - } - const localVarHeaderParameter = {} as any - const localVarQueryParameter = {} as any - - setSearchParams(localVarUrlObj, localVarQueryParameter) - let headersFromBaseOptions = - baseOptions && baseOptions.headers ? baseOptions.headers : {} - localVarRequestOptions.headers = { - ...localVarHeaderParameter, - ...headersFromBaseOptions, - ...options.headers, - } - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - } - }, - /** - * Get a paginated list of upcoming Learning Resources. - * @summary List Upcoming - * @param {Array} [course_feature] Multiple values may be separated by commas. - * @param {Array} [department] The department that offers learning resources * `1` - Civil and Environmental Engineering * `2` - Mechanical Engineering * `3` - Materials Science and Engineering * `4` - Architecture * `5` - Chemistry * `6` - Electrical Engineering and Computer Science * `7` - Biology * `8` - Physics * `9` - Brain and Cognitive Sciences * `10` - Chemical Engineering * `11` - Urban Studies and Planning * `12` - Earth, Atmospheric, and Planetary Sciences * `14` - Economics * `15` - Sloan School of Management * `16` - Aeronautics and Astronautics * `17` - Political Science * `18` - Mathematics * `20` - Biological Engineering * `21A` - Anthropology * `21G` - Global Studies and Languages * `21H` - History * `21L` - Literature * `21M` - Music and Theater Arts * `22` - Nuclear Science and Engineering * `24` - Linguistics and Philosophy * `CC` - Concourse * `CMS-W` - Comparative Media Studies/Writing * `EC` - Edgerton Center * `ES` - Experimental Study Group * `ESD` - Engineering Systems Division * `HST` - Health Sciences and Technology * `IDS` - Institute for Data, Systems, and Society * `MAS` - Media Arts and Sciences * `PE` - Athletics, Physical Education and Recreation * `RES` - Supplemental Resources * `STS` - Science, Technology, and Society * `WGS` - Women\'s and Gender Studies - * @param {boolean} [free] The course/program is offered for free - * @param {Array>} [learning_format] The learning format of course/program resources * `online` - Online * `hybrid` - Hybrid * `in_person` - In person - * @param {Array} [level] The academic level of the resources * `undergraduate` - Undergraduate * `graduate` - Graduate * `high_school` - High School * `noncredit` - Non-Credit * `advanced` - Advanced * `intermediate` - Intermediate * `introductory` - Introductory - * @param {number} [limit] Number of results to return per page. - * @param {Array} [offered_by] The organization that offers a learning resource * `mitx` - MITx * `ocw` - OCW * `bootcamps` - Bootcamps * `xpro` - xPRO * `csail` - CSAIL * `mitpe` - Professional Education * `see` - Sloan Executive Education * `scc` - Schwarzman College of Computing * `ctl` - Center for Transportation & Logistics - * @param {number} [offset] The initial index from which to return the results. - * @param {Array} [platform] The platform on which learning resources are offered * `edx` - edX * `ocw` - OCW * `oll` - Open Learning Library * `mitxonline` - MITx Online * `bootcamps` - Bootcamps * `xpro` - xPRO * `csail` - CSAIL * `mitpe` - Professional Education * `see` - Sloan Executive Education * `scc` - Schwarzman College of Computing * `ctl` - Center for Transportation & Logistics * `whu` - WHU * `susskind` - Susskind * `globalalumni` - Global Alumni * `simplilearn` - Simplilearn * `emeritus` - Emeritus * `podcast` - Podcast * `youtube` - YouTube - * @param {boolean} [professional] - * @param {Array} [readable_id] Multiple values may be separated by commas. - * @param {Array} [resource_type] The type of learning resource * `course` - Course * `program` - Program * `learning_path` - Learning Path * `podcast` - Podcast * `podcast_episode` - Podcast Episode * `video` - Video * `video_playlist` - Video Playlist - * @param {LearningResourcesUpcomingListSortbyEnum} [sortby] Sort By * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `created_on` - Creation Date ascending * `-created_on` - CreationDate descending * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending - * @param {Array} [topic] Multiple values may be separated by commas. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - learningResourcesUpcomingList: async ( - course_feature?: Array, - department?: Array, - free?: boolean, - learning_format?: Array>, - level?: Array, - limit?: number, - offered_by?: Array, - offset?: number, - platform?: Array, - professional?: boolean, - readable_id?: Array, - resource_type?: Array, - sortby?: LearningResourcesUpcomingListSortbyEnum, - topic?: Array, - options: RawAxiosRequestConfig = {}, - ): Promise => { - const localVarPath = `/api/v1/learning_resources/upcoming/` - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) - let baseOptions - if (configuration) { - baseOptions = configuration.baseOptions - } - - const localVarRequestOptions = { - method: "GET", - ...baseOptions, - ...options, - } - const localVarHeaderParameter = {} as any - const localVarQueryParameter = {} as any - - if (course_feature) { - localVarQueryParameter["course_feature"] = course_feature.join( - COLLECTION_FORMATS.csv, - ) - } - - if (department) { - localVarQueryParameter["department"] = department - } - - if (free !== undefined) { - localVarQueryParameter["free"] = free - } - - if (learning_format) { - localVarQueryParameter["learning_format"] = learning_format - } - - if (level) { - localVarQueryParameter["level"] = level - } - - if (limit !== undefined) { - localVarQueryParameter["limit"] = limit - } - - if (offered_by) { - localVarQueryParameter["offered_by"] = offered_by - } - - if (offset !== undefined) { - localVarQueryParameter["offset"] = offset - } - - if (platform) { - localVarQueryParameter["platform"] = platform - } - - if (professional !== undefined) { - localVarQueryParameter["professional"] = professional - } - - if (readable_id) { - localVarQueryParameter["readable_id"] = readable_id.join( - COLLECTION_FORMATS.csv, - ) - } - - if (resource_type) { - localVarQueryParameter["resource_type"] = resource_type - } - - if (sortby !== undefined) { - localVarQueryParameter["sortby"] = sortby - } - - if (topic) { - localVarQueryParameter["topic"] = topic.join(COLLECTION_FORMATS.csv) - } - setSearchParams(localVarUrlObj, localVarQueryParameter) let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} @@ -10225,7 +8932,7 @@ export const LearningResourcesApiFp = function (configuration?: Configuration) { * @param {boolean} [professional] * @param {Array} [readable_id] Multiple values may be separated by commas. * @param {Array} [resource_type] The type of learning resource * `course` - Course * `program` - Program * `learning_path` - Learning Path * `podcast` - Podcast * `podcast_episode` - Podcast Episode * `video` - Video * `video_playlist` - Video Playlist - * @param {LearningResourcesListSortbyEnum} [sortby] Sort By * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `created_on` - Creation Date ascending * `-created_on` - CreationDate descending * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending + * @param {LearningResourcesListSortbyEnum} [sortby] Sort By * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `new` - Newest resources first * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending * `upcoming` - Next start date ascending * @param {Array} [topic] Multiple values may be separated by commas. * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -10283,110 +8990,6 @@ export const LearningResourcesApiFp = function (configuration?: Configuration) { configuration, )(axios, operationBasePath || basePath) }, - /** - * Get a paginated list of popular Learning Resources. - * @summary List New - * @param {Array} [course_feature] Multiple values may be separated by commas. - * @param {Array} [department] The department that offers learning resources * `1` - Civil and Environmental Engineering * `2` - Mechanical Engineering * `3` - Materials Science and Engineering * `4` - Architecture * `5` - Chemistry * `6` - Electrical Engineering and Computer Science * `7` - Biology * `8` - Physics * `9` - Brain and Cognitive Sciences * `10` - Chemical Engineering * `11` - Urban Studies and Planning * `12` - Earth, Atmospheric, and Planetary Sciences * `14` - Economics * `15` - Sloan School of Management * `16` - Aeronautics and Astronautics * `17` - Political Science * `18` - Mathematics * `20` - Biological Engineering * `21A` - Anthropology * `21G` - Global Studies and Languages * `21H` - History * `21L` - Literature * `21M` - Music and Theater Arts * `22` - Nuclear Science and Engineering * `24` - Linguistics and Philosophy * `CC` - Concourse * `CMS-W` - Comparative Media Studies/Writing * `EC` - Edgerton Center * `ES` - Experimental Study Group * `ESD` - Engineering Systems Division * `HST` - Health Sciences and Technology * `IDS` - Institute for Data, Systems, and Society * `MAS` - Media Arts and Sciences * `PE` - Athletics, Physical Education and Recreation * `RES` - Supplemental Resources * `STS` - Science, Technology, and Society * `WGS` - Women\'s and Gender Studies - * @param {boolean} [free] The course/program is offered for free - * @param {Array>} [learning_format] The learning format of course/program resources * `online` - Online * `hybrid` - Hybrid * `in_person` - In person - * @param {Array} [level] The academic level of the resources * `undergraduate` - Undergraduate * `graduate` - Graduate * `high_school` - High School * `noncredit` - Non-Credit * `advanced` - Advanced * `intermediate` - Intermediate * `introductory` - Introductory - * @param {number} [limit] Number of results to return per page. - * @param {Array} [offered_by] The organization that offers a learning resource * `mitx` - MITx * `ocw` - OCW * `bootcamps` - Bootcamps * `xpro` - xPRO * `csail` - CSAIL * `mitpe` - Professional Education * `see` - Sloan Executive Education * `scc` - Schwarzman College of Computing * `ctl` - Center for Transportation & Logistics - * @param {number} [offset] The initial index from which to return the results. - * @param {Array} [platform] The platform on which learning resources are offered * `edx` - edX * `ocw` - OCW * `oll` - Open Learning Library * `mitxonline` - MITx Online * `bootcamps` - Bootcamps * `xpro` - xPRO * `csail` - CSAIL * `mitpe` - Professional Education * `see` - Sloan Executive Education * `scc` - Schwarzman College of Computing * `ctl` - Center for Transportation & Logistics * `whu` - WHU * `susskind` - Susskind * `globalalumni` - Global Alumni * `simplilearn` - Simplilearn * `emeritus` - Emeritus * `podcast` - Podcast * `youtube` - YouTube - * @param {boolean} [professional] - * @param {Array} [readable_id] Multiple values may be separated by commas. - * @param {Array} [resource_type] The type of learning resource * `course` - Course * `program` - Program * `learning_path` - Learning Path * `podcast` - Podcast * `podcast_episode` - Podcast Episode * `video` - Video * `video_playlist` - Video Playlist - * @param {LearningResourcesNewListSortbyEnum} [sortby] Sort By * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `created_on` - Creation Date ascending * `-created_on` - CreationDate descending * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending - * @param {Array} [topic] Multiple values may be separated by commas. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async learningResourcesNewList( - course_feature?: Array, - department?: Array, - free?: boolean, - learning_format?: Array>, - level?: Array, - limit?: number, - offered_by?: Array, - offset?: number, - platform?: Array, - professional?: boolean, - readable_id?: Array, - resource_type?: Array, - sortby?: LearningResourcesNewListSortbyEnum, - topic?: Array, - options?: RawAxiosRequestConfig, - ): Promise< - ( - axios?: AxiosInstance, - basePath?: string, - ) => AxiosPromise - > { - const localVarAxiosArgs = - await localVarAxiosParamCreator.learningResourcesNewList( - course_feature, - department, - free, - learning_format, - level, - limit, - offered_by, - offset, - platform, - professional, - readable_id, - resource_type, - sortby, - topic, - options, - ) - const index = configuration?.serverIndex ?? 0 - const operationBasePath = - operationServerMap["LearningResourcesApi.learningResourcesNewList"]?.[ - index - ]?.url - return (axios, basePath) => - createRequestFunction( - localVarAxiosArgs, - globalAxios, - BASE_PATH, - configuration, - )(axios, operationBasePath || basePath) - }, - /** - * Retrieve a list of popular resources - * @summary List Popular - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async learningResourcesPopularRetrieve( - options?: RawAxiosRequestConfig, - ): Promise< - ( - axios?: AxiosInstance, - basePath?: string, - ) => AxiosPromise - > { - const localVarAxiosArgs = - await localVarAxiosParamCreator.learningResourcesPopularRetrieve( - options, - ) - const index = configuration?.serverIndex ?? 0 - const operationBasePath = - operationServerMap[ - "LearningResourcesApi.learningResourcesPopularRetrieve" - ]?.[index]?.url - return (axios, basePath) => - createRequestFunction( - localVarAxiosArgs, - globalAxios, - BASE_PATH, - configuration, - )(axios, operationBasePath || basePath) - }, /** * Retrieve a single learning resource. * @summary Retrieve @@ -10418,79 +9021,6 @@ export const LearningResourcesApiFp = function (configuration?: Configuration) { configuration, )(axios, operationBasePath || basePath) }, - /** - * Get a paginated list of upcoming Learning Resources. - * @summary List Upcoming - * @param {Array} [course_feature] Multiple values may be separated by commas. - * @param {Array} [department] The department that offers learning resources * `1` - Civil and Environmental Engineering * `2` - Mechanical Engineering * `3` - Materials Science and Engineering * `4` - Architecture * `5` - Chemistry * `6` - Electrical Engineering and Computer Science * `7` - Biology * `8` - Physics * `9` - Brain and Cognitive Sciences * `10` - Chemical Engineering * `11` - Urban Studies and Planning * `12` - Earth, Atmospheric, and Planetary Sciences * `14` - Economics * `15` - Sloan School of Management * `16` - Aeronautics and Astronautics * `17` - Political Science * `18` - Mathematics * `20` - Biological Engineering * `21A` - Anthropology * `21G` - Global Studies and Languages * `21H` - History * `21L` - Literature * `21M` - Music and Theater Arts * `22` - Nuclear Science and Engineering * `24` - Linguistics and Philosophy * `CC` - Concourse * `CMS-W` - Comparative Media Studies/Writing * `EC` - Edgerton Center * `ES` - Experimental Study Group * `ESD` - Engineering Systems Division * `HST` - Health Sciences and Technology * `IDS` - Institute for Data, Systems, and Society * `MAS` - Media Arts and Sciences * `PE` - Athletics, Physical Education and Recreation * `RES` - Supplemental Resources * `STS` - Science, Technology, and Society * `WGS` - Women\'s and Gender Studies - * @param {boolean} [free] The course/program is offered for free - * @param {Array>} [learning_format] The learning format of course/program resources * `online` - Online * `hybrid` - Hybrid * `in_person` - In person - * @param {Array} [level] The academic level of the resources * `undergraduate` - Undergraduate * `graduate` - Graduate * `high_school` - High School * `noncredit` - Non-Credit * `advanced` - Advanced * `intermediate` - Intermediate * `introductory` - Introductory - * @param {number} [limit] Number of results to return per page. - * @param {Array} [offered_by] The organization that offers a learning resource * `mitx` - MITx * `ocw` - OCW * `bootcamps` - Bootcamps * `xpro` - xPRO * `csail` - CSAIL * `mitpe` - Professional Education * `see` - Sloan Executive Education * `scc` - Schwarzman College of Computing * `ctl` - Center for Transportation & Logistics - * @param {number} [offset] The initial index from which to return the results. - * @param {Array} [platform] The platform on which learning resources are offered * `edx` - edX * `ocw` - OCW * `oll` - Open Learning Library * `mitxonline` - MITx Online * `bootcamps` - Bootcamps * `xpro` - xPRO * `csail` - CSAIL * `mitpe` - Professional Education * `see` - Sloan Executive Education * `scc` - Schwarzman College of Computing * `ctl` - Center for Transportation & Logistics * `whu` - WHU * `susskind` - Susskind * `globalalumni` - Global Alumni * `simplilearn` - Simplilearn * `emeritus` - Emeritus * `podcast` - Podcast * `youtube` - YouTube - * @param {boolean} [professional] - * @param {Array} [readable_id] Multiple values may be separated by commas. - * @param {Array} [resource_type] The type of learning resource * `course` - Course * `program` - Program * `learning_path` - Learning Path * `podcast` - Podcast * `podcast_episode` - Podcast Episode * `video` - Video * `video_playlist` - Video Playlist - * @param {LearningResourcesUpcomingListSortbyEnum} [sortby] Sort By * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `created_on` - Creation Date ascending * `-created_on` - CreationDate descending * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending - * @param {Array} [topic] Multiple values may be separated by commas. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async learningResourcesUpcomingList( - course_feature?: Array, - department?: Array, - free?: boolean, - learning_format?: Array>, - level?: Array, - limit?: number, - offered_by?: Array, - offset?: number, - platform?: Array, - professional?: boolean, - readable_id?: Array, - resource_type?: Array, - sortby?: LearningResourcesUpcomingListSortbyEnum, - topic?: Array, - options?: RawAxiosRequestConfig, - ): Promise< - ( - axios?: AxiosInstance, - basePath?: string, - ) => AxiosPromise - > { - const localVarAxiosArgs = - await localVarAxiosParamCreator.learningResourcesUpcomingList( - course_feature, - department, - free, - learning_format, - level, - limit, - offered_by, - offset, - platform, - professional, - readable_id, - resource_type, - sortby, - topic, - options, - ) - const index = configuration?.serverIndex ?? 0 - const operationBasePath = - operationServerMap[ - "LearningResourcesApi.learningResourcesUpcomingList" - ]?.[index]?.url - return (axios, basePath) => - createRequestFunction( - localVarAxiosArgs, - globalAxios, - BASE_PATH, - configuration, - )(axios, operationBasePath || basePath) - }, } } @@ -10620,50 +9150,6 @@ export const LearningResourcesApiFactory = function ( ) .then((request) => request(axios, basePath)) }, - /** - * Get a paginated list of popular Learning Resources. - * @summary List New - * @param {LearningResourcesApiLearningResourcesNewListRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - learningResourcesNewList( - requestParameters: LearningResourcesApiLearningResourcesNewListRequest = {}, - options?: RawAxiosRequestConfig, - ): AxiosPromise { - return localVarFp - .learningResourcesNewList( - requestParameters.course_feature, - requestParameters.department, - requestParameters.free, - requestParameters.learning_format, - requestParameters.level, - requestParameters.limit, - requestParameters.offered_by, - requestParameters.offset, - requestParameters.platform, - requestParameters.professional, - requestParameters.readable_id, - requestParameters.resource_type, - requestParameters.sortby, - requestParameters.topic, - options, - ) - .then((request) => request(axios, basePath)) - }, - /** - * Retrieve a list of popular resources - * @summary List Popular - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - learningResourcesPopularRetrieve( - options?: RawAxiosRequestConfig, - ): AxiosPromise { - return localVarFp - .learningResourcesPopularRetrieve(options) - .then((request) => request(axios, basePath)) - }, /** * Retrieve a single learning resource. * @summary Retrieve @@ -10679,37 +9165,6 @@ export const LearningResourcesApiFactory = function ( .learningResourcesRetrieve(requestParameters.id, options) .then((request) => request(axios, basePath)) }, - /** - * Get a paginated list of upcoming Learning Resources. - * @summary List Upcoming - * @param {LearningResourcesApiLearningResourcesUpcomingListRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - learningResourcesUpcomingList( - requestParameters: LearningResourcesApiLearningResourcesUpcomingListRequest = {}, - options?: RawAxiosRequestConfig, - ): AxiosPromise { - return localVarFp - .learningResourcesUpcomingList( - requestParameters.course_feature, - requestParameters.department, - requestParameters.free, - requestParameters.learning_format, - requestParameters.level, - requestParameters.limit, - requestParameters.offered_by, - requestParameters.offset, - requestParameters.platform, - requestParameters.professional, - requestParameters.readable_id, - requestParameters.resource_type, - requestParameters.sortby, - requestParameters.topic, - options, - ) - .then((request) => request(axios, basePath)) - }, } } @@ -10944,8 +9399,8 @@ export interface LearningResourcesApiLearningResourcesListRequest { readonly resource_type?: Array /** - * Sort By * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `created_on` - Creation Date ascending * `-created_on` - CreationDate descending * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending - * @type {'-created_on' | '-id' | '-last_modified' | '-mitcoursenumber' | '-readable_id' | '-start_date' | '-views' | 'created_on' | 'id' | 'last_modified' | 'mitcoursenumber' | 'readable_id' | 'start_date' | 'views'} + * Sort By * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `new` - Newest resources first * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending * `upcoming` - Next start date ascending + * @type {'-id' | '-last_modified' | '-mitcoursenumber' | '-readable_id' | '-start_date' | '-views' | 'id' | 'last_modified' | 'mitcoursenumber' | 'new' | 'readable_id' | 'start_date' | 'upcoming' | 'views'} * @memberof LearningResourcesApiLearningResourcesList */ readonly sortby?: LearningResourcesListSortbyEnum @@ -10959,270 +9414,60 @@ export interface LearningResourcesApiLearningResourcesListRequest { } /** - * Request parameters for learningResourcesNewList operation in LearningResourcesApi. + * Request parameters for learningResourcesRetrieve operation in LearningResourcesApi. * @export - * @interface LearningResourcesApiLearningResourcesNewListRequest + * @interface LearningResourcesApiLearningResourcesRetrieveRequest */ -export interface LearningResourcesApiLearningResourcesNewListRequest { - /** - * Multiple values may be separated by commas. - * @type {Array} - * @memberof LearningResourcesApiLearningResourcesNewList - */ - readonly course_feature?: Array - - /** - * The department that offers learning resources * `1` - Civil and Environmental Engineering * `2` - Mechanical Engineering * `3` - Materials Science and Engineering * `4` - Architecture * `5` - Chemistry * `6` - Electrical Engineering and Computer Science * `7` - Biology * `8` - Physics * `9` - Brain and Cognitive Sciences * `10` - Chemical Engineering * `11` - Urban Studies and Planning * `12` - Earth, Atmospheric, and Planetary Sciences * `14` - Economics * `15` - Sloan School of Management * `16` - Aeronautics and Astronautics * `17` - Political Science * `18` - Mathematics * `20` - Biological Engineering * `21A` - Anthropology * `21G` - Global Studies and Languages * `21H` - History * `21L` - Literature * `21M` - Music and Theater Arts * `22` - Nuclear Science and Engineering * `24` - Linguistics and Philosophy * `CC` - Concourse * `CMS-W` - Comparative Media Studies/Writing * `EC` - Edgerton Center * `ES` - Experimental Study Group * `ESD` - Engineering Systems Division * `HST` - Health Sciences and Technology * `IDS` - Institute for Data, Systems, and Society * `MAS` - Media Arts and Sciences * `PE` - Athletics, Physical Education and Recreation * `RES` - Supplemental Resources * `STS` - Science, Technology, and Society * `WGS` - Women\'s and Gender Studies - * @type {Array<'1' | '10' | '11' | '12' | '14' | '15' | '16' | '17' | '18' | '2' | '20' | '21A' | '21G' | '21H' | '21L' | '21M' | '22' | '24' | '3' | '4' | '5' | '6' | '7' | '8' | '9' | 'CC' | 'CMS-W' | 'EC' | 'ES' | 'ESD' | 'HST' | 'IDS' | 'MAS' | 'PE' | 'RES' | 'STS' | 'WGS'>} - * @memberof LearningResourcesApiLearningResourcesNewList - */ - readonly department?: Array - +export interface LearningResourcesApiLearningResourcesRetrieveRequest { /** - * The course/program is offered for free - * @type {boolean} - * @memberof LearningResourcesApiLearningResourcesNewList + * A unique integer value identifying this learning resource. + * @type {number} + * @memberof LearningResourcesApiLearningResourcesRetrieve */ - readonly free?: boolean + readonly id: number +} +/** + * LearningResourcesApi - object-oriented interface + * @export + * @class LearningResourcesApi + * @extends {BaseAPI} + */ +export class LearningResourcesApi extends BaseAPI { /** - * The learning format of course/program resources * `online` - Online * `hybrid` - Hybrid * `in_person` - In person - * @type {Array>} - * @memberof LearningResourcesApiLearningResourcesNewList + * Show content files for a learning resource + * @summary Learning Resource Content File List + * @param {LearningResourcesApiLearningResourcesContentfilesListRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof LearningResourcesApi */ - readonly learning_format?: Array> + public learningResourcesContentfilesList( + requestParameters: LearningResourcesApiLearningResourcesContentfilesListRequest, + options?: RawAxiosRequestConfig, + ) { + return LearningResourcesApiFp(this.configuration) + .learningResourcesContentfilesList( + requestParameters.learning_resource_id, + requestParameters.content_feature_type, + requestParameters.limit, + requestParameters.offered_by, + requestParameters.offset, + requestParameters.platform, + requestParameters.resource_id, + requestParameters.run_id, + options, + ) + .then((request) => request(this.axios, this.basePath)) + } /** - * The academic level of the resources * `undergraduate` - Undergraduate * `graduate` - Graduate * `high_school` - High School * `noncredit` - Non-Credit * `advanced` - Advanced * `intermediate` - Intermediate * `introductory` - Introductory - * @type {Array<'advanced' | 'graduate' | 'high_school' | 'intermediate' | 'introductory' | 'noncredit' | 'undergraduate'>} - * @memberof LearningResourcesApiLearningResourcesNewList - */ - readonly level?: Array - - /** - * Number of results to return per page. - * @type {number} - * @memberof LearningResourcesApiLearningResourcesNewList - */ - readonly limit?: number - - /** - * The organization that offers a learning resource * `mitx` - MITx * `ocw` - OCW * `bootcamps` - Bootcamps * `xpro` - xPRO * `csail` - CSAIL * `mitpe` - Professional Education * `see` - Sloan Executive Education * `scc` - Schwarzman College of Computing * `ctl` - Center for Transportation & Logistics - * @type {Array<'bootcamps' | 'csail' | 'ctl' | 'mitpe' | 'mitx' | 'ocw' | 'scc' | 'see' | 'xpro'>} - * @memberof LearningResourcesApiLearningResourcesNewList - */ - readonly offered_by?: Array - - /** - * The initial index from which to return the results. - * @type {number} - * @memberof LearningResourcesApiLearningResourcesNewList - */ - readonly offset?: number - - /** - * The platform on which learning resources are offered * `edx` - edX * `ocw` - OCW * `oll` - Open Learning Library * `mitxonline` - MITx Online * `bootcamps` - Bootcamps * `xpro` - xPRO * `csail` - CSAIL * `mitpe` - Professional Education * `see` - Sloan Executive Education * `scc` - Schwarzman College of Computing * `ctl` - Center for Transportation & Logistics * `whu` - WHU * `susskind` - Susskind * `globalalumni` - Global Alumni * `simplilearn` - Simplilearn * `emeritus` - Emeritus * `podcast` - Podcast * `youtube` - YouTube - * @type {Array<'bootcamps' | 'csail' | 'ctl' | 'edx' | 'emeritus' | 'globalalumni' | 'mitpe' | 'mitxonline' | 'ocw' | 'oll' | 'podcast' | 'scc' | 'see' | 'simplilearn' | 'susskind' | 'whu' | 'xpro' | 'youtube'>} - * @memberof LearningResourcesApiLearningResourcesNewList - */ - readonly platform?: Array - - /** - * - * @type {boolean} - * @memberof LearningResourcesApiLearningResourcesNewList - */ - readonly professional?: boolean - - /** - * Multiple values may be separated by commas. - * @type {Array} - * @memberof LearningResourcesApiLearningResourcesNewList - */ - readonly readable_id?: Array - - /** - * The type of learning resource * `course` - Course * `program` - Program * `learning_path` - Learning Path * `podcast` - Podcast * `podcast_episode` - Podcast Episode * `video` - Video * `video_playlist` - Video Playlist - * @type {Array<'course' | 'learning_path' | 'podcast' | 'podcast_episode' | 'program' | 'video' | 'video_playlist'>} - * @memberof LearningResourcesApiLearningResourcesNewList - */ - readonly resource_type?: Array - - /** - * Sort By * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `created_on` - Creation Date ascending * `-created_on` - CreationDate descending * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending - * @type {'-created_on' | '-id' | '-last_modified' | '-mitcoursenumber' | '-readable_id' | '-start_date' | '-views' | 'created_on' | 'id' | 'last_modified' | 'mitcoursenumber' | 'readable_id' | 'start_date' | 'views'} - * @memberof LearningResourcesApiLearningResourcesNewList - */ - readonly sortby?: LearningResourcesNewListSortbyEnum - - /** - * Multiple values may be separated by commas. - * @type {Array} - * @memberof LearningResourcesApiLearningResourcesNewList - */ - readonly topic?: Array -} - -/** - * Request parameters for learningResourcesRetrieve operation in LearningResourcesApi. - * @export - * @interface LearningResourcesApiLearningResourcesRetrieveRequest - */ -export interface LearningResourcesApiLearningResourcesRetrieveRequest { - /** - * A unique integer value identifying this learning resource. - * @type {number} - * @memberof LearningResourcesApiLearningResourcesRetrieve - */ - readonly id: number -} - -/** - * Request parameters for learningResourcesUpcomingList operation in LearningResourcesApi. - * @export - * @interface LearningResourcesApiLearningResourcesUpcomingListRequest - */ -export interface LearningResourcesApiLearningResourcesUpcomingListRequest { - /** - * Multiple values may be separated by commas. - * @type {Array} - * @memberof LearningResourcesApiLearningResourcesUpcomingList - */ - readonly course_feature?: Array - - /** - * The department that offers learning resources * `1` - Civil and Environmental Engineering * `2` - Mechanical Engineering * `3` - Materials Science and Engineering * `4` - Architecture * `5` - Chemistry * `6` - Electrical Engineering and Computer Science * `7` - Biology * `8` - Physics * `9` - Brain and Cognitive Sciences * `10` - Chemical Engineering * `11` - Urban Studies and Planning * `12` - Earth, Atmospheric, and Planetary Sciences * `14` - Economics * `15` - Sloan School of Management * `16` - Aeronautics and Astronautics * `17` - Political Science * `18` - Mathematics * `20` - Biological Engineering * `21A` - Anthropology * `21G` - Global Studies and Languages * `21H` - History * `21L` - Literature * `21M` - Music and Theater Arts * `22` - Nuclear Science and Engineering * `24` - Linguistics and Philosophy * `CC` - Concourse * `CMS-W` - Comparative Media Studies/Writing * `EC` - Edgerton Center * `ES` - Experimental Study Group * `ESD` - Engineering Systems Division * `HST` - Health Sciences and Technology * `IDS` - Institute for Data, Systems, and Society * `MAS` - Media Arts and Sciences * `PE` - Athletics, Physical Education and Recreation * `RES` - Supplemental Resources * `STS` - Science, Technology, and Society * `WGS` - Women\'s and Gender Studies - * @type {Array<'1' | '10' | '11' | '12' | '14' | '15' | '16' | '17' | '18' | '2' | '20' | '21A' | '21G' | '21H' | '21L' | '21M' | '22' | '24' | '3' | '4' | '5' | '6' | '7' | '8' | '9' | 'CC' | 'CMS-W' | 'EC' | 'ES' | 'ESD' | 'HST' | 'IDS' | 'MAS' | 'PE' | 'RES' | 'STS' | 'WGS'>} - * @memberof LearningResourcesApiLearningResourcesUpcomingList - */ - readonly department?: Array - - /** - * The course/program is offered for free - * @type {boolean} - * @memberof LearningResourcesApiLearningResourcesUpcomingList - */ - readonly free?: boolean - - /** - * The learning format of course/program resources * `online` - Online * `hybrid` - Hybrid * `in_person` - In person - * @type {Array>} - * @memberof LearningResourcesApiLearningResourcesUpcomingList - */ - readonly learning_format?: Array> - - /** - * The academic level of the resources * `undergraduate` - Undergraduate * `graduate` - Graduate * `high_school` - High School * `noncredit` - Non-Credit * `advanced` - Advanced * `intermediate` - Intermediate * `introductory` - Introductory - * @type {Array<'advanced' | 'graduate' | 'high_school' | 'intermediate' | 'introductory' | 'noncredit' | 'undergraduate'>} - * @memberof LearningResourcesApiLearningResourcesUpcomingList - */ - readonly level?: Array - - /** - * Number of results to return per page. - * @type {number} - * @memberof LearningResourcesApiLearningResourcesUpcomingList - */ - readonly limit?: number - - /** - * The organization that offers a learning resource * `mitx` - MITx * `ocw` - OCW * `bootcamps` - Bootcamps * `xpro` - xPRO * `csail` - CSAIL * `mitpe` - Professional Education * `see` - Sloan Executive Education * `scc` - Schwarzman College of Computing * `ctl` - Center for Transportation & Logistics - * @type {Array<'bootcamps' | 'csail' | 'ctl' | 'mitpe' | 'mitx' | 'ocw' | 'scc' | 'see' | 'xpro'>} - * @memberof LearningResourcesApiLearningResourcesUpcomingList - */ - readonly offered_by?: Array - - /** - * The initial index from which to return the results. - * @type {number} - * @memberof LearningResourcesApiLearningResourcesUpcomingList - */ - readonly offset?: number - - /** - * The platform on which learning resources are offered * `edx` - edX * `ocw` - OCW * `oll` - Open Learning Library * `mitxonline` - MITx Online * `bootcamps` - Bootcamps * `xpro` - xPRO * `csail` - CSAIL * `mitpe` - Professional Education * `see` - Sloan Executive Education * `scc` - Schwarzman College of Computing * `ctl` - Center for Transportation & Logistics * `whu` - WHU * `susskind` - Susskind * `globalalumni` - Global Alumni * `simplilearn` - Simplilearn * `emeritus` - Emeritus * `podcast` - Podcast * `youtube` - YouTube - * @type {Array<'bootcamps' | 'csail' | 'ctl' | 'edx' | 'emeritus' | 'globalalumni' | 'mitpe' | 'mitxonline' | 'ocw' | 'oll' | 'podcast' | 'scc' | 'see' | 'simplilearn' | 'susskind' | 'whu' | 'xpro' | 'youtube'>} - * @memberof LearningResourcesApiLearningResourcesUpcomingList - */ - readonly platform?: Array - - /** - * - * @type {boolean} - * @memberof LearningResourcesApiLearningResourcesUpcomingList - */ - readonly professional?: boolean - - /** - * Multiple values may be separated by commas. - * @type {Array} - * @memberof LearningResourcesApiLearningResourcesUpcomingList - */ - readonly readable_id?: Array - - /** - * The type of learning resource * `course` - Course * `program` - Program * `learning_path` - Learning Path * `podcast` - Podcast * `podcast_episode` - Podcast Episode * `video` - Video * `video_playlist` - Video Playlist - * @type {Array<'course' | 'learning_path' | 'podcast' | 'podcast_episode' | 'program' | 'video' | 'video_playlist'>} - * @memberof LearningResourcesApiLearningResourcesUpcomingList - */ - readonly resource_type?: Array - - /** - * Sort By * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `created_on` - Creation Date ascending * `-created_on` - CreationDate descending * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending - * @type {'-created_on' | '-id' | '-last_modified' | '-mitcoursenumber' | '-readable_id' | '-start_date' | '-views' | 'created_on' | 'id' | 'last_modified' | 'mitcoursenumber' | 'readable_id' | 'start_date' | 'views'} - * @memberof LearningResourcesApiLearningResourcesUpcomingList - */ - readonly sortby?: LearningResourcesUpcomingListSortbyEnum - - /** - * Multiple values may be separated by commas. - * @type {Array} - * @memberof LearningResourcesApiLearningResourcesUpcomingList - */ - readonly topic?: Array -} - -/** - * LearningResourcesApi - object-oriented interface - * @export - * @class LearningResourcesApi - * @extends {BaseAPI} - */ -export class LearningResourcesApi extends BaseAPI { - /** - * Show content files for a learning resource - * @summary Learning Resource Content File List - * @param {LearningResourcesApiLearningResourcesContentfilesListRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof LearningResourcesApi - */ - public learningResourcesContentfilesList( - requestParameters: LearningResourcesApiLearningResourcesContentfilesListRequest, - options?: RawAxiosRequestConfig, - ) { - return LearningResourcesApiFp(this.configuration) - .learningResourcesContentfilesList( - requestParameters.learning_resource_id, - requestParameters.content_feature_type, - requestParameters.limit, - requestParameters.offered_by, - requestParameters.offset, - requestParameters.platform, - requestParameters.resource_id, - requestParameters.run_id, - options, - ) - .then((request) => request(this.axios, this.basePath)) - } - - /** - * Show content files for a learning resource - * @summary Learning Resource Content File Retrieve - * @param {LearningResourcesApiLearningResourcesContentfilesRetrieveRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof LearningResourcesApi + * Show content files for a learning resource + * @summary Learning Resource Content File Retrieve + * @param {LearningResourcesApiLearningResourcesContentfilesRetrieveRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof LearningResourcesApi */ public learningResourcesContentfilesRetrieve( requestParameters: LearningResourcesApiLearningResourcesContentfilesRetrieveRequest, @@ -11314,52 +9559,6 @@ export class LearningResourcesApi extends BaseAPI { .then((request) => request(this.axios, this.basePath)) } - /** - * Get a paginated list of popular Learning Resources. - * @summary List New - * @param {LearningResourcesApiLearningResourcesNewListRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof LearningResourcesApi - */ - public learningResourcesNewList( - requestParameters: LearningResourcesApiLearningResourcesNewListRequest = {}, - options?: RawAxiosRequestConfig, - ) { - return LearningResourcesApiFp(this.configuration) - .learningResourcesNewList( - requestParameters.course_feature, - requestParameters.department, - requestParameters.free, - requestParameters.learning_format, - requestParameters.level, - requestParameters.limit, - requestParameters.offered_by, - requestParameters.offset, - requestParameters.platform, - requestParameters.professional, - requestParameters.readable_id, - requestParameters.resource_type, - requestParameters.sortby, - requestParameters.topic, - options, - ) - .then((request) => request(this.axios, this.basePath)) - } - - /** - * Retrieve a list of popular resources - * @summary List Popular - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof LearningResourcesApi - */ - public learningResourcesPopularRetrieve(options?: RawAxiosRequestConfig) { - return LearningResourcesApiFp(this.configuration) - .learningResourcesPopularRetrieve(options) - .then((request) => request(this.axios, this.basePath)) - } - /** * Retrieve a single learning resource. * @summary Retrieve @@ -11376,39 +9575,6 @@ export class LearningResourcesApi extends BaseAPI { .learningResourcesRetrieve(requestParameters.id, options) .then((request) => request(this.axios, this.basePath)) } - - /** - * Get a paginated list of upcoming Learning Resources. - * @summary List Upcoming - * @param {LearningResourcesApiLearningResourcesUpcomingListRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof LearningResourcesApi - */ - public learningResourcesUpcomingList( - requestParameters: LearningResourcesApiLearningResourcesUpcomingListRequest = {}, - options?: RawAxiosRequestConfig, - ) { - return LearningResourcesApiFp(this.configuration) - .learningResourcesUpcomingList( - requestParameters.course_feature, - requestParameters.department, - requestParameters.free, - requestParameters.learning_format, - requestParameters.level, - requestParameters.limit, - requestParameters.offered_by, - requestParameters.offset, - requestParameters.platform, - requestParameters.professional, - requestParameters.readable_id, - requestParameters.resource_type, - requestParameters.sortby, - requestParameters.topic, - options, - ) - .then((request) => request(this.axios, this.basePath)) - } } /** @@ -11569,294 +9735,26 @@ export type LearningResourcesListResourceTypeEnum = * @export */ export const LearningResourcesListSortbyEnum = { - CreatedOn: "-created_on", Id: "-id", LastModified: "-last_modified", Mitcoursenumber: "-mitcoursenumber", ReadableId: "-readable_id", StartDate: "-start_date", Views: "-views", - CreatedOn2: "created_on", Id2: "id", LastModified2: "last_modified", Mitcoursenumber2: "mitcoursenumber", + New: "new", ReadableId2: "readable_id", StartDate2: "start_date", + Upcoming: "upcoming", Views2: "views", } as const export type LearningResourcesListSortbyEnum = (typeof LearningResourcesListSortbyEnum)[keyof typeof LearningResourcesListSortbyEnum] + /** - * @export - */ -export const LearningResourcesNewListDepartmentEnum = { - _1: "1", - _10: "10", - _11: "11", - _12: "12", - _14: "14", - _15: "15", - _16: "16", - _17: "17", - _18: "18", - _2: "2", - _20: "20", - _21A: "21A", - _21G: "21G", - _21H: "21H", - _21L: "21L", - _21M: "21M", - _22: "22", - _24: "24", - _3: "3", - _4: "4", - _5: "5", - _6: "6", - _7: "7", - _8: "8", - _9: "9", - Cc: "CC", - CmsW: "CMS-W", - Ec: "EC", - Es: "ES", - Esd: "ESD", - Hst: "HST", - Ids: "IDS", - Mas: "MAS", - Pe: "PE", - Res: "RES", - Sts: "STS", - Wgs: "WGS", -} as const -export type LearningResourcesNewListDepartmentEnum = - (typeof LearningResourcesNewListDepartmentEnum)[keyof typeof LearningResourcesNewListDepartmentEnum] -/** - * @export - */ -export const LearningResourcesNewListLevelEnum = { - Advanced: "advanced", - Graduate: "graduate", - HighSchool: "high_school", - Intermediate: "intermediate", - Introductory: "introductory", - Noncredit: "noncredit", - Undergraduate: "undergraduate", -} as const -export type LearningResourcesNewListLevelEnum = - (typeof LearningResourcesNewListLevelEnum)[keyof typeof LearningResourcesNewListLevelEnum] -/** - * @export - */ -export const LearningResourcesNewListOfferedByEnum = { - Bootcamps: "bootcamps", - Csail: "csail", - Ctl: "ctl", - Mitpe: "mitpe", - Mitx: "mitx", - Ocw: "ocw", - Scc: "scc", - See: "see", - Xpro: "xpro", -} as const -export type LearningResourcesNewListOfferedByEnum = - (typeof LearningResourcesNewListOfferedByEnum)[keyof typeof LearningResourcesNewListOfferedByEnum] -/** - * @export - */ -export const LearningResourcesNewListPlatformEnum = { - Bootcamps: "bootcamps", - Csail: "csail", - Ctl: "ctl", - Edx: "edx", - Emeritus: "emeritus", - Globalalumni: "globalalumni", - Mitpe: "mitpe", - Mitxonline: "mitxonline", - Ocw: "ocw", - Oll: "oll", - Podcast: "podcast", - Scc: "scc", - See: "see", - Simplilearn: "simplilearn", - Susskind: "susskind", - Whu: "whu", - Xpro: "xpro", - Youtube: "youtube", -} as const -export type LearningResourcesNewListPlatformEnum = - (typeof LearningResourcesNewListPlatformEnum)[keyof typeof LearningResourcesNewListPlatformEnum] -/** - * @export - */ -export const LearningResourcesNewListResourceTypeEnum = { - Course: "course", - LearningPath: "learning_path", - Podcast: "podcast", - PodcastEpisode: "podcast_episode", - Program: "program", - Video: "video", - VideoPlaylist: "video_playlist", -} as const -export type LearningResourcesNewListResourceTypeEnum = - (typeof LearningResourcesNewListResourceTypeEnum)[keyof typeof LearningResourcesNewListResourceTypeEnum] -/** - * @export - */ -export const LearningResourcesNewListSortbyEnum = { - CreatedOn: "-created_on", - Id: "-id", - LastModified: "-last_modified", - Mitcoursenumber: "-mitcoursenumber", - ReadableId: "-readable_id", - StartDate: "-start_date", - Views: "-views", - CreatedOn2: "created_on", - Id2: "id", - LastModified2: "last_modified", - Mitcoursenumber2: "mitcoursenumber", - ReadableId2: "readable_id", - StartDate2: "start_date", - Views2: "views", -} as const -export type LearningResourcesNewListSortbyEnum = - (typeof LearningResourcesNewListSortbyEnum)[keyof typeof LearningResourcesNewListSortbyEnum] -/** - * @export - */ -export const LearningResourcesUpcomingListDepartmentEnum = { - _1: "1", - _10: "10", - _11: "11", - _12: "12", - _14: "14", - _15: "15", - _16: "16", - _17: "17", - _18: "18", - _2: "2", - _20: "20", - _21A: "21A", - _21G: "21G", - _21H: "21H", - _21L: "21L", - _21M: "21M", - _22: "22", - _24: "24", - _3: "3", - _4: "4", - _5: "5", - _6: "6", - _7: "7", - _8: "8", - _9: "9", - Cc: "CC", - CmsW: "CMS-W", - Ec: "EC", - Es: "ES", - Esd: "ESD", - Hst: "HST", - Ids: "IDS", - Mas: "MAS", - Pe: "PE", - Res: "RES", - Sts: "STS", - Wgs: "WGS", -} as const -export type LearningResourcesUpcomingListDepartmentEnum = - (typeof LearningResourcesUpcomingListDepartmentEnum)[keyof typeof LearningResourcesUpcomingListDepartmentEnum] -/** - * @export - */ -export const LearningResourcesUpcomingListLevelEnum = { - Advanced: "advanced", - Graduate: "graduate", - HighSchool: "high_school", - Intermediate: "intermediate", - Introductory: "introductory", - Noncredit: "noncredit", - Undergraduate: "undergraduate", -} as const -export type LearningResourcesUpcomingListLevelEnum = - (typeof LearningResourcesUpcomingListLevelEnum)[keyof typeof LearningResourcesUpcomingListLevelEnum] -/** - * @export - */ -export const LearningResourcesUpcomingListOfferedByEnum = { - Bootcamps: "bootcamps", - Csail: "csail", - Ctl: "ctl", - Mitpe: "mitpe", - Mitx: "mitx", - Ocw: "ocw", - Scc: "scc", - See: "see", - Xpro: "xpro", -} as const -export type LearningResourcesUpcomingListOfferedByEnum = - (typeof LearningResourcesUpcomingListOfferedByEnum)[keyof typeof LearningResourcesUpcomingListOfferedByEnum] -/** - * @export - */ -export const LearningResourcesUpcomingListPlatformEnum = { - Bootcamps: "bootcamps", - Csail: "csail", - Ctl: "ctl", - Edx: "edx", - Emeritus: "emeritus", - Globalalumni: "globalalumni", - Mitpe: "mitpe", - Mitxonline: "mitxonline", - Ocw: "ocw", - Oll: "oll", - Podcast: "podcast", - Scc: "scc", - See: "see", - Simplilearn: "simplilearn", - Susskind: "susskind", - Whu: "whu", - Xpro: "xpro", - Youtube: "youtube", -} as const -export type LearningResourcesUpcomingListPlatformEnum = - (typeof LearningResourcesUpcomingListPlatformEnum)[keyof typeof LearningResourcesUpcomingListPlatformEnum] -/** - * @export - */ -export const LearningResourcesUpcomingListResourceTypeEnum = { - Course: "course", - LearningPath: "learning_path", - Podcast: "podcast", - PodcastEpisode: "podcast_episode", - Program: "program", - Video: "video", - VideoPlaylist: "video_playlist", -} as const -export type LearningResourcesUpcomingListResourceTypeEnum = - (typeof LearningResourcesUpcomingListResourceTypeEnum)[keyof typeof LearningResourcesUpcomingListResourceTypeEnum] -/** - * @export - */ -export const LearningResourcesUpcomingListSortbyEnum = { - CreatedOn: "-created_on", - Id: "-id", - LastModified: "-last_modified", - Mitcoursenumber: "-mitcoursenumber", - ReadableId: "-readable_id", - StartDate: "-start_date", - Views: "-views", - CreatedOn2: "created_on", - Id2: "id", - LastModified2: "last_modified", - Mitcoursenumber2: "mitcoursenumber", - ReadableId2: "readable_id", - StartDate2: "start_date", - Views2: "views", -} as const -export type LearningResourcesUpcomingListSortbyEnum = - (typeof LearningResourcesUpcomingListSortbyEnum)[keyof typeof LearningResourcesUpcomingListSortbyEnum] - -/** - * LearningResourcesSearchApi - axios parameter creator + * LearningResourcesSearchApi - axios parameter creator * @export */ export const LearningResourcesSearchApiAxiosParamCreator = function ( @@ -11881,7 +9779,7 @@ export const LearningResourcesSearchApiAxiosParamCreator = function ( * @param {boolean | null} [professional] * @param {string} [q] The search text * @param {Array} [resource_type] The type of learning resource * `course` - course * `program` - program * `learning_path` - learning path * `podcast` - podcast * `podcast_episode` - podcast episode * `video` - video * `video_playlist` - video playlist - * @param {LearningResourcesSearchRetrieveSortbyEnum} [sortby] If the parameter starts with \'-\' the sort is in descending order * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `created_on` - Creation Date ascending * `-created_on` - CreationDate descending * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending + * @param {LearningResourcesSearchRetrieveSortbyEnum} [sortby] If the parameter starts with \'-\' the sort is in descending order * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `new` - Newest resources first * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending * `upcoming` - Next start date ascending * @param {Array} [topic] The topic name. To see a list of options go to api/v1/topics/ * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -12035,7 +9933,7 @@ export const LearningResourcesSearchApiFp = function ( * @param {boolean | null} [professional] * @param {string} [q] The search text * @param {Array} [resource_type] The type of learning resource * `course` - course * `program` - program * `learning_path` - learning path * `podcast` - podcast * `podcast_episode` - podcast episode * `video` - video * `video_playlist` - video playlist - * @param {LearningResourcesSearchRetrieveSortbyEnum} [sortby] If the parameter starts with \'-\' the sort is in descending order * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `created_on` - Creation Date ascending * `-created_on` - CreationDate descending * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending + * @param {LearningResourcesSearchRetrieveSortbyEnum} [sortby] If the parameter starts with \'-\' the sort is in descending order * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `new` - Newest resources first * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending * `upcoming` - Next start date ascending * @param {Array} [topic] The topic name. To see a list of options go to api/v1/topics/ * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -12262,8 +10160,8 @@ export interface LearningResourcesSearchApiLearningResourcesSearchRetrieveReques readonly resource_type?: Array /** - * If the parameter starts with \'-\' the sort is in descending order * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `created_on` - Creation Date ascending * `-created_on` - CreationDate descending * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending - * @type {'id' | '-id' | 'readable_id' | '-readable_id' | 'last_modified' | '-last_modified' | 'created_on' | '-created_on' | 'start_date' | '-start_date' | 'mitcoursenumber' | '-mitcoursenumber' | 'views' | '-views'} + * If the parameter starts with \'-\' the sort is in descending order * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `new` - Newest resources first * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending * `upcoming` - Next start date ascending + * @type {'id' | '-id' | 'readable_id' | '-readable_id' | 'last_modified' | '-last_modified' | 'new' | 'start_date' | '-start_date' | 'mitcoursenumber' | '-mitcoursenumber' | 'views' | '-views' | 'upcoming'} * @memberof LearningResourcesSearchApiLearningResourcesSearchRetrieve */ readonly sortby?: LearningResourcesSearchRetrieveSortbyEnum @@ -12471,14 +10369,14 @@ export const LearningResourcesSearchRetrieveSortbyEnum = { ReadableId2: "-readable_id", LastModified: "last_modified", LastModified2: "-last_modified", - CreatedOn: "created_on", - CreatedOn2: "-created_on", + New: "new", StartDate: "start_date", StartDate2: "-start_date", Mitcoursenumber: "mitcoursenumber", Mitcoursenumber2: "-mitcoursenumber", Views: "views", Views2: "-views", + Upcoming: "upcoming", } as const export type LearningResourcesSearchRetrieveSortbyEnum = (typeof LearningResourcesSearchRetrieveSortbyEnum)[keyof typeof LearningResourcesSearchRetrieveSortbyEnum] @@ -13326,7 +11224,7 @@ export const LearningpathsApiAxiosParamCreator = function ( * @param {boolean} [professional] * @param {Array} [readable_id] Multiple values may be separated by commas. * @param {Array} [resource_type] The type of learning resource * `course` - Course * `program` - Program * `learning_path` - Learning Path * `podcast` - Podcast * `podcast_episode` - Podcast Episode * `video` - Video * `video_playlist` - Video Playlist - * @param {LearningpathsListSortbyEnum} [sortby] Sort By * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `created_on` - Creation Date ascending * `-created_on` - CreationDate descending * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending + * @param {LearningpathsListSortbyEnum} [sortby] Sort By * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `new` - Newest resources first * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending * `upcoming` - Next start date ascending * @param {Array} [topic] Multiple values may be separated by commas. * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -13813,7 +11711,7 @@ export const LearningpathsApiFp = function (configuration?: Configuration) { * @param {boolean} [professional] * @param {Array} [readable_id] Multiple values may be separated by commas. * @param {Array} [resource_type] The type of learning resource * `course` - Course * `program` - Program * `learning_path` - Learning Path * `podcast` - Podcast * `podcast_episode` - Podcast Episode * `video` - Video * `video_playlist` - Video Playlist - * @param {LearningpathsListSortbyEnum} [sortby] Sort By * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `created_on` - Creation Date ascending * `-created_on` - CreationDate descending * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending + * @param {LearningpathsListSortbyEnum} [sortby] Sort By * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `new` - Newest resources first * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending * `upcoming` - Next start date ascending * @param {Array} [topic] Multiple values may be separated by commas. * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -14394,8 +12292,8 @@ export interface LearningpathsApiLearningpathsListRequest { readonly resource_type?: Array /** - * Sort By * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `created_on` - Creation Date ascending * `-created_on` - CreationDate descending * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending - * @type {'-created_on' | '-id' | '-last_modified' | '-mitcoursenumber' | '-readable_id' | '-start_date' | '-views' | 'created_on' | 'id' | 'last_modified' | 'mitcoursenumber' | 'readable_id' | 'start_date' | 'views'} + * Sort By * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `new` - Newest resources first * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending * `upcoming` - Next start date ascending + * @type {'-id' | '-last_modified' | '-mitcoursenumber' | '-readable_id' | '-start_date' | '-views' | 'id' | 'last_modified' | 'mitcoursenumber' | 'new' | 'readable_id' | 'start_date' | 'upcoming' | 'views'} * @memberof LearningpathsApiLearningpathsList */ readonly sortby?: LearningpathsListSortbyEnum @@ -14784,19 +12682,19 @@ export type LearningpathsListResourceTypeEnum = * @export */ export const LearningpathsListSortbyEnum = { - CreatedOn: "-created_on", Id: "-id", LastModified: "-last_modified", Mitcoursenumber: "-mitcoursenumber", ReadableId: "-readable_id", StartDate: "-start_date", Views: "-views", - CreatedOn2: "created_on", Id2: "id", LastModified2: "last_modified", Mitcoursenumber2: "mitcoursenumber", + New: "new", ReadableId2: "readable_id", StartDate2: "start_date", + Upcoming: "upcoming", Views2: "views", } as const export type LearningpathsListSortbyEnum = @@ -15437,7 +13335,7 @@ export const PodcastEpisodesApiAxiosParamCreator = function ( * @param {boolean} [professional] * @param {Array} [readable_id] Multiple values may be separated by commas. * @param {Array} [resource_type] The type of learning resource * `course` - Course * `program` - Program * `learning_path` - Learning Path * `podcast` - Podcast * `podcast_episode` - Podcast Episode * `video` - Video * `video_playlist` - Video Playlist - * @param {PodcastEpisodesListSortbyEnum} [sortby] Sort By * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `created_on` - Creation Date ascending * `-created_on` - CreationDate descending * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending + * @param {PodcastEpisodesListSortbyEnum} [sortby] Sort By * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `new` - Newest resources first * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending * `upcoming` - Next start date ascending * @param {Array} [topic] Multiple values may be separated by commas. * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -15621,7 +13519,7 @@ export const PodcastEpisodesApiFp = function (configuration?: Configuration) { * @param {boolean} [professional] * @param {Array} [readable_id] Multiple values may be separated by commas. * @param {Array} [resource_type] The type of learning resource * `course` - Course * `program` - Program * `learning_path` - Learning Path * `podcast` - Podcast * `podcast_episode` - Podcast Episode * `video` - Video * `video_playlist` - Video Playlist - * @param {PodcastEpisodesListSortbyEnum} [sortby] Sort By * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `created_on` - Creation Date ascending * `-created_on` - CreationDate descending * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending + * @param {PodcastEpisodesListSortbyEnum} [sortby] Sort By * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `new` - Newest resources first * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending * `upcoming` - Next start date ascending * @param {Array} [topic] Multiple values may be separated by commas. * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -15863,8 +13761,8 @@ export interface PodcastEpisodesApiPodcastEpisodesListRequest { readonly resource_type?: Array /** - * Sort By * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `created_on` - Creation Date ascending * `-created_on` - CreationDate descending * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending - * @type {'-created_on' | '-id' | '-last_modified' | '-mitcoursenumber' | '-readable_id' | '-start_date' | '-views' | 'created_on' | 'id' | 'last_modified' | 'mitcoursenumber' | 'readable_id' | 'start_date' | 'views'} + * Sort By * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `new` - Newest resources first * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending * `upcoming` - Next start date ascending + * @type {'-id' | '-last_modified' | '-mitcoursenumber' | '-readable_id' | '-start_date' | '-views' | 'id' | 'last_modified' | 'mitcoursenumber' | 'new' | 'readable_id' | 'start_date' | 'upcoming' | 'views'} * @memberof PodcastEpisodesApiPodcastEpisodesList */ readonly sortby?: PodcastEpisodesListSortbyEnum @@ -16066,19 +13964,19 @@ export type PodcastEpisodesListResourceTypeEnum = * @export */ export const PodcastEpisodesListSortbyEnum = { - CreatedOn: "-created_on", Id: "-id", LastModified: "-last_modified", Mitcoursenumber: "-mitcoursenumber", ReadableId: "-readable_id", StartDate: "-start_date", Views: "-views", - CreatedOn2: "created_on", Id2: "id", LastModified2: "last_modified", Mitcoursenumber2: "mitcoursenumber", + New: "new", ReadableId2: "readable_id", StartDate2: "start_date", + Upcoming: "upcoming", Views2: "views", } as const export type PodcastEpisodesListSortbyEnum = @@ -16232,7 +14130,7 @@ export const PodcastsApiAxiosParamCreator = function ( * @param {boolean} [professional] * @param {Array} [readable_id] Multiple values may be separated by commas. * @param {Array} [resource_type] The type of learning resource * `course` - Course * `program` - Program * `learning_path` - Learning Path * `podcast` - Podcast * `podcast_episode` - Podcast Episode * `video` - Video * `video_playlist` - Video Playlist - * @param {PodcastsListSortbyEnum} [sortby] Sort By * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `created_on` - Creation Date ascending * `-created_on` - CreationDate descending * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending + * @param {PodcastsListSortbyEnum} [sortby] Sort By * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `new` - Newest resources first * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending * `upcoming` - Next start date ascending * @param {Array} [topic] Multiple values may be separated by commas. * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -16491,7 +14389,7 @@ export const PodcastsApiFp = function (configuration?: Configuration) { * @param {boolean} [professional] * @param {Array} [readable_id] Multiple values may be separated by commas. * @param {Array} [resource_type] The type of learning resource * `course` - Course * `program` - Program * `learning_path` - Learning Path * `podcast` - Podcast * `podcast_episode` - Podcast Episode * `video` - Video * `video_playlist` - Video Playlist - * @param {PodcastsListSortbyEnum} [sortby] Sort By * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `created_on` - Creation Date ascending * `-created_on` - CreationDate descending * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending + * @param {PodcastsListSortbyEnum} [sortby] Sort By * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `new` - Newest resources first * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending * `upcoming` - Next start date ascending * @param {Array} [topic] Multiple values may be separated by commas. * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -16825,8 +14723,8 @@ export interface PodcastsApiPodcastsListRequest { readonly resource_type?: Array /** - * Sort By * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `created_on` - Creation Date ascending * `-created_on` - CreationDate descending * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending - * @type {'-created_on' | '-id' | '-last_modified' | '-mitcoursenumber' | '-readable_id' | '-start_date' | '-views' | 'created_on' | 'id' | 'last_modified' | 'mitcoursenumber' | 'readable_id' | 'start_date' | 'views'} + * Sort By * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `new` - Newest resources first * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending * `upcoming` - Next start date ascending + * @type {'-id' | '-last_modified' | '-mitcoursenumber' | '-readable_id' | '-start_date' | '-views' | 'id' | 'last_modified' | 'mitcoursenumber' | 'new' | 'readable_id' | 'start_date' | 'upcoming' | 'views'} * @memberof PodcastsApiPodcastsList */ readonly sortby?: PodcastsListSortbyEnum @@ -17072,19 +14970,19 @@ export type PodcastsListResourceTypeEnum = * @export */ export const PodcastsListSortbyEnum = { - CreatedOn: "-created_on", Id: "-id", LastModified: "-last_modified", Mitcoursenumber: "-mitcoursenumber", ReadableId: "-readable_id", StartDate: "-start_date", Views: "-views", - CreatedOn2: "created_on", Id2: "id", LastModified2: "last_modified", Mitcoursenumber2: "mitcoursenumber", + New: "new", ReadableId2: "readable_id", StartDate2: "start_date", + Upcoming: "upcoming", Views2: "views", } as const export type PodcastsListSortbyEnum = @@ -17276,7 +15174,7 @@ export const ProgramsApiAxiosParamCreator = function ( * @param {boolean} [professional] * @param {Array} [readable_id] Multiple values may be separated by commas. * @param {Array} [resource_type] The type of learning resource * `course` - Course * `program` - Program * `learning_path` - Learning Path * `podcast` - Podcast * `podcast_episode` - Podcast Episode * `video` - Video * `video_playlist` - Video Playlist - * @param {ProgramsListSortbyEnum} [sortby] Sort By * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `created_on` - Creation Date ascending * `-created_on` - CreationDate descending * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending + * @param {ProgramsListSortbyEnum} [sortby] Sort By * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `new` - Newest resources first * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending * `upcoming` - Next start date ascending * @param {Array} [topic] Multiple values may be separated by commas. * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -17389,43 +15287,22 @@ export const ProgramsApiAxiosParamCreator = function ( } }, /** - * Get a paginated list of popular Programs. - * @summary List New - * @param {Array} [course_feature] Multiple values may be separated by commas. - * @param {Array} [department] The department that offers learning resources * `1` - Civil and Environmental Engineering * `2` - Mechanical Engineering * `3` - Materials Science and Engineering * `4` - Architecture * `5` - Chemistry * `6` - Electrical Engineering and Computer Science * `7` - Biology * `8` - Physics * `9` - Brain and Cognitive Sciences * `10` - Chemical Engineering * `11` - Urban Studies and Planning * `12` - Earth, Atmospheric, and Planetary Sciences * `14` - Economics * `15` - Sloan School of Management * `16` - Aeronautics and Astronautics * `17` - Political Science * `18` - Mathematics * `20` - Biological Engineering * `21A` - Anthropology * `21G` - Global Studies and Languages * `21H` - History * `21L` - Literature * `21M` - Music and Theater Arts * `22` - Nuclear Science and Engineering * `24` - Linguistics and Philosophy * `CC` - Concourse * `CMS-W` - Comparative Media Studies/Writing * `EC` - Edgerton Center * `ES` - Experimental Study Group * `ESD` - Engineering Systems Division * `HST` - Health Sciences and Technology * `IDS` - Institute for Data, Systems, and Society * `MAS` - Media Arts and Sciences * `PE` - Athletics, Physical Education and Recreation * `RES` - Supplemental Resources * `STS` - Science, Technology, and Society * `WGS` - Women\'s and Gender Studies - * @param {boolean} [free] The course/program is offered for free - * @param {Array>} [learning_format] The learning format of course/program resources * `online` - Online * `hybrid` - Hybrid * `in_person` - In person - * @param {Array} [level] The academic level of the resources * `undergraduate` - Undergraduate * `graduate` - Graduate * `high_school` - High School * `noncredit` - Non-Credit * `advanced` - Advanced * `intermediate` - Intermediate * `introductory` - Introductory - * @param {number} [limit] Number of results to return per page. - * @param {Array} [offered_by] The organization that offers a learning resource * `mitx` - MITx * `ocw` - OCW * `bootcamps` - Bootcamps * `xpro` - xPRO * `csail` - CSAIL * `mitpe` - Professional Education * `see` - Sloan Executive Education * `scc` - Schwarzman College of Computing * `ctl` - Center for Transportation & Logistics - * @param {number} [offset] The initial index from which to return the results. - * @param {Array} [platform] The platform on which learning resources are offered * `edx` - edX * `ocw` - OCW * `oll` - Open Learning Library * `mitxonline` - MITx Online * `bootcamps` - Bootcamps * `xpro` - xPRO * `csail` - CSAIL * `mitpe` - Professional Education * `see` - Sloan Executive Education * `scc` - Schwarzman College of Computing * `ctl` - Center for Transportation & Logistics * `whu` - WHU * `susskind` - Susskind * `globalalumni` - Global Alumni * `simplilearn` - Simplilearn * `emeritus` - Emeritus * `podcast` - Podcast * `youtube` - YouTube - * @param {boolean} [professional] - * @param {Array} [readable_id] Multiple values may be separated by commas. - * @param {Array} [resource_type] The type of learning resource * `course` - Course * `program` - Program * `learning_path` - Learning Path * `podcast` - Podcast * `podcast_episode` - Podcast Episode * `video` - Video * `video_playlist` - Video Playlist - * @param {ProgramsNewListSortbyEnum} [sortby] Sort By * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `created_on` - Creation Date ascending * `-created_on` - CreationDate descending * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending - * @param {Array} [topic] Multiple values may be separated by commas. + * Retrieve a single program + * @summary Retrieve + * @param {number} id A unique integer value identifying this learning resource. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - programsNewList: async ( - course_feature?: Array, - department?: Array, - free?: boolean, - learning_format?: Array>, - level?: Array, - limit?: number, - offered_by?: Array, - offset?: number, - platform?: Array, - professional?: boolean, - readable_id?: Array, - resource_type?: Array, - sortby?: ProgramsNewListSortbyEnum, - topic?: Array, + programsRetrieve: async ( + id: number, options: RawAxiosRequestConfig = {}, ): Promise => { - const localVarPath = `/api/v1/programs/new/` + // verify required parameter 'id' is not null or undefined + assertParamExists("programsRetrieve", "id", id) + const localVarPath = `/api/v1/programs/{id}/`.replace( + `{${"id"}}`, + encodeURIComponent(String(id)), + ) // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) let baseOptions @@ -17441,278 +15318,6 @@ export const ProgramsApiAxiosParamCreator = function ( const localVarHeaderParameter = {} as any const localVarQueryParameter = {} as any - if (course_feature) { - localVarQueryParameter["course_feature"] = course_feature.join( - COLLECTION_FORMATS.csv, - ) - } - - if (department) { - localVarQueryParameter["department"] = department - } - - if (free !== undefined) { - localVarQueryParameter["free"] = free - } - - if (learning_format) { - localVarQueryParameter["learning_format"] = learning_format - } - - if (level) { - localVarQueryParameter["level"] = level - } - - if (limit !== undefined) { - localVarQueryParameter["limit"] = limit - } - - if (offered_by) { - localVarQueryParameter["offered_by"] = offered_by - } - - if (offset !== undefined) { - localVarQueryParameter["offset"] = offset - } - - if (platform) { - localVarQueryParameter["platform"] = platform - } - - if (professional !== undefined) { - localVarQueryParameter["professional"] = professional - } - - if (readable_id) { - localVarQueryParameter["readable_id"] = readable_id.join( - COLLECTION_FORMATS.csv, - ) - } - - if (resource_type) { - localVarQueryParameter["resource_type"] = resource_type - } - - if (sortby !== undefined) { - localVarQueryParameter["sortby"] = sortby - } - - if (topic) { - localVarQueryParameter["topic"] = topic.join(COLLECTION_FORMATS.csv) - } - - setSearchParams(localVarUrlObj, localVarQueryParameter) - let headersFromBaseOptions = - baseOptions && baseOptions.headers ? baseOptions.headers : {} - localVarRequestOptions.headers = { - ...localVarHeaderParameter, - ...headersFromBaseOptions, - ...options.headers, - } - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - } - }, - /** - * Retrieve a list of popular resources - * @summary List Popular - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - programsPopularRetrieve: async ( - options: RawAxiosRequestConfig = {}, - ): Promise => { - const localVarPath = `/api/v1/programs/popular/` - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) - let baseOptions - if (configuration) { - baseOptions = configuration.baseOptions - } - - const localVarRequestOptions = { - method: "GET", - ...baseOptions, - ...options, - } - const localVarHeaderParameter = {} as any - const localVarQueryParameter = {} as any - - setSearchParams(localVarUrlObj, localVarQueryParameter) - let headersFromBaseOptions = - baseOptions && baseOptions.headers ? baseOptions.headers : {} - localVarRequestOptions.headers = { - ...localVarHeaderParameter, - ...headersFromBaseOptions, - ...options.headers, - } - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - } - }, - /** - * Retrieve a single program - * @summary Retrieve - * @param {number} id A unique integer value identifying this learning resource. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - programsRetrieve: async ( - id: number, - options: RawAxiosRequestConfig = {}, - ): Promise => { - // verify required parameter 'id' is not null or undefined - assertParamExists("programsRetrieve", "id", id) - const localVarPath = `/api/v1/programs/{id}/`.replace( - `{${"id"}}`, - encodeURIComponent(String(id)), - ) - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) - let baseOptions - if (configuration) { - baseOptions = configuration.baseOptions - } - - const localVarRequestOptions = { - method: "GET", - ...baseOptions, - ...options, - } - const localVarHeaderParameter = {} as any - const localVarQueryParameter = {} as any - - setSearchParams(localVarUrlObj, localVarQueryParameter) - let headersFromBaseOptions = - baseOptions && baseOptions.headers ? baseOptions.headers : {} - localVarRequestOptions.headers = { - ...localVarHeaderParameter, - ...headersFromBaseOptions, - ...options.headers, - } - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - } - }, - /** - * Get a paginated list of upcoming Programs. - * @summary List Upcoming - * @param {Array} [course_feature] Multiple values may be separated by commas. - * @param {Array} [department] The department that offers learning resources * `1` - Civil and Environmental Engineering * `2` - Mechanical Engineering * `3` - Materials Science and Engineering * `4` - Architecture * `5` - Chemistry * `6` - Electrical Engineering and Computer Science * `7` - Biology * `8` - Physics * `9` - Brain and Cognitive Sciences * `10` - Chemical Engineering * `11` - Urban Studies and Planning * `12` - Earth, Atmospheric, and Planetary Sciences * `14` - Economics * `15` - Sloan School of Management * `16` - Aeronautics and Astronautics * `17` - Political Science * `18` - Mathematics * `20` - Biological Engineering * `21A` - Anthropology * `21G` - Global Studies and Languages * `21H` - History * `21L` - Literature * `21M` - Music and Theater Arts * `22` - Nuclear Science and Engineering * `24` - Linguistics and Philosophy * `CC` - Concourse * `CMS-W` - Comparative Media Studies/Writing * `EC` - Edgerton Center * `ES` - Experimental Study Group * `ESD` - Engineering Systems Division * `HST` - Health Sciences and Technology * `IDS` - Institute for Data, Systems, and Society * `MAS` - Media Arts and Sciences * `PE` - Athletics, Physical Education and Recreation * `RES` - Supplemental Resources * `STS` - Science, Technology, and Society * `WGS` - Women\'s and Gender Studies - * @param {boolean} [free] The course/program is offered for free - * @param {Array>} [learning_format] The learning format of course/program resources * `online` - Online * `hybrid` - Hybrid * `in_person` - In person - * @param {Array} [level] The academic level of the resources * `undergraduate` - Undergraduate * `graduate` - Graduate * `high_school` - High School * `noncredit` - Non-Credit * `advanced` - Advanced * `intermediate` - Intermediate * `introductory` - Introductory - * @param {number} [limit] Number of results to return per page. - * @param {Array} [offered_by] The organization that offers a learning resource * `mitx` - MITx * `ocw` - OCW * `bootcamps` - Bootcamps * `xpro` - xPRO * `csail` - CSAIL * `mitpe` - Professional Education * `see` - Sloan Executive Education * `scc` - Schwarzman College of Computing * `ctl` - Center for Transportation & Logistics - * @param {number} [offset] The initial index from which to return the results. - * @param {Array} [platform] The platform on which learning resources are offered * `edx` - edX * `ocw` - OCW * `oll` - Open Learning Library * `mitxonline` - MITx Online * `bootcamps` - Bootcamps * `xpro` - xPRO * `csail` - CSAIL * `mitpe` - Professional Education * `see` - Sloan Executive Education * `scc` - Schwarzman College of Computing * `ctl` - Center for Transportation & Logistics * `whu` - WHU * `susskind` - Susskind * `globalalumni` - Global Alumni * `simplilearn` - Simplilearn * `emeritus` - Emeritus * `podcast` - Podcast * `youtube` - YouTube - * @param {boolean} [professional] - * @param {Array} [readable_id] Multiple values may be separated by commas. - * @param {Array} [resource_type] The type of learning resource * `course` - Course * `program` - Program * `learning_path` - Learning Path * `podcast` - Podcast * `podcast_episode` - Podcast Episode * `video` - Video * `video_playlist` - Video Playlist - * @param {ProgramsUpcomingListSortbyEnum} [sortby] Sort By * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `created_on` - Creation Date ascending * `-created_on` - CreationDate descending * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending - * @param {Array} [topic] Multiple values may be separated by commas. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - programsUpcomingList: async ( - course_feature?: Array, - department?: Array, - free?: boolean, - learning_format?: Array>, - level?: Array, - limit?: number, - offered_by?: Array, - offset?: number, - platform?: Array, - professional?: boolean, - readable_id?: Array, - resource_type?: Array, - sortby?: ProgramsUpcomingListSortbyEnum, - topic?: Array, - options: RawAxiosRequestConfig = {}, - ): Promise => { - const localVarPath = `/api/v1/programs/upcoming/` - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) - let baseOptions - if (configuration) { - baseOptions = configuration.baseOptions - } - - const localVarRequestOptions = { - method: "GET", - ...baseOptions, - ...options, - } - const localVarHeaderParameter = {} as any - const localVarQueryParameter = {} as any - - if (course_feature) { - localVarQueryParameter["course_feature"] = course_feature.join( - COLLECTION_FORMATS.csv, - ) - } - - if (department) { - localVarQueryParameter["department"] = department - } - - if (free !== undefined) { - localVarQueryParameter["free"] = free - } - - if (learning_format) { - localVarQueryParameter["learning_format"] = learning_format - } - - if (level) { - localVarQueryParameter["level"] = level - } - - if (limit !== undefined) { - localVarQueryParameter["limit"] = limit - } - - if (offered_by) { - localVarQueryParameter["offered_by"] = offered_by - } - - if (offset !== undefined) { - localVarQueryParameter["offset"] = offset - } - - if (platform) { - localVarQueryParameter["platform"] = platform - } - - if (professional !== undefined) { - localVarQueryParameter["professional"] = professional - } - - if (readable_id) { - localVarQueryParameter["readable_id"] = readable_id.join( - COLLECTION_FORMATS.csv, - ) - } - - if (resource_type) { - localVarQueryParameter["resource_type"] = resource_type - } - - if (sortby !== undefined) { - localVarQueryParameter["sortby"] = sortby - } - - if (topic) { - localVarQueryParameter["topic"] = topic.join(COLLECTION_FORMATS.csv) - } - setSearchParams(localVarUrlObj, localVarQueryParameter) let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} @@ -17752,7 +15357,7 @@ export const ProgramsApiFp = function (configuration?: Configuration) { * @param {boolean} [professional] * @param {Array} [readable_id] Multiple values may be separated by commas. * @param {Array} [resource_type] The type of learning resource * `course` - Course * `program` - Program * `learning_path` - Learning Path * `podcast` - Podcast * `podcast_episode` - Podcast Episode * `video` - Video * `video_playlist` - Video Playlist - * @param {ProgramsListSortbyEnum} [sortby] Sort By * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `created_on` - Creation Date ascending * `-created_on` - CreationDate descending * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending + * @param {ProgramsListSortbyEnum} [sortby] Sort By * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `new` - Newest resources first * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending * `upcoming` - Next start date ascending * @param {Array} [topic] Multiple values may be separated by commas. * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -17807,103 +15412,6 @@ export const ProgramsApiFp = function (configuration?: Configuration) { configuration, )(axios, operationBasePath || basePath) }, - /** - * Get a paginated list of popular Programs. - * @summary List New - * @param {Array} [course_feature] Multiple values may be separated by commas. - * @param {Array} [department] The department that offers learning resources * `1` - Civil and Environmental Engineering * `2` - Mechanical Engineering * `3` - Materials Science and Engineering * `4` - Architecture * `5` - Chemistry * `6` - Electrical Engineering and Computer Science * `7` - Biology * `8` - Physics * `9` - Brain and Cognitive Sciences * `10` - Chemical Engineering * `11` - Urban Studies and Planning * `12` - Earth, Atmospheric, and Planetary Sciences * `14` - Economics * `15` - Sloan School of Management * `16` - Aeronautics and Astronautics * `17` - Political Science * `18` - Mathematics * `20` - Biological Engineering * `21A` - Anthropology * `21G` - Global Studies and Languages * `21H` - History * `21L` - Literature * `21M` - Music and Theater Arts * `22` - Nuclear Science and Engineering * `24` - Linguistics and Philosophy * `CC` - Concourse * `CMS-W` - Comparative Media Studies/Writing * `EC` - Edgerton Center * `ES` - Experimental Study Group * `ESD` - Engineering Systems Division * `HST` - Health Sciences and Technology * `IDS` - Institute for Data, Systems, and Society * `MAS` - Media Arts and Sciences * `PE` - Athletics, Physical Education and Recreation * `RES` - Supplemental Resources * `STS` - Science, Technology, and Society * `WGS` - Women\'s and Gender Studies - * @param {boolean} [free] The course/program is offered for free - * @param {Array>} [learning_format] The learning format of course/program resources * `online` - Online * `hybrid` - Hybrid * `in_person` - In person - * @param {Array} [level] The academic level of the resources * `undergraduate` - Undergraduate * `graduate` - Graduate * `high_school` - High School * `noncredit` - Non-Credit * `advanced` - Advanced * `intermediate` - Intermediate * `introductory` - Introductory - * @param {number} [limit] Number of results to return per page. - * @param {Array} [offered_by] The organization that offers a learning resource * `mitx` - MITx * `ocw` - OCW * `bootcamps` - Bootcamps * `xpro` - xPRO * `csail` - CSAIL * `mitpe` - Professional Education * `see` - Sloan Executive Education * `scc` - Schwarzman College of Computing * `ctl` - Center for Transportation & Logistics - * @param {number} [offset] The initial index from which to return the results. - * @param {Array} [platform] The platform on which learning resources are offered * `edx` - edX * `ocw` - OCW * `oll` - Open Learning Library * `mitxonline` - MITx Online * `bootcamps` - Bootcamps * `xpro` - xPRO * `csail` - CSAIL * `mitpe` - Professional Education * `see` - Sloan Executive Education * `scc` - Schwarzman College of Computing * `ctl` - Center for Transportation & Logistics * `whu` - WHU * `susskind` - Susskind * `globalalumni` - Global Alumni * `simplilearn` - Simplilearn * `emeritus` - Emeritus * `podcast` - Podcast * `youtube` - YouTube - * @param {boolean} [professional] - * @param {Array} [readable_id] Multiple values may be separated by commas. - * @param {Array} [resource_type] The type of learning resource * `course` - Course * `program` - Program * `learning_path` - Learning Path * `podcast` - Podcast * `podcast_episode` - Podcast Episode * `video` - Video * `video_playlist` - Video Playlist - * @param {ProgramsNewListSortbyEnum} [sortby] Sort By * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `created_on` - Creation Date ascending * `-created_on` - CreationDate descending * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending - * @param {Array} [topic] Multiple values may be separated by commas. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async programsNewList( - course_feature?: Array, - department?: Array, - free?: boolean, - learning_format?: Array>, - level?: Array, - limit?: number, - offered_by?: Array, - offset?: number, - platform?: Array, - professional?: boolean, - readable_id?: Array, - resource_type?: Array, - sortby?: ProgramsNewListSortbyEnum, - topic?: Array, - options?: RawAxiosRequestConfig, - ): Promise< - ( - axios?: AxiosInstance, - basePath?: string, - ) => AxiosPromise - > { - const localVarAxiosArgs = await localVarAxiosParamCreator.programsNewList( - course_feature, - department, - free, - learning_format, - level, - limit, - offered_by, - offset, - platform, - professional, - readable_id, - resource_type, - sortby, - topic, - options, - ) - const index = configuration?.serverIndex ?? 0 - const operationBasePath = - operationServerMap["ProgramsApi.programsNewList"]?.[index]?.url - return (axios, basePath) => - createRequestFunction( - localVarAxiosArgs, - globalAxios, - BASE_PATH, - configuration, - )(axios, operationBasePath || basePath) - }, - /** - * Retrieve a list of popular resources - * @summary List Popular - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async programsPopularRetrieve( - options?: RawAxiosRequestConfig, - ): Promise< - ( - axios?: AxiosInstance, - basePath?: string, - ) => AxiosPromise - > { - const localVarAxiosArgs = - await localVarAxiosParamCreator.programsPopularRetrieve(options) - const index = configuration?.serverIndex ?? 0 - const operationBasePath = - operationServerMap["ProgramsApi.programsPopularRetrieve"]?.[index]?.url - return (axios, basePath) => - createRequestFunction( - localVarAxiosArgs, - globalAxios, - BASE_PATH, - configuration, - )(axios, operationBasePath || basePath) - }, /** * Retrieve a single program * @summary Retrieve @@ -17933,77 +15441,6 @@ export const ProgramsApiFp = function (configuration?: Configuration) { configuration, )(axios, operationBasePath || basePath) }, - /** - * Get a paginated list of upcoming Programs. - * @summary List Upcoming - * @param {Array} [course_feature] Multiple values may be separated by commas. - * @param {Array} [department] The department that offers learning resources * `1` - Civil and Environmental Engineering * `2` - Mechanical Engineering * `3` - Materials Science and Engineering * `4` - Architecture * `5` - Chemistry * `6` - Electrical Engineering and Computer Science * `7` - Biology * `8` - Physics * `9` - Brain and Cognitive Sciences * `10` - Chemical Engineering * `11` - Urban Studies and Planning * `12` - Earth, Atmospheric, and Planetary Sciences * `14` - Economics * `15` - Sloan School of Management * `16` - Aeronautics and Astronautics * `17` - Political Science * `18` - Mathematics * `20` - Biological Engineering * `21A` - Anthropology * `21G` - Global Studies and Languages * `21H` - History * `21L` - Literature * `21M` - Music and Theater Arts * `22` - Nuclear Science and Engineering * `24` - Linguistics and Philosophy * `CC` - Concourse * `CMS-W` - Comparative Media Studies/Writing * `EC` - Edgerton Center * `ES` - Experimental Study Group * `ESD` - Engineering Systems Division * `HST` - Health Sciences and Technology * `IDS` - Institute for Data, Systems, and Society * `MAS` - Media Arts and Sciences * `PE` - Athletics, Physical Education and Recreation * `RES` - Supplemental Resources * `STS` - Science, Technology, and Society * `WGS` - Women\'s and Gender Studies - * @param {boolean} [free] The course/program is offered for free - * @param {Array>} [learning_format] The learning format of course/program resources * `online` - Online * `hybrid` - Hybrid * `in_person` - In person - * @param {Array} [level] The academic level of the resources * `undergraduate` - Undergraduate * `graduate` - Graduate * `high_school` - High School * `noncredit` - Non-Credit * `advanced` - Advanced * `intermediate` - Intermediate * `introductory` - Introductory - * @param {number} [limit] Number of results to return per page. - * @param {Array} [offered_by] The organization that offers a learning resource * `mitx` - MITx * `ocw` - OCW * `bootcamps` - Bootcamps * `xpro` - xPRO * `csail` - CSAIL * `mitpe` - Professional Education * `see` - Sloan Executive Education * `scc` - Schwarzman College of Computing * `ctl` - Center for Transportation & Logistics - * @param {number} [offset] The initial index from which to return the results. - * @param {Array} [platform] The platform on which learning resources are offered * `edx` - edX * `ocw` - OCW * `oll` - Open Learning Library * `mitxonline` - MITx Online * `bootcamps` - Bootcamps * `xpro` - xPRO * `csail` - CSAIL * `mitpe` - Professional Education * `see` - Sloan Executive Education * `scc` - Schwarzman College of Computing * `ctl` - Center for Transportation & Logistics * `whu` - WHU * `susskind` - Susskind * `globalalumni` - Global Alumni * `simplilearn` - Simplilearn * `emeritus` - Emeritus * `podcast` - Podcast * `youtube` - YouTube - * @param {boolean} [professional] - * @param {Array} [readable_id] Multiple values may be separated by commas. - * @param {Array} [resource_type] The type of learning resource * `course` - Course * `program` - Program * `learning_path` - Learning Path * `podcast` - Podcast * `podcast_episode` - Podcast Episode * `video` - Video * `video_playlist` - Video Playlist - * @param {ProgramsUpcomingListSortbyEnum} [sortby] Sort By * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `created_on` - Creation Date ascending * `-created_on` - CreationDate descending * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending - * @param {Array} [topic] Multiple values may be separated by commas. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async programsUpcomingList( - course_feature?: Array, - department?: Array, - free?: boolean, - learning_format?: Array>, - level?: Array, - limit?: number, - offered_by?: Array, - offset?: number, - platform?: Array, - professional?: boolean, - readable_id?: Array, - resource_type?: Array, - sortby?: ProgramsUpcomingListSortbyEnum, - topic?: Array, - options?: RawAxiosRequestConfig, - ): Promise< - ( - axios?: AxiosInstance, - basePath?: string, - ) => AxiosPromise - > { - const localVarAxiosArgs = - await localVarAxiosParamCreator.programsUpcomingList( - course_feature, - department, - free, - learning_format, - level, - limit, - offered_by, - offset, - platform, - professional, - readable_id, - resource_type, - sortby, - topic, - options, - ) - const index = configuration?.serverIndex ?? 0 - const operationBasePath = - operationServerMap["ProgramsApi.programsUpcomingList"]?.[index]?.url - return (axios, basePath) => - createRequestFunction( - localVarAxiosArgs, - globalAxios, - BASE_PATH, - configuration, - )(axios, operationBasePath || basePath) - }, } } @@ -18049,50 +15486,6 @@ export const ProgramsApiFactory = function ( ) .then((request) => request(axios, basePath)) }, - /** - * Get a paginated list of popular Programs. - * @summary List New - * @param {ProgramsApiProgramsNewListRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - programsNewList( - requestParameters: ProgramsApiProgramsNewListRequest = {}, - options?: RawAxiosRequestConfig, - ): AxiosPromise { - return localVarFp - .programsNewList( - requestParameters.course_feature, - requestParameters.department, - requestParameters.free, - requestParameters.learning_format, - requestParameters.level, - requestParameters.limit, - requestParameters.offered_by, - requestParameters.offset, - requestParameters.platform, - requestParameters.professional, - requestParameters.readable_id, - requestParameters.resource_type, - requestParameters.sortby, - requestParameters.topic, - options, - ) - .then((request) => request(axios, basePath)) - }, - /** - * Retrieve a list of popular resources - * @summary List Popular - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - programsPopularRetrieve( - options?: RawAxiosRequestConfig, - ): AxiosPromise { - return localVarFp - .programsPopularRetrieve(options) - .then((request) => request(axios, basePath)) - }, /** * Retrieve a single program * @summary Retrieve @@ -18108,37 +15501,6 @@ export const ProgramsApiFactory = function ( .programsRetrieve(requestParameters.id, options) .then((request) => request(axios, basePath)) }, - /** - * Get a paginated list of upcoming Programs. - * @summary List Upcoming - * @param {ProgramsApiProgramsUpcomingListRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - programsUpcomingList( - requestParameters: ProgramsApiProgramsUpcomingListRequest = {}, - options?: RawAxiosRequestConfig, - ): AxiosPromise { - return localVarFp - .programsUpcomingList( - requestParameters.course_feature, - requestParameters.department, - requestParameters.free, - requestParameters.learning_format, - requestParameters.level, - requestParameters.limit, - requestParameters.offered_by, - requestParameters.offset, - requestParameters.platform, - requestParameters.professional, - requestParameters.readable_id, - requestParameters.resource_type, - requestParameters.sortby, - requestParameters.topic, - options, - ) - .then((request) => request(axios, basePath)) - }, } } @@ -18233,8 +15595,8 @@ export interface ProgramsApiProgramsListRequest { readonly resource_type?: Array /** - * Sort By * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `created_on` - Creation Date ascending * `-created_on` - CreationDate descending * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending - * @type {'-created_on' | '-id' | '-last_modified' | '-mitcoursenumber' | '-readable_id' | '-start_date' | '-views' | 'created_on' | 'id' | 'last_modified' | 'mitcoursenumber' | 'readable_id' | 'start_date' | 'views'} + * Sort By * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `new` - Newest resources first * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending * `upcoming` - Next start date ascending + * @type {'-id' | '-last_modified' | '-mitcoursenumber' | '-readable_id' | '-start_date' | '-views' | 'id' | 'last_modified' | 'mitcoursenumber' | 'new' | 'readable_id' | 'start_date' | 'upcoming' | 'views'} * @memberof ProgramsApiProgramsList */ readonly sortby?: ProgramsListSortbyEnum @@ -18248,791 +15610,842 @@ export interface ProgramsApiProgramsListRequest { } /** - * Request parameters for programsNewList operation in ProgramsApi. + * Request parameters for programsRetrieve operation in ProgramsApi. * @export - * @interface ProgramsApiProgramsNewListRequest + * @interface ProgramsApiProgramsRetrieveRequest */ -export interface ProgramsApiProgramsNewListRequest { - /** - * Multiple values may be separated by commas. - * @type {Array} - * @memberof ProgramsApiProgramsNewList - */ - readonly course_feature?: Array - +export interface ProgramsApiProgramsRetrieveRequest { /** - * The department that offers learning resources * `1` - Civil and Environmental Engineering * `2` - Mechanical Engineering * `3` - Materials Science and Engineering * `4` - Architecture * `5` - Chemistry * `6` - Electrical Engineering and Computer Science * `7` - Biology * `8` - Physics * `9` - Brain and Cognitive Sciences * `10` - Chemical Engineering * `11` - Urban Studies and Planning * `12` - Earth, Atmospheric, and Planetary Sciences * `14` - Economics * `15` - Sloan School of Management * `16` - Aeronautics and Astronautics * `17` - Political Science * `18` - Mathematics * `20` - Biological Engineering * `21A` - Anthropology * `21G` - Global Studies and Languages * `21H` - History * `21L` - Literature * `21M` - Music and Theater Arts * `22` - Nuclear Science and Engineering * `24` - Linguistics and Philosophy * `CC` - Concourse * `CMS-W` - Comparative Media Studies/Writing * `EC` - Edgerton Center * `ES` - Experimental Study Group * `ESD` - Engineering Systems Division * `HST` - Health Sciences and Technology * `IDS` - Institute for Data, Systems, and Society * `MAS` - Media Arts and Sciences * `PE` - Athletics, Physical Education and Recreation * `RES` - Supplemental Resources * `STS` - Science, Technology, and Society * `WGS` - Women\'s and Gender Studies - * @type {Array<'1' | '10' | '11' | '12' | '14' | '15' | '16' | '17' | '18' | '2' | '20' | '21A' | '21G' | '21H' | '21L' | '21M' | '22' | '24' | '3' | '4' | '5' | '6' | '7' | '8' | '9' | 'CC' | 'CMS-W' | 'EC' | 'ES' | 'ESD' | 'HST' | 'IDS' | 'MAS' | 'PE' | 'RES' | 'STS' | 'WGS'>} - * @memberof ProgramsApiProgramsNewList + * A unique integer value identifying this learning resource. + * @type {number} + * @memberof ProgramsApiProgramsRetrieve */ - readonly department?: Array + readonly id: number +} +/** + * ProgramsApi - object-oriented interface + * @export + * @class ProgramsApi + * @extends {BaseAPI} + */ +export class ProgramsApi extends BaseAPI { /** - * The course/program is offered for free - * @type {boolean} - * @memberof ProgramsApiProgramsNewList + * Get a paginated list of programs + * @summary List + * @param {ProgramsApiProgramsListRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ProgramsApi */ - readonly free?: boolean + public programsList( + requestParameters: ProgramsApiProgramsListRequest = {}, + options?: RawAxiosRequestConfig, + ) { + return ProgramsApiFp(this.configuration) + .programsList( + requestParameters.course_feature, + requestParameters.department, + requestParameters.free, + requestParameters.learning_format, + requestParameters.level, + requestParameters.limit, + requestParameters.offered_by, + requestParameters.offset, + requestParameters.platform, + requestParameters.professional, + requestParameters.readable_id, + requestParameters.resource_type, + requestParameters.sortby, + requestParameters.topic, + options, + ) + .then((request) => request(this.axios, this.basePath)) + } /** - * The learning format of course/program resources * `online` - Online * `hybrid` - Hybrid * `in_person` - In person - * @type {Array>} - * @memberof ProgramsApiProgramsNewList + * Retrieve a single program + * @summary Retrieve + * @param {ProgramsApiProgramsRetrieveRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ProgramsApi */ - readonly learning_format?: Array> - - /** - * The academic level of the resources * `undergraduate` - Undergraduate * `graduate` - Graduate * `high_school` - High School * `noncredit` - Non-Credit * `advanced` - Advanced * `intermediate` - Intermediate * `introductory` - Introductory - * @type {Array<'advanced' | 'graduate' | 'high_school' | 'intermediate' | 'introductory' | 'noncredit' | 'undergraduate'>} - * @memberof ProgramsApiProgramsNewList - */ - readonly level?: Array - - /** - * Number of results to return per page. - * @type {number} - * @memberof ProgramsApiProgramsNewList - */ - readonly limit?: number - - /** - * The organization that offers a learning resource * `mitx` - MITx * `ocw` - OCW * `bootcamps` - Bootcamps * `xpro` - xPRO * `csail` - CSAIL * `mitpe` - Professional Education * `see` - Sloan Executive Education * `scc` - Schwarzman College of Computing * `ctl` - Center for Transportation & Logistics - * @type {Array<'bootcamps' | 'csail' | 'ctl' | 'mitpe' | 'mitx' | 'ocw' | 'scc' | 'see' | 'xpro'>} - * @memberof ProgramsApiProgramsNewList - */ - readonly offered_by?: Array - - /** - * The initial index from which to return the results. - * @type {number} - * @memberof ProgramsApiProgramsNewList - */ - readonly offset?: number - - /** - * The platform on which learning resources are offered * `edx` - edX * `ocw` - OCW * `oll` - Open Learning Library * `mitxonline` - MITx Online * `bootcamps` - Bootcamps * `xpro` - xPRO * `csail` - CSAIL * `mitpe` - Professional Education * `see` - Sloan Executive Education * `scc` - Schwarzman College of Computing * `ctl` - Center for Transportation & Logistics * `whu` - WHU * `susskind` - Susskind * `globalalumni` - Global Alumni * `simplilearn` - Simplilearn * `emeritus` - Emeritus * `podcast` - Podcast * `youtube` - YouTube - * @type {Array<'bootcamps' | 'csail' | 'ctl' | 'edx' | 'emeritus' | 'globalalumni' | 'mitpe' | 'mitxonline' | 'ocw' | 'oll' | 'podcast' | 'scc' | 'see' | 'simplilearn' | 'susskind' | 'whu' | 'xpro' | 'youtube'>} - * @memberof ProgramsApiProgramsNewList - */ - readonly platform?: Array - - /** - * - * @type {boolean} - * @memberof ProgramsApiProgramsNewList - */ - readonly professional?: boolean - - /** - * Multiple values may be separated by commas. - * @type {Array} - * @memberof ProgramsApiProgramsNewList - */ - readonly readable_id?: Array - - /** - * The type of learning resource * `course` - Course * `program` - Program * `learning_path` - Learning Path * `podcast` - Podcast * `podcast_episode` - Podcast Episode * `video` - Video * `video_playlist` - Video Playlist - * @type {Array<'course' | 'learning_path' | 'podcast' | 'podcast_episode' | 'program' | 'video' | 'video_playlist'>} - * @memberof ProgramsApiProgramsNewList - */ - readonly resource_type?: Array - - /** - * Sort By * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `created_on` - Creation Date ascending * `-created_on` - CreationDate descending * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending - * @type {'-created_on' | '-id' | '-last_modified' | '-mitcoursenumber' | '-readable_id' | '-start_date' | '-views' | 'created_on' | 'id' | 'last_modified' | 'mitcoursenumber' | 'readable_id' | 'start_date' | 'views'} - * @memberof ProgramsApiProgramsNewList - */ - readonly sortby?: ProgramsNewListSortbyEnum - - /** - * Multiple values may be separated by commas. - * @type {Array} - * @memberof ProgramsApiProgramsNewList - */ - readonly topic?: Array -} + public programsRetrieve( + requestParameters: ProgramsApiProgramsRetrieveRequest, + options?: RawAxiosRequestConfig, + ) { + return ProgramsApiFp(this.configuration) + .programsRetrieve(requestParameters.id, options) + .then((request) => request(this.axios, this.basePath)) + } +} /** - * Request parameters for programsRetrieve operation in ProgramsApi. * @export - * @interface ProgramsApiProgramsRetrieveRequest */ -export interface ProgramsApiProgramsRetrieveRequest { - /** - * A unique integer value identifying this learning resource. - * @type {number} - * @memberof ProgramsApiProgramsRetrieve - */ - readonly id: number -} - +export const ProgramsListDepartmentEnum = { + _1: "1", + _10: "10", + _11: "11", + _12: "12", + _14: "14", + _15: "15", + _16: "16", + _17: "17", + _18: "18", + _2: "2", + _20: "20", + _21A: "21A", + _21G: "21G", + _21H: "21H", + _21L: "21L", + _21M: "21M", + _22: "22", + _24: "24", + _3: "3", + _4: "4", + _5: "5", + _6: "6", + _7: "7", + _8: "8", + _9: "9", + Cc: "CC", + CmsW: "CMS-W", + Ec: "EC", + Es: "ES", + Esd: "ESD", + Hst: "HST", + Ids: "IDS", + Mas: "MAS", + Pe: "PE", + Res: "RES", + Sts: "STS", + Wgs: "WGS", +} as const +export type ProgramsListDepartmentEnum = + (typeof ProgramsListDepartmentEnum)[keyof typeof ProgramsListDepartmentEnum] /** - * Request parameters for programsUpcomingList operation in ProgramsApi. * @export - * @interface ProgramsApiProgramsUpcomingListRequest */ -export interface ProgramsApiProgramsUpcomingListRequest { - /** - * Multiple values may be separated by commas. - * @type {Array} - * @memberof ProgramsApiProgramsUpcomingList - */ - readonly course_feature?: Array +export const ProgramsListLevelEnum = { + Advanced: "advanced", + Graduate: "graduate", + HighSchool: "high_school", + Intermediate: "intermediate", + Introductory: "introductory", + Noncredit: "noncredit", + Undergraduate: "undergraduate", +} as const +export type ProgramsListLevelEnum = + (typeof ProgramsListLevelEnum)[keyof typeof ProgramsListLevelEnum] +/** + * @export + */ +export const ProgramsListOfferedByEnum = { + Bootcamps: "bootcamps", + Csail: "csail", + Ctl: "ctl", + Mitpe: "mitpe", + Mitx: "mitx", + Ocw: "ocw", + Scc: "scc", + See: "see", + Xpro: "xpro", +} as const +export type ProgramsListOfferedByEnum = + (typeof ProgramsListOfferedByEnum)[keyof typeof ProgramsListOfferedByEnum] +/** + * @export + */ +export const ProgramsListPlatformEnum = { + Bootcamps: "bootcamps", + Csail: "csail", + Ctl: "ctl", + Edx: "edx", + Emeritus: "emeritus", + Globalalumni: "globalalumni", + Mitpe: "mitpe", + Mitxonline: "mitxonline", + Ocw: "ocw", + Oll: "oll", + Podcast: "podcast", + Scc: "scc", + See: "see", + Simplilearn: "simplilearn", + Susskind: "susskind", + Whu: "whu", + Xpro: "xpro", + Youtube: "youtube", +} as const +export type ProgramsListPlatformEnum = + (typeof ProgramsListPlatformEnum)[keyof typeof ProgramsListPlatformEnum] +/** + * @export + */ +export const ProgramsListResourceTypeEnum = { + Course: "course", + LearningPath: "learning_path", + Podcast: "podcast", + PodcastEpisode: "podcast_episode", + Program: "program", + Video: "video", + VideoPlaylist: "video_playlist", +} as const +export type ProgramsListResourceTypeEnum = + (typeof ProgramsListResourceTypeEnum)[keyof typeof ProgramsListResourceTypeEnum] +/** + * @export + */ +export const ProgramsListSortbyEnum = { + Id: "-id", + LastModified: "-last_modified", + Mitcoursenumber: "-mitcoursenumber", + ReadableId: "-readable_id", + StartDate: "-start_date", + Views: "-views", + Id2: "id", + LastModified2: "last_modified", + Mitcoursenumber2: "mitcoursenumber", + New: "new", + ReadableId2: "readable_id", + StartDate2: "start_date", + Upcoming: "upcoming", + Views2: "views", +} as const +export type ProgramsListSortbyEnum = + (typeof ProgramsListSortbyEnum)[keyof typeof ProgramsListSortbyEnum] - /** - * The department that offers learning resources * `1` - Civil and Environmental Engineering * `2` - Mechanical Engineering * `3` - Materials Science and Engineering * `4` - Architecture * `5` - Chemistry * `6` - Electrical Engineering and Computer Science * `7` - Biology * `8` - Physics * `9` - Brain and Cognitive Sciences * `10` - Chemical Engineering * `11` - Urban Studies and Planning * `12` - Earth, Atmospheric, and Planetary Sciences * `14` - Economics * `15` - Sloan School of Management * `16` - Aeronautics and Astronautics * `17` - Political Science * `18` - Mathematics * `20` - Biological Engineering * `21A` - Anthropology * `21G` - Global Studies and Languages * `21H` - History * `21L` - Literature * `21M` - Music and Theater Arts * `22` - Nuclear Science and Engineering * `24` - Linguistics and Philosophy * `CC` - Concourse * `CMS-W` - Comparative Media Studies/Writing * `EC` - Edgerton Center * `ES` - Experimental Study Group * `ESD` - Engineering Systems Division * `HST` - Health Sciences and Technology * `IDS` - Institute for Data, Systems, and Society * `MAS` - Media Arts and Sciences * `PE` - Athletics, Physical Education and Recreation * `RES` - Supplemental Resources * `STS` - Science, Technology, and Society * `WGS` - Women\'s and Gender Studies - * @type {Array<'1' | '10' | '11' | '12' | '14' | '15' | '16' | '17' | '18' | '2' | '20' | '21A' | '21G' | '21H' | '21L' | '21M' | '22' | '24' | '3' | '4' | '5' | '6' | '7' | '8' | '9' | 'CC' | 'CMS-W' | 'EC' | 'ES' | 'ESD' | 'HST' | 'IDS' | 'MAS' | 'PE' | 'RES' | 'STS' | 'WGS'>} - * @memberof ProgramsApiProgramsUpcomingList - */ - readonly department?: Array +/** + * SchoolsApi - axios parameter creator + * @export + */ +export const SchoolsApiAxiosParamCreator = function ( + configuration?: Configuration, +) { + return { + /** + * MIT schools + * @summary List + * @param {number} [limit] Number of results to return per page. + * @param {number} [offset] The initial index from which to return the results. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + schoolsList: async ( + limit?: number, + offset?: number, + options: RawAxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/api/v1/schools/` + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } - /** - * The course/program is offered for free - * @type {boolean} - * @memberof ProgramsApiProgramsUpcomingList - */ - readonly free?: boolean + const localVarRequestOptions = { + method: "GET", + ...baseOptions, + ...options, + } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any - /** - * The learning format of course/program resources * `online` - Online * `hybrid` - Hybrid * `in_person` - In person - * @type {Array>} - * @memberof ProgramsApiProgramsUpcomingList - */ - readonly learning_format?: Array> + if (limit !== undefined) { + localVarQueryParameter["limit"] = limit + } - /** - * The academic level of the resources * `undergraduate` - Undergraduate * `graduate` - Graduate * `high_school` - High School * `noncredit` - Non-Credit * `advanced` - Advanced * `intermediate` - Intermediate * `introductory` - Introductory - * @type {Array<'advanced' | 'graduate' | 'high_school' | 'intermediate' | 'introductory' | 'noncredit' | 'undergraduate'>} - * @memberof ProgramsApiProgramsUpcomingList - */ - readonly level?: Array + if (offset !== undefined) { + localVarQueryParameter["offset"] = offset + } - /** - * Number of results to return per page. - * @type {number} - * @memberof ProgramsApiProgramsUpcomingList - */ - readonly limit?: number + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } - /** - * The organization that offers a learning resource * `mitx` - MITx * `ocw` - OCW * `bootcamps` - Bootcamps * `xpro` - xPRO * `csail` - CSAIL * `mitpe` - Professional Education * `see` - Sloan Executive Education * `scc` - Schwarzman College of Computing * `ctl` - Center for Transportation & Logistics - * @type {Array<'bootcamps' | 'csail' | 'ctl' | 'mitpe' | 'mitx' | 'ocw' | 'scc' | 'see' | 'xpro'>} - * @memberof ProgramsApiProgramsUpcomingList - */ - readonly offered_by?: Array + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * MIT schools + * @summary Retrieve + * @param {number} id A unique integer value identifying this learning resource school. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + schoolsRetrieve: async ( + id: number, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists("schoolsRetrieve", "id", id) + const localVarPath = `/api/v1/schools/{id}/`.replace( + `{${"id"}}`, + encodeURIComponent(String(id)), + ) + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } - /** - * The initial index from which to return the results. - * @type {number} - * @memberof ProgramsApiProgramsUpcomingList - */ - readonly offset?: number + const localVarRequestOptions = { + method: "GET", + ...baseOptions, + ...options, + } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any - /** - * The platform on which learning resources are offered * `edx` - edX * `ocw` - OCW * `oll` - Open Learning Library * `mitxonline` - MITx Online * `bootcamps` - Bootcamps * `xpro` - xPRO * `csail` - CSAIL * `mitpe` - Professional Education * `see` - Sloan Executive Education * `scc` - Schwarzman College of Computing * `ctl` - Center for Transportation & Logistics * `whu` - WHU * `susskind` - Susskind * `globalalumni` - Global Alumni * `simplilearn` - Simplilearn * `emeritus` - Emeritus * `podcast` - Podcast * `youtube` - YouTube - * @type {Array<'bootcamps' | 'csail' | 'ctl' | 'edx' | 'emeritus' | 'globalalumni' | 'mitpe' | 'mitxonline' | 'ocw' | 'oll' | 'podcast' | 'scc' | 'see' | 'simplilearn' | 'susskind' | 'whu' | 'xpro' | 'youtube'>} - * @memberof ProgramsApiProgramsUpcomingList - */ - readonly platform?: Array + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } - /** - * - * @type {boolean} - * @memberof ProgramsApiProgramsUpcomingList - */ - readonly professional?: boolean + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + } +} - /** - * Multiple values may be separated by commas. - * @type {Array} - * @memberof ProgramsApiProgramsUpcomingList - */ - readonly readable_id?: Array +/** + * SchoolsApi - functional programming interface + * @export + */ +export const SchoolsApiFp = function (configuration?: Configuration) { + const localVarAxiosParamCreator = SchoolsApiAxiosParamCreator(configuration) + return { + /** + * MIT schools + * @summary List + * @param {number} [limit] Number of results to return per page. + * @param {number} [offset] The initial index from which to return the results. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async schoolsList( + limit?: number, + offset?: number, + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = await localVarAxiosParamCreator.schoolsList( + limit, + offset, + options, + ) + const index = configuration?.serverIndex ?? 0 + const operationBasePath = + operationServerMap["SchoolsApi.schoolsList"]?.[index]?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, operationBasePath || basePath) + }, + /** + * MIT schools + * @summary Retrieve + * @param {number} id A unique integer value identifying this learning resource school. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async schoolsRetrieve( + id: number, + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = await localVarAxiosParamCreator.schoolsRetrieve( + id, + options, + ) + const index = configuration?.serverIndex ?? 0 + const operationBasePath = + operationServerMap["SchoolsApi.schoolsRetrieve"]?.[index]?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, operationBasePath || basePath) + }, + } +} + +/** + * SchoolsApi - factory interface + * @export + */ +export const SchoolsApiFactory = function ( + configuration?: Configuration, + basePath?: string, + axios?: AxiosInstance, +) { + const localVarFp = SchoolsApiFp(configuration) + return { + /** + * MIT schools + * @summary List + * @param {SchoolsApiSchoolsListRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + schoolsList( + requestParameters: SchoolsApiSchoolsListRequest = {}, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .schoolsList(requestParameters.limit, requestParameters.offset, options) + .then((request) => request(axios, basePath)) + }, + /** + * MIT schools + * @summary Retrieve + * @param {SchoolsApiSchoolsRetrieveRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + schoolsRetrieve( + requestParameters: SchoolsApiSchoolsRetrieveRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .schoolsRetrieve(requestParameters.id, options) + .then((request) => request(axios, basePath)) + }, + } +} +/** + * Request parameters for schoolsList operation in SchoolsApi. + * @export + * @interface SchoolsApiSchoolsListRequest + */ +export interface SchoolsApiSchoolsListRequest { /** - * The type of learning resource * `course` - Course * `program` - Program * `learning_path` - Learning Path * `podcast` - Podcast * `podcast_episode` - Podcast Episode * `video` - Video * `video_playlist` - Video Playlist - * @type {Array<'course' | 'learning_path' | 'podcast' | 'podcast_episode' | 'program' | 'video' | 'video_playlist'>} - * @memberof ProgramsApiProgramsUpcomingList + * Number of results to return per page. + * @type {number} + * @memberof SchoolsApiSchoolsList */ - readonly resource_type?: Array + readonly limit?: number /** - * Sort By * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `created_on` - Creation Date ascending * `-created_on` - CreationDate descending * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending - * @type {'-created_on' | '-id' | '-last_modified' | '-mitcoursenumber' | '-readable_id' | '-start_date' | '-views' | 'created_on' | 'id' | 'last_modified' | 'mitcoursenumber' | 'readable_id' | 'start_date' | 'views'} - * @memberof ProgramsApiProgramsUpcomingList + * The initial index from which to return the results. + * @type {number} + * @memberof SchoolsApiSchoolsList */ - readonly sortby?: ProgramsUpcomingListSortbyEnum + readonly offset?: number +} +/** + * Request parameters for schoolsRetrieve operation in SchoolsApi. + * @export + * @interface SchoolsApiSchoolsRetrieveRequest + */ +export interface SchoolsApiSchoolsRetrieveRequest { /** - * Multiple values may be separated by commas. - * @type {Array} - * @memberof ProgramsApiProgramsUpcomingList + * A unique integer value identifying this learning resource school. + * @type {number} + * @memberof SchoolsApiSchoolsRetrieve */ - readonly topic?: Array + readonly id: number } /** - * ProgramsApi - object-oriented interface + * SchoolsApi - object-oriented interface * @export - * @class ProgramsApi + * @class SchoolsApi * @extends {BaseAPI} */ -export class ProgramsApi extends BaseAPI { +export class SchoolsApi extends BaseAPI { /** - * Get a paginated list of programs + * MIT schools * @summary List - * @param {ProgramsApiProgramsListRequest} requestParameters Request parameters. + * @param {SchoolsApiSchoolsListRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof ProgramsApi + * @memberof SchoolsApi */ - public programsList( - requestParameters: ProgramsApiProgramsListRequest = {}, + public schoolsList( + requestParameters: SchoolsApiSchoolsListRequest = {}, options?: RawAxiosRequestConfig, ) { - return ProgramsApiFp(this.configuration) - .programsList( - requestParameters.course_feature, - requestParameters.department, - requestParameters.free, - requestParameters.learning_format, - requestParameters.level, - requestParameters.limit, - requestParameters.offered_by, - requestParameters.offset, - requestParameters.platform, - requestParameters.professional, - requestParameters.readable_id, - requestParameters.resource_type, - requestParameters.sortby, - requestParameters.topic, - options, - ) + return SchoolsApiFp(this.configuration) + .schoolsList(requestParameters.limit, requestParameters.offset, options) .then((request) => request(this.axios, this.basePath)) } /** - * Get a paginated list of popular Programs. - * @summary List New - * @param {ProgramsApiProgramsNewListRequest} requestParameters Request parameters. + * MIT schools + * @summary Retrieve + * @param {SchoolsApiSchoolsRetrieveRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof ProgramsApi + * @memberof SchoolsApi */ - public programsNewList( - requestParameters: ProgramsApiProgramsNewListRequest = {}, + public schoolsRetrieve( + requestParameters: SchoolsApiSchoolsRetrieveRequest, options?: RawAxiosRequestConfig, ) { - return ProgramsApiFp(this.configuration) - .programsNewList( - requestParameters.course_feature, - requestParameters.department, - requestParameters.free, - requestParameters.learning_format, - requestParameters.level, - requestParameters.limit, - requestParameters.offered_by, - requestParameters.offset, - requestParameters.platform, - requestParameters.professional, - requestParameters.readable_id, - requestParameters.resource_type, - requestParameters.sortby, - requestParameters.topic, - options, - ) + return SchoolsApiFp(this.configuration) + .schoolsRetrieve(requestParameters.id, options) .then((request) => request(this.axios, this.basePath)) } +} - /** - * Retrieve a list of popular resources - * @summary List Popular - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof ProgramsApi - */ - public programsPopularRetrieve(options?: RawAxiosRequestConfig) { - return ProgramsApiFp(this.configuration) - .programsPopularRetrieve(options) - .then((request) => request(this.axios, this.basePath)) - } +/** + * TopicsApi - axios parameter creator + * @export + */ +export const TopicsApiAxiosParamCreator = function ( + configuration?: Configuration, +) { + return { + /** + * Topics covered by learning resources + * @summary List + * @param {number} [limit] Number of results to return per page. + * @param {number} [offset] The initial index from which to return the results. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + topicsList: async ( + limit?: number, + offset?: number, + options: RawAxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/api/v1/topics/` + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } - /** - * Retrieve a single program - * @summary Retrieve - * @param {ProgramsApiProgramsRetrieveRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof ProgramsApi - */ - public programsRetrieve( - requestParameters: ProgramsApiProgramsRetrieveRequest, - options?: RawAxiosRequestConfig, - ) { - return ProgramsApiFp(this.configuration) - .programsRetrieve(requestParameters.id, options) - .then((request) => request(this.axios, this.basePath)) - } + const localVarRequestOptions = { + method: "GET", + ...baseOptions, + ...options, + } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any - /** - * Get a paginated list of upcoming Programs. - * @summary List Upcoming - * @param {ProgramsApiProgramsUpcomingListRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof ProgramsApi - */ - public programsUpcomingList( - requestParameters: ProgramsApiProgramsUpcomingListRequest = {}, - options?: RawAxiosRequestConfig, - ) { - return ProgramsApiFp(this.configuration) - .programsUpcomingList( - requestParameters.course_feature, - requestParameters.department, - requestParameters.free, - requestParameters.learning_format, - requestParameters.level, - requestParameters.limit, - requestParameters.offered_by, - requestParameters.offset, - requestParameters.platform, - requestParameters.professional, - requestParameters.readable_id, - requestParameters.resource_type, - requestParameters.sortby, - requestParameters.topic, - options, + if (limit !== undefined) { + localVarQueryParameter["limit"] = limit + } + + if (offset !== undefined) { + localVarQueryParameter["offset"] = offset + } + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * Topics covered by learning resources + * @summary Retrieve + * @param {number} id A unique integer value identifying this learning resource topic. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + topicsRetrieve: async ( + id: number, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists("topicsRetrieve", "id", id) + const localVarPath = `/api/v1/topics/{id}/`.replace( + `{${"id"}}`, + encodeURIComponent(String(id)), ) - .then((request) => request(this.axios, this.basePath)) + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { + method: "GET", + ...baseOptions, + ...options, + } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, } } /** + * TopicsApi - functional programming interface * @export */ -export const ProgramsListDepartmentEnum = { - _1: "1", - _10: "10", - _11: "11", - _12: "12", - _14: "14", - _15: "15", - _16: "16", - _17: "17", - _18: "18", - _2: "2", - _20: "20", - _21A: "21A", - _21G: "21G", - _21H: "21H", - _21L: "21L", - _21M: "21M", - _22: "22", - _24: "24", - _3: "3", - _4: "4", - _5: "5", - _6: "6", - _7: "7", - _8: "8", - _9: "9", - Cc: "CC", - CmsW: "CMS-W", - Ec: "EC", - Es: "ES", - Esd: "ESD", - Hst: "HST", - Ids: "IDS", - Mas: "MAS", - Pe: "PE", - Res: "RES", - Sts: "STS", - Wgs: "WGS", -} as const -export type ProgramsListDepartmentEnum = - (typeof ProgramsListDepartmentEnum)[keyof typeof ProgramsListDepartmentEnum] -/** - * @export - */ -export const ProgramsListLevelEnum = { - Advanced: "advanced", - Graduate: "graduate", - HighSchool: "high_school", - Intermediate: "intermediate", - Introductory: "introductory", - Noncredit: "noncredit", - Undergraduate: "undergraduate", -} as const -export type ProgramsListLevelEnum = - (typeof ProgramsListLevelEnum)[keyof typeof ProgramsListLevelEnum] -/** - * @export - */ -export const ProgramsListOfferedByEnum = { - Bootcamps: "bootcamps", - Csail: "csail", - Ctl: "ctl", - Mitpe: "mitpe", - Mitx: "mitx", - Ocw: "ocw", - Scc: "scc", - See: "see", - Xpro: "xpro", -} as const -export type ProgramsListOfferedByEnum = - (typeof ProgramsListOfferedByEnum)[keyof typeof ProgramsListOfferedByEnum] -/** - * @export - */ -export const ProgramsListPlatformEnum = { - Bootcamps: "bootcamps", - Csail: "csail", - Ctl: "ctl", - Edx: "edx", - Emeritus: "emeritus", - Globalalumni: "globalalumni", - Mitpe: "mitpe", - Mitxonline: "mitxonline", - Ocw: "ocw", - Oll: "oll", - Podcast: "podcast", - Scc: "scc", - See: "see", - Simplilearn: "simplilearn", - Susskind: "susskind", - Whu: "whu", - Xpro: "xpro", - Youtube: "youtube", -} as const -export type ProgramsListPlatformEnum = - (typeof ProgramsListPlatformEnum)[keyof typeof ProgramsListPlatformEnum] -/** - * @export - */ -export const ProgramsListResourceTypeEnum = { - Course: "course", - LearningPath: "learning_path", - Podcast: "podcast", - PodcastEpisode: "podcast_episode", - Program: "program", - Video: "video", - VideoPlaylist: "video_playlist", -} as const -export type ProgramsListResourceTypeEnum = - (typeof ProgramsListResourceTypeEnum)[keyof typeof ProgramsListResourceTypeEnum] +export const TopicsApiFp = function (configuration?: Configuration) { + const localVarAxiosParamCreator = TopicsApiAxiosParamCreator(configuration) + return { + /** + * Topics covered by learning resources + * @summary List + * @param {number} [limit] Number of results to return per page. + * @param {number} [offset] The initial index from which to return the results. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async topicsList( + limit?: number, + offset?: number, + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = await localVarAxiosParamCreator.topicsList( + limit, + offset, + options, + ) + const index = configuration?.serverIndex ?? 0 + const operationBasePath = + operationServerMap["TopicsApi.topicsList"]?.[index]?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, operationBasePath || basePath) + }, + /** + * Topics covered by learning resources + * @summary Retrieve + * @param {number} id A unique integer value identifying this learning resource topic. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async topicsRetrieve( + id: number, + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = await localVarAxiosParamCreator.topicsRetrieve( + id, + options, + ) + const index = configuration?.serverIndex ?? 0 + const operationBasePath = + operationServerMap["TopicsApi.topicsRetrieve"]?.[index]?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, operationBasePath || basePath) + }, + } +} + /** + * TopicsApi - factory interface * @export */ -export const ProgramsListSortbyEnum = { - CreatedOn: "-created_on", - Id: "-id", - LastModified: "-last_modified", - Mitcoursenumber: "-mitcoursenumber", - ReadableId: "-readable_id", - StartDate: "-start_date", - Views: "-views", - CreatedOn2: "created_on", - Id2: "id", - LastModified2: "last_modified", - Mitcoursenumber2: "mitcoursenumber", - ReadableId2: "readable_id", - StartDate2: "start_date", - Views2: "views", -} as const -export type ProgramsListSortbyEnum = - (typeof ProgramsListSortbyEnum)[keyof typeof ProgramsListSortbyEnum] +export const TopicsApiFactory = function ( + configuration?: Configuration, + basePath?: string, + axios?: AxiosInstance, +) { + const localVarFp = TopicsApiFp(configuration) + return { + /** + * Topics covered by learning resources + * @summary List + * @param {TopicsApiTopicsListRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + topicsList( + requestParameters: TopicsApiTopicsListRequest = {}, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .topicsList(requestParameters.limit, requestParameters.offset, options) + .then((request) => request(axios, basePath)) + }, + /** + * Topics covered by learning resources + * @summary Retrieve + * @param {TopicsApiTopicsRetrieveRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + topicsRetrieve( + requestParameters: TopicsApiTopicsRetrieveRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .topicsRetrieve(requestParameters.id, options) + .then((request) => request(axios, basePath)) + }, + } +} + /** + * Request parameters for topicsList operation in TopicsApi. * @export + * @interface TopicsApiTopicsListRequest */ -export const ProgramsNewListDepartmentEnum = { - _1: "1", - _10: "10", - _11: "11", - _12: "12", - _14: "14", - _15: "15", - _16: "16", - _17: "17", - _18: "18", - _2: "2", - _20: "20", - _21A: "21A", - _21G: "21G", - _21H: "21H", - _21L: "21L", - _21M: "21M", - _22: "22", - _24: "24", - _3: "3", - _4: "4", - _5: "5", - _6: "6", - _7: "7", - _8: "8", - _9: "9", - Cc: "CC", - CmsW: "CMS-W", - Ec: "EC", - Es: "ES", - Esd: "ESD", - Hst: "HST", - Ids: "IDS", - Mas: "MAS", - Pe: "PE", - Res: "RES", - Sts: "STS", - Wgs: "WGS", -} as const -export type ProgramsNewListDepartmentEnum = - (typeof ProgramsNewListDepartmentEnum)[keyof typeof ProgramsNewListDepartmentEnum] +export interface TopicsApiTopicsListRequest { + /** + * Number of results to return per page. + * @type {number} + * @memberof TopicsApiTopicsList + */ + readonly limit?: number + + /** + * The initial index from which to return the results. + * @type {number} + * @memberof TopicsApiTopicsList + */ + readonly offset?: number +} + /** + * Request parameters for topicsRetrieve operation in TopicsApi. * @export + * @interface TopicsApiTopicsRetrieveRequest */ -export const ProgramsNewListLevelEnum = { - Advanced: "advanced", - Graduate: "graduate", - HighSchool: "high_school", - Intermediate: "intermediate", - Introductory: "introductory", - Noncredit: "noncredit", - Undergraduate: "undergraduate", -} as const -export type ProgramsNewListLevelEnum = - (typeof ProgramsNewListLevelEnum)[keyof typeof ProgramsNewListLevelEnum] +export interface TopicsApiTopicsRetrieveRequest { + /** + * A unique integer value identifying this learning resource topic. + * @type {number} + * @memberof TopicsApiTopicsRetrieve + */ + readonly id: number +} + /** + * TopicsApi - object-oriented interface * @export + * @class TopicsApi + * @extends {BaseAPI} */ -export const ProgramsNewListOfferedByEnum = { - Bootcamps: "bootcamps", - Csail: "csail", - Ctl: "ctl", - Mitpe: "mitpe", - Mitx: "mitx", - Ocw: "ocw", - Scc: "scc", - See: "see", - Xpro: "xpro", -} as const -export type ProgramsNewListOfferedByEnum = - (typeof ProgramsNewListOfferedByEnum)[keyof typeof ProgramsNewListOfferedByEnum] -/** - * @export - */ -export const ProgramsNewListPlatformEnum = { - Bootcamps: "bootcamps", - Csail: "csail", - Ctl: "ctl", - Edx: "edx", - Emeritus: "emeritus", - Globalalumni: "globalalumni", - Mitpe: "mitpe", - Mitxonline: "mitxonline", - Ocw: "ocw", - Oll: "oll", - Podcast: "podcast", - Scc: "scc", - See: "see", - Simplilearn: "simplilearn", - Susskind: "susskind", - Whu: "whu", - Xpro: "xpro", - Youtube: "youtube", -} as const -export type ProgramsNewListPlatformEnum = - (typeof ProgramsNewListPlatformEnum)[keyof typeof ProgramsNewListPlatformEnum] -/** - * @export - */ -export const ProgramsNewListResourceTypeEnum = { - Course: "course", - LearningPath: "learning_path", - Podcast: "podcast", - PodcastEpisode: "podcast_episode", - Program: "program", - Video: "video", - VideoPlaylist: "video_playlist", -} as const -export type ProgramsNewListResourceTypeEnum = - (typeof ProgramsNewListResourceTypeEnum)[keyof typeof ProgramsNewListResourceTypeEnum] -/** - * @export - */ -export const ProgramsNewListSortbyEnum = { - CreatedOn: "-created_on", - Id: "-id", - LastModified: "-last_modified", - Mitcoursenumber: "-mitcoursenumber", - ReadableId: "-readable_id", - StartDate: "-start_date", - Views: "-views", - CreatedOn2: "created_on", - Id2: "id", - LastModified2: "last_modified", - Mitcoursenumber2: "mitcoursenumber", - ReadableId2: "readable_id", - StartDate2: "start_date", - Views2: "views", -} as const -export type ProgramsNewListSortbyEnum = - (typeof ProgramsNewListSortbyEnum)[keyof typeof ProgramsNewListSortbyEnum] -/** - * @export - */ -export const ProgramsUpcomingListDepartmentEnum = { - _1: "1", - _10: "10", - _11: "11", - _12: "12", - _14: "14", - _15: "15", - _16: "16", - _17: "17", - _18: "18", - _2: "2", - _20: "20", - _21A: "21A", - _21G: "21G", - _21H: "21H", - _21L: "21L", - _21M: "21M", - _22: "22", - _24: "24", - _3: "3", - _4: "4", - _5: "5", - _6: "6", - _7: "7", - _8: "8", - _9: "9", - Cc: "CC", - CmsW: "CMS-W", - Ec: "EC", - Es: "ES", - Esd: "ESD", - Hst: "HST", - Ids: "IDS", - Mas: "MAS", - Pe: "PE", - Res: "RES", - Sts: "STS", - Wgs: "WGS", -} as const -export type ProgramsUpcomingListDepartmentEnum = - (typeof ProgramsUpcomingListDepartmentEnum)[keyof typeof ProgramsUpcomingListDepartmentEnum] -/** - * @export - */ -export const ProgramsUpcomingListLevelEnum = { - Advanced: "advanced", - Graduate: "graduate", - HighSchool: "high_school", - Intermediate: "intermediate", - Introductory: "introductory", - Noncredit: "noncredit", - Undergraduate: "undergraduate", -} as const -export type ProgramsUpcomingListLevelEnum = - (typeof ProgramsUpcomingListLevelEnum)[keyof typeof ProgramsUpcomingListLevelEnum] -/** - * @export - */ -export const ProgramsUpcomingListOfferedByEnum = { - Bootcamps: "bootcamps", - Csail: "csail", - Ctl: "ctl", - Mitpe: "mitpe", - Mitx: "mitx", - Ocw: "ocw", - Scc: "scc", - See: "see", - Xpro: "xpro", -} as const -export type ProgramsUpcomingListOfferedByEnum = - (typeof ProgramsUpcomingListOfferedByEnum)[keyof typeof ProgramsUpcomingListOfferedByEnum] -/** - * @export - */ -export const ProgramsUpcomingListPlatformEnum = { - Bootcamps: "bootcamps", - Csail: "csail", - Ctl: "ctl", - Edx: "edx", - Emeritus: "emeritus", - Globalalumni: "globalalumni", - Mitpe: "mitpe", - Mitxonline: "mitxonline", - Ocw: "ocw", - Oll: "oll", - Podcast: "podcast", - Scc: "scc", - See: "see", - Simplilearn: "simplilearn", - Susskind: "susskind", - Whu: "whu", - Xpro: "xpro", - Youtube: "youtube", -} as const -export type ProgramsUpcomingListPlatformEnum = - (typeof ProgramsUpcomingListPlatformEnum)[keyof typeof ProgramsUpcomingListPlatformEnum] -/** - * @export - */ -export const ProgramsUpcomingListResourceTypeEnum = { - Course: "course", - LearningPath: "learning_path", - Podcast: "podcast", - PodcastEpisode: "podcast_episode", - Program: "program", - Video: "video", - VideoPlaylist: "video_playlist", -} as const -export type ProgramsUpcomingListResourceTypeEnum = - (typeof ProgramsUpcomingListResourceTypeEnum)[keyof typeof ProgramsUpcomingListResourceTypeEnum] -/** - * @export - */ -export const ProgramsUpcomingListSortbyEnum = { - CreatedOn: "-created_on", - Id: "-id", - LastModified: "-last_modified", - Mitcoursenumber: "-mitcoursenumber", - ReadableId: "-readable_id", - StartDate: "-start_date", - Views: "-views", - CreatedOn2: "created_on", - Id2: "id", - LastModified2: "last_modified", - Mitcoursenumber2: "mitcoursenumber", - ReadableId2: "readable_id", - StartDate2: "start_date", - Views2: "views", -} as const -export type ProgramsUpcomingListSortbyEnum = - (typeof ProgramsUpcomingListSortbyEnum)[keyof typeof ProgramsUpcomingListSortbyEnum] +export class TopicsApi extends BaseAPI { + /** + * Topics covered by learning resources + * @summary List + * @param {TopicsApiTopicsListRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof TopicsApi + */ + public topicsList( + requestParameters: TopicsApiTopicsListRequest = {}, + options?: RawAxiosRequestConfig, + ) { + return TopicsApiFp(this.configuration) + .topicsList(requestParameters.limit, requestParameters.offset, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Topics covered by learning resources + * @summary Retrieve + * @param {TopicsApiTopicsRetrieveRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof TopicsApi + */ + public topicsRetrieve( + requestParameters: TopicsApiTopicsRetrieveRequest, + options?: RawAxiosRequestConfig, + ) { + return TopicsApiFp(this.configuration) + .topicsRetrieve(requestParameters.id, options) + .then((request) => request(this.axios, this.basePath)) + } +} /** - * SchoolsApi - axios parameter creator + * UserlistsApi - axios parameter creator * @export */ -export const SchoolsApiAxiosParamCreator = function ( +export const UserlistsApiAxiosParamCreator = function ( configuration?: Configuration, ) { return { /** - * MIT schools - * @summary List - * @param {number} [limit] Number of results to return per page. - * @param {number} [offset] The initial index from which to return the results. + * Viewset for UserLists + * @summary Create + * @param {UserListRequest} UserListRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ - schoolsList: async ( - limit?: number, - offset?: number, + userlistsCreate: async ( + UserListRequest: UserListRequest, options: RawAxiosRequestConfig = {}, ): Promise => { - const localVarPath = `/api/v1/schools/` + // verify required parameter 'UserListRequest' is not null or undefined + assertParamExists("userlistsCreate", "UserListRequest", UserListRequest) + const localVarPath = `/api/v1/userlists/` // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) let baseOptions @@ -19041,20 +16454,14 @@ export const SchoolsApiAxiosParamCreator = function ( } const localVarRequestOptions = { - method: "GET", + method: "POST", ...baseOptions, ...options, } const localVarHeaderParameter = {} as any const localVarQueryParameter = {} as any - if (limit !== undefined) { - localVarQueryParameter["limit"] = limit - } - - if (offset !== undefined) { - localVarQueryParameter["offset"] = offset - } + localVarHeaderParameter["Content-Type"] = "application/json" setSearchParams(localVarUrlObj, localVarQueryParameter) let headersFromBaseOptions = @@ -19064,6 +16471,11 @@ export const SchoolsApiAxiosParamCreator = function ( ...headersFromBaseOptions, ...options.headers, } + localVarRequestOptions.data = serializeDataIfNeeded( + UserListRequest, + localVarRequestOptions, + configuration, + ) return { url: toPathString(localVarUrlObj), @@ -19071,19 +16483,19 @@ export const SchoolsApiAxiosParamCreator = function ( } }, /** - * MIT schools - * @summary Retrieve - * @param {number} id A unique integer value identifying this learning resource school. + * Viewset for UserLists + * @summary Destroy + * @param {number} id A unique integer value identifying this user list. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - schoolsRetrieve: async ( + userlistsDestroy: async ( id: number, options: RawAxiosRequestConfig = {}, ): Promise => { // verify required parameter 'id' is not null or undefined - assertParamExists("schoolsRetrieve", "id", id) - const localVarPath = `/api/v1/schools/{id}/`.replace( + assertParamExists("userlistsDestroy", "id", id) + const localVarPath = `/api/v1/userlists/{id}/`.replace( `{${"id"}}`, encodeURIComponent(String(id)), ) @@ -19095,7 +16507,7 @@ export const SchoolsApiAxiosParamCreator = function ( } const localVarRequestOptions = { - method: "GET", + method: "DELETE", ...baseOptions, ...options, } @@ -19116,227 +16528,31 @@ export const SchoolsApiAxiosParamCreator = function ( options: localVarRequestOptions, } }, - } -} - -/** - * SchoolsApi - functional programming interface - * @export - */ -export const SchoolsApiFp = function (configuration?: Configuration) { - const localVarAxiosParamCreator = SchoolsApiAxiosParamCreator(configuration) - return { - /** - * MIT schools - * @summary List - * @param {number} [limit] Number of results to return per page. - * @param {number} [offset] The initial index from which to return the results. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async schoolsList( - limit?: number, - offset?: number, - options?: RawAxiosRequestConfig, - ): Promise< - ( - axios?: AxiosInstance, - basePath?: string, - ) => AxiosPromise - > { - const localVarAxiosArgs = await localVarAxiosParamCreator.schoolsList( - limit, - offset, - options, - ) - const index = configuration?.serverIndex ?? 0 - const operationBasePath = - operationServerMap["SchoolsApi.schoolsList"]?.[index]?.url - return (axios, basePath) => - createRequestFunction( - localVarAxiosArgs, - globalAxios, - BASE_PATH, - configuration, - )(axios, operationBasePath || basePath) - }, - /** - * MIT schools - * @summary Retrieve - * @param {number} id A unique integer value identifying this learning resource school. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async schoolsRetrieve( - id: number, - options?: RawAxiosRequestConfig, - ): Promise< - ( - axios?: AxiosInstance, - basePath?: string, - ) => AxiosPromise - > { - const localVarAxiosArgs = await localVarAxiosParamCreator.schoolsRetrieve( - id, - options, - ) - const index = configuration?.serverIndex ?? 0 - const operationBasePath = - operationServerMap["SchoolsApi.schoolsRetrieve"]?.[index]?.url - return (axios, basePath) => - createRequestFunction( - localVarAxiosArgs, - globalAxios, - BASE_PATH, - configuration, - )(axios, operationBasePath || basePath) - }, - } -} - -/** - * SchoolsApi - factory interface - * @export - */ -export const SchoolsApiFactory = function ( - configuration?: Configuration, - basePath?: string, - axios?: AxiosInstance, -) { - const localVarFp = SchoolsApiFp(configuration) - return { - /** - * MIT schools - * @summary List - * @param {SchoolsApiSchoolsListRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - schoolsList( - requestParameters: SchoolsApiSchoolsListRequest = {}, - options?: RawAxiosRequestConfig, - ): AxiosPromise { - return localVarFp - .schoolsList(requestParameters.limit, requestParameters.offset, options) - .then((request) => request(axios, basePath)) - }, - /** - * MIT schools - * @summary Retrieve - * @param {SchoolsApiSchoolsRetrieveRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - schoolsRetrieve( - requestParameters: SchoolsApiSchoolsRetrieveRequest, - options?: RawAxiosRequestConfig, - ): AxiosPromise { - return localVarFp - .schoolsRetrieve(requestParameters.id, options) - .then((request) => request(axios, basePath)) - }, - } -} - -/** - * Request parameters for schoolsList operation in SchoolsApi. - * @export - * @interface SchoolsApiSchoolsListRequest - */ -export interface SchoolsApiSchoolsListRequest { - /** - * Number of results to return per page. - * @type {number} - * @memberof SchoolsApiSchoolsList - */ - readonly limit?: number - - /** - * The initial index from which to return the results. - * @type {number} - * @memberof SchoolsApiSchoolsList - */ - readonly offset?: number -} - -/** - * Request parameters for schoolsRetrieve operation in SchoolsApi. - * @export - * @interface SchoolsApiSchoolsRetrieveRequest - */ -export interface SchoolsApiSchoolsRetrieveRequest { - /** - * A unique integer value identifying this learning resource school. - * @type {number} - * @memberof SchoolsApiSchoolsRetrieve - */ - readonly id: number -} - -/** - * SchoolsApi - object-oriented interface - * @export - * @class SchoolsApi - * @extends {BaseAPI} - */ -export class SchoolsApi extends BaseAPI { - /** - * MIT schools - * @summary List - * @param {SchoolsApiSchoolsListRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof SchoolsApi - */ - public schoolsList( - requestParameters: SchoolsApiSchoolsListRequest = {}, - options?: RawAxiosRequestConfig, - ) { - return SchoolsApiFp(this.configuration) - .schoolsList(requestParameters.limit, requestParameters.offset, options) - .then((request) => request(this.axios, this.basePath)) - } - - /** - * MIT schools - * @summary Retrieve - * @param {SchoolsApiSchoolsRetrieveRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof SchoolsApi - */ - public schoolsRetrieve( - requestParameters: SchoolsApiSchoolsRetrieveRequest, - options?: RawAxiosRequestConfig, - ) { - return SchoolsApiFp(this.configuration) - .schoolsRetrieve(requestParameters.id, options) - .then((request) => request(this.axios, this.basePath)) - } -} - -/** - * TopicsApi - axios parameter creator - * @export - */ -export const TopicsApiAxiosParamCreator = function ( - configuration?: Configuration, -) { - return { /** - * Topics covered by learning resources - * @summary List - * @param {number} [limit] Number of results to return per page. - * @param {number} [offset] The initial index from which to return the results. + * Viewset for UserListRelationships + * @summary User List Resource Relationship Add + * @param {number} userlist_id id of the parent user list + * @param {UserListRelationshipRequest} UserListRelationshipRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ - topicsList: async ( - limit?: number, - offset?: number, + userlistsItemsCreate: async ( + userlist_id: number, + UserListRelationshipRequest: UserListRelationshipRequest, options: RawAxiosRequestConfig = {}, ): Promise => { - const localVarPath = `/api/v1/topics/` + // verify required parameter 'userlist_id' is not null or undefined + assertParamExists("userlistsItemsCreate", "userlist_id", userlist_id) + // verify required parameter 'UserListRelationshipRequest' is not null or undefined + assertParamExists( + "userlistsItemsCreate", + "UserListRelationshipRequest", + UserListRelationshipRequest, + ) + const localVarPath = `/api/v1/userlists/{userlist_id}/items/`.replace( + `{${"userlist_id"}}`, + encodeURIComponent(String(userlist_id)), + ) // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) let baseOptions @@ -19345,20 +16561,14 @@ export const TopicsApiAxiosParamCreator = function ( } const localVarRequestOptions = { - method: "GET", + method: "POST", ...baseOptions, ...options, } const localVarHeaderParameter = {} as any const localVarQueryParameter = {} as any - if (limit !== undefined) { - localVarQueryParameter["limit"] = limit - } - - if (offset !== undefined) { - localVarQueryParameter["offset"] = offset - } + localVarHeaderParameter["Content-Type"] = "application/json" setSearchParams(localVarUrlObj, localVarQueryParameter) let headersFromBaseOptions = @@ -19368,6 +16578,11 @@ export const TopicsApiAxiosParamCreator = function ( ...headersFromBaseOptions, ...options.headers, } + localVarRequestOptions.data = serializeDataIfNeeded( + UserListRelationshipRequest, + localVarRequestOptions, + configuration, + ) return { url: toPathString(localVarUrlObj), @@ -19375,22 +16590,25 @@ export const TopicsApiAxiosParamCreator = function ( } }, /** - * Topics covered by learning resources - * @summary Retrieve - * @param {number} id A unique integer value identifying this learning resource topic. + * Viewset for UserListRelationships + * @summary User List Resource Relationship Remove + * @param {number} id A unique integer value identifying this user list relationship. + * @param {number} userlist_id id of the parent user list * @param {*} [options] Override http request option. * @throws {RequiredError} */ - topicsRetrieve: async ( + userlistsItemsDestroy: async ( id: number, + userlist_id: number, options: RawAxiosRequestConfig = {}, ): Promise => { // verify required parameter 'id' is not null or undefined - assertParamExists("topicsRetrieve", "id", id) - const localVarPath = `/api/v1/topics/{id}/`.replace( - `{${"id"}}`, - encodeURIComponent(String(id)), - ) + assertParamExists("userlistsItemsDestroy", "id", id) + // verify required parameter 'userlist_id' is not null or undefined + assertParamExists("userlistsItemsDestroy", "userlist_id", userlist_id) + const localVarPath = `/api/v1/userlists/{userlist_id}/items/{id}/` + .replace(`{${"id"}}`, encodeURIComponent(String(id))) + .replace(`{${"userlist_id"}}`, encodeURIComponent(String(userlist_id))) // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) let baseOptions @@ -19399,7 +16617,7 @@ export const TopicsApiAxiosParamCreator = function ( } const localVarRequestOptions = { - method: "GET", + method: "DELETE", ...baseOptions, ...options, } @@ -19420,227 +16638,27 @@ export const TopicsApiAxiosParamCreator = function ( options: localVarRequestOptions, } }, - } -} - -/** - * TopicsApi - functional programming interface - * @export - */ -export const TopicsApiFp = function (configuration?: Configuration) { - const localVarAxiosParamCreator = TopicsApiAxiosParamCreator(configuration) - return { /** - * Topics covered by learning resources - * @summary List + * Viewset for UserListRelationships + * @summary User List Resources List + * @param {number} userlist_id id of the parent user list * @param {number} [limit] Number of results to return per page. * @param {number} [offset] The initial index from which to return the results. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async topicsList( + userlistsItemsList: async ( + userlist_id: number, limit?: number, offset?: number, - options?: RawAxiosRequestConfig, - ): Promise< - ( - axios?: AxiosInstance, - basePath?: string, - ) => AxiosPromise - > { - const localVarAxiosArgs = await localVarAxiosParamCreator.topicsList( - limit, - offset, - options, - ) - const index = configuration?.serverIndex ?? 0 - const operationBasePath = - operationServerMap["TopicsApi.topicsList"]?.[index]?.url - return (axios, basePath) => - createRequestFunction( - localVarAxiosArgs, - globalAxios, - BASE_PATH, - configuration, - )(axios, operationBasePath || basePath) - }, - /** - * Topics covered by learning resources - * @summary Retrieve - * @param {number} id A unique integer value identifying this learning resource topic. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async topicsRetrieve( - id: number, - options?: RawAxiosRequestConfig, - ): Promise< - ( - axios?: AxiosInstance, - basePath?: string, - ) => AxiosPromise - > { - const localVarAxiosArgs = await localVarAxiosParamCreator.topicsRetrieve( - id, - options, - ) - const index = configuration?.serverIndex ?? 0 - const operationBasePath = - operationServerMap["TopicsApi.topicsRetrieve"]?.[index]?.url - return (axios, basePath) => - createRequestFunction( - localVarAxiosArgs, - globalAxios, - BASE_PATH, - configuration, - )(axios, operationBasePath || basePath) - }, - } -} - -/** - * TopicsApi - factory interface - * @export - */ -export const TopicsApiFactory = function ( - configuration?: Configuration, - basePath?: string, - axios?: AxiosInstance, -) { - const localVarFp = TopicsApiFp(configuration) - return { - /** - * Topics covered by learning resources - * @summary List - * @param {TopicsApiTopicsListRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - topicsList( - requestParameters: TopicsApiTopicsListRequest = {}, - options?: RawAxiosRequestConfig, - ): AxiosPromise { - return localVarFp - .topicsList(requestParameters.limit, requestParameters.offset, options) - .then((request) => request(axios, basePath)) - }, - /** - * Topics covered by learning resources - * @summary Retrieve - * @param {TopicsApiTopicsRetrieveRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - topicsRetrieve( - requestParameters: TopicsApiTopicsRetrieveRequest, - options?: RawAxiosRequestConfig, - ): AxiosPromise { - return localVarFp - .topicsRetrieve(requestParameters.id, options) - .then((request) => request(axios, basePath)) - }, - } -} - -/** - * Request parameters for topicsList operation in TopicsApi. - * @export - * @interface TopicsApiTopicsListRequest - */ -export interface TopicsApiTopicsListRequest { - /** - * Number of results to return per page. - * @type {number} - * @memberof TopicsApiTopicsList - */ - readonly limit?: number - - /** - * The initial index from which to return the results. - * @type {number} - * @memberof TopicsApiTopicsList - */ - readonly offset?: number -} - -/** - * Request parameters for topicsRetrieve operation in TopicsApi. - * @export - * @interface TopicsApiTopicsRetrieveRequest - */ -export interface TopicsApiTopicsRetrieveRequest { - /** - * A unique integer value identifying this learning resource topic. - * @type {number} - * @memberof TopicsApiTopicsRetrieve - */ - readonly id: number -} - -/** - * TopicsApi - object-oriented interface - * @export - * @class TopicsApi - * @extends {BaseAPI} - */ -export class TopicsApi extends BaseAPI { - /** - * Topics covered by learning resources - * @summary List - * @param {TopicsApiTopicsListRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof TopicsApi - */ - public topicsList( - requestParameters: TopicsApiTopicsListRequest = {}, - options?: RawAxiosRequestConfig, - ) { - return TopicsApiFp(this.configuration) - .topicsList(requestParameters.limit, requestParameters.offset, options) - .then((request) => request(this.axios, this.basePath)) - } - - /** - * Topics covered by learning resources - * @summary Retrieve - * @param {TopicsApiTopicsRetrieveRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof TopicsApi - */ - public topicsRetrieve( - requestParameters: TopicsApiTopicsRetrieveRequest, - options?: RawAxiosRequestConfig, - ) { - return TopicsApiFp(this.configuration) - .topicsRetrieve(requestParameters.id, options) - .then((request) => request(this.axios, this.basePath)) - } -} - -/** - * UserlistsApi - axios parameter creator - * @export - */ -export const UserlistsApiAxiosParamCreator = function ( - configuration?: Configuration, -) { - return { - /** - * Viewset for UserLists - * @summary Create - * @param {UserListRequest} UserListRequest - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - userlistsCreate: async ( - UserListRequest: UserListRequest, options: RawAxiosRequestConfig = {}, ): Promise => { - // verify required parameter 'UserListRequest' is not null or undefined - assertParamExists("userlistsCreate", "UserListRequest", UserListRequest) - const localVarPath = `/api/v1/userlists/` + // verify required parameter 'userlist_id' is not null or undefined + assertParamExists("userlistsItemsList", "userlist_id", userlist_id) + const localVarPath = `/api/v1/userlists/{userlist_id}/items/`.replace( + `{${"userlist_id"}}`, + encodeURIComponent(String(userlist_id)), + ) // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) let baseOptions @@ -19649,14 +16667,20 @@ export const UserlistsApiAxiosParamCreator = function ( } const localVarRequestOptions = { - method: "POST", + method: "GET", ...baseOptions, ...options, } const localVarHeaderParameter = {} as any const localVarQueryParameter = {} as any - localVarHeaderParameter["Content-Type"] = "application/json" + if (limit !== undefined) { + localVarQueryParameter["limit"] = limit + } + + if (offset !== undefined) { + localVarQueryParameter["offset"] = offset + } setSearchParams(localVarUrlObj, localVarQueryParameter) let headersFromBaseOptions = @@ -19666,11 +16690,6 @@ export const UserlistsApiAxiosParamCreator = function ( ...headersFromBaseOptions, ...options.headers, } - localVarRequestOptions.data = serializeDataIfNeeded( - UserListRequest, - localVarRequestOptions, - configuration, - ) return { url: toPathString(localVarUrlObj), @@ -19678,225 +16697,11 @@ export const UserlistsApiAxiosParamCreator = function ( } }, /** - * Viewset for UserLists - * @summary Destroy - * @param {number} id A unique integer value identifying this user list. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - userlistsDestroy: async ( - id: number, - options: RawAxiosRequestConfig = {}, - ): Promise => { - // verify required parameter 'id' is not null or undefined - assertParamExists("userlistsDestroy", "id", id) - const localVarPath = `/api/v1/userlists/{id}/`.replace( - `{${"id"}}`, - encodeURIComponent(String(id)), - ) - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) - let baseOptions - if (configuration) { - baseOptions = configuration.baseOptions - } - - const localVarRequestOptions = { - method: "DELETE", - ...baseOptions, - ...options, - } - const localVarHeaderParameter = {} as any - const localVarQueryParameter = {} as any - - setSearchParams(localVarUrlObj, localVarQueryParameter) - let headersFromBaseOptions = - baseOptions && baseOptions.headers ? baseOptions.headers : {} - localVarRequestOptions.headers = { - ...localVarHeaderParameter, - ...headersFromBaseOptions, - ...options.headers, - } - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - } - }, - /** - * Viewset for UserListRelationships - * @summary User List Resource Relationship Add - * @param {number} userlist_id id of the parent user list - * @param {UserListRelationshipRequest} UserListRelationshipRequest - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - userlistsItemsCreate: async ( - userlist_id: number, - UserListRelationshipRequest: UserListRelationshipRequest, - options: RawAxiosRequestConfig = {}, - ): Promise => { - // verify required parameter 'userlist_id' is not null or undefined - assertParamExists("userlistsItemsCreate", "userlist_id", userlist_id) - // verify required parameter 'UserListRelationshipRequest' is not null or undefined - assertParamExists( - "userlistsItemsCreate", - "UserListRelationshipRequest", - UserListRelationshipRequest, - ) - const localVarPath = `/api/v1/userlists/{userlist_id}/items/`.replace( - `{${"userlist_id"}}`, - encodeURIComponent(String(userlist_id)), - ) - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) - let baseOptions - if (configuration) { - baseOptions = configuration.baseOptions - } - - const localVarRequestOptions = { - method: "POST", - ...baseOptions, - ...options, - } - const localVarHeaderParameter = {} as any - const localVarQueryParameter = {} as any - - localVarHeaderParameter["Content-Type"] = "application/json" - - setSearchParams(localVarUrlObj, localVarQueryParameter) - let headersFromBaseOptions = - baseOptions && baseOptions.headers ? baseOptions.headers : {} - localVarRequestOptions.headers = { - ...localVarHeaderParameter, - ...headersFromBaseOptions, - ...options.headers, - } - localVarRequestOptions.data = serializeDataIfNeeded( - UserListRelationshipRequest, - localVarRequestOptions, - configuration, - ) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - } - }, - /** - * Viewset for UserListRelationships - * @summary User List Resource Relationship Remove - * @param {number} id A unique integer value identifying this user list relationship. - * @param {number} userlist_id id of the parent user list - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - userlistsItemsDestroy: async ( - id: number, - userlist_id: number, - options: RawAxiosRequestConfig = {}, - ): Promise => { - // verify required parameter 'id' is not null or undefined - assertParamExists("userlistsItemsDestroy", "id", id) - // verify required parameter 'userlist_id' is not null or undefined - assertParamExists("userlistsItemsDestroy", "userlist_id", userlist_id) - const localVarPath = `/api/v1/userlists/{userlist_id}/items/{id}/` - .replace(`{${"id"}}`, encodeURIComponent(String(id))) - .replace(`{${"userlist_id"}}`, encodeURIComponent(String(userlist_id))) - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) - let baseOptions - if (configuration) { - baseOptions = configuration.baseOptions - } - - const localVarRequestOptions = { - method: "DELETE", - ...baseOptions, - ...options, - } - const localVarHeaderParameter = {} as any - const localVarQueryParameter = {} as any - - setSearchParams(localVarUrlObj, localVarQueryParameter) - let headersFromBaseOptions = - baseOptions && baseOptions.headers ? baseOptions.headers : {} - localVarRequestOptions.headers = { - ...localVarHeaderParameter, - ...headersFromBaseOptions, - ...options.headers, - } - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - } - }, - /** - * Viewset for UserListRelationships - * @summary User List Resources List - * @param {number} userlist_id id of the parent user list - * @param {number} [limit] Number of results to return per page. - * @param {number} [offset] The initial index from which to return the results. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - userlistsItemsList: async ( - userlist_id: number, - limit?: number, - offset?: number, - options: RawAxiosRequestConfig = {}, - ): Promise => { - // verify required parameter 'userlist_id' is not null or undefined - assertParamExists("userlistsItemsList", "userlist_id", userlist_id) - const localVarPath = `/api/v1/userlists/{userlist_id}/items/`.replace( - `{${"userlist_id"}}`, - encodeURIComponent(String(userlist_id)), - ) - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) - let baseOptions - if (configuration) { - baseOptions = configuration.baseOptions - } - - const localVarRequestOptions = { - method: "GET", - ...baseOptions, - ...options, - } - const localVarHeaderParameter = {} as any - const localVarQueryParameter = {} as any - - if (limit !== undefined) { - localVarQueryParameter["limit"] = limit - } - - if (offset !== undefined) { - localVarQueryParameter["offset"] = offset - } - - setSearchParams(localVarUrlObj, localVarQueryParameter) - let headersFromBaseOptions = - baseOptions && baseOptions.headers ? baseOptions.headers : {} - localVarRequestOptions.headers = { - ...localVarHeaderParameter, - ...headersFromBaseOptions, - ...options.headers, - } - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - } - }, - /** - * Viewset for UserListRelationships - * @summary User List Resource Relationship Update - * @param {number} id A unique integer value identifying this user list relationship. - * @param {number} userlist_id id of the parent user list - * @param {PatchedUserListRelationshipRequest} [PatchedUserListRelationshipRequest] + * Viewset for UserListRelationships + * @summary User List Resource Relationship Update + * @param {number} id A unique integer value identifying this user list relationship. + * @param {number} userlist_id id of the parent user list + * @param {PatchedUserListRelationshipRequest} [PatchedUserListRelationshipRequest] * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -21242,7 +18047,7 @@ export const VideoPlaylistsApiAxiosParamCreator = function ( * @param {boolean} [professional] * @param {Array} [readable_id] Multiple values may be separated by commas. * @param {Array} [resource_type] The type of learning resource * `course` - Course * `program` - Program * `learning_path` - Learning Path * `podcast` - Podcast * `podcast_episode` - Podcast Episode * `video` - Video * `video_playlist` - Video Playlist - * @param {VideoPlaylistsListSortbyEnum} [sortby] Sort By * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `created_on` - Creation Date ascending * `-created_on` - CreationDate descending * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending + * @param {VideoPlaylistsListSortbyEnum} [sortby] Sort By * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `new` - Newest resources first * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending * `upcoming` - Next start date ascending * @param {Array} [topic] Multiple values may be separated by commas. * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -21355,43 +18160,22 @@ export const VideoPlaylistsApiAxiosParamCreator = function ( } }, /** - * Get a paginated list of newly released Video Playlists. - * @summary List New - * @param {Array} [course_feature] Multiple values may be separated by commas. - * @param {Array} [department] The department that offers learning resources * `1` - Civil and Environmental Engineering * `2` - Mechanical Engineering * `3` - Materials Science and Engineering * `4` - Architecture * `5` - Chemistry * `6` - Electrical Engineering and Computer Science * `7` - Biology * `8` - Physics * `9` - Brain and Cognitive Sciences * `10` - Chemical Engineering * `11` - Urban Studies and Planning * `12` - Earth, Atmospheric, and Planetary Sciences * `14` - Economics * `15` - Sloan School of Management * `16` - Aeronautics and Astronautics * `17` - Political Science * `18` - Mathematics * `20` - Biological Engineering * `21A` - Anthropology * `21G` - Global Studies and Languages * `21H` - History * `21L` - Literature * `21M` - Music and Theater Arts * `22` - Nuclear Science and Engineering * `24` - Linguistics and Philosophy * `CC` - Concourse * `CMS-W` - Comparative Media Studies/Writing * `EC` - Edgerton Center * `ES` - Experimental Study Group * `ESD` - Engineering Systems Division * `HST` - Health Sciences and Technology * `IDS` - Institute for Data, Systems, and Society * `MAS` - Media Arts and Sciences * `PE` - Athletics, Physical Education and Recreation * `RES` - Supplemental Resources * `STS` - Science, Technology, and Society * `WGS` - Women\'s and Gender Studies - * @param {boolean} [free] The course/program is offered for free - * @param {Array>} [learning_format] The learning format of course/program resources * `online` - Online * `hybrid` - Hybrid * `in_person` - In person - * @param {Array} [level] The academic level of the resources * `undergraduate` - Undergraduate * `graduate` - Graduate * `high_school` - High School * `noncredit` - Non-Credit * `advanced` - Advanced * `intermediate` - Intermediate * `introductory` - Introductory - * @param {number} [limit] Number of results to return per page. - * @param {Array} [offered_by] The organization that offers a learning resource * `mitx` - MITx * `ocw` - OCW * `bootcamps` - Bootcamps * `xpro` - xPRO * `csail` - CSAIL * `mitpe` - Professional Education * `see` - Sloan Executive Education * `scc` - Schwarzman College of Computing * `ctl` - Center for Transportation & Logistics - * @param {number} [offset] The initial index from which to return the results. - * @param {Array} [platform] The platform on which learning resources are offered * `edx` - edX * `ocw` - OCW * `oll` - Open Learning Library * `mitxonline` - MITx Online * `bootcamps` - Bootcamps * `xpro` - xPRO * `csail` - CSAIL * `mitpe` - Professional Education * `see` - Sloan Executive Education * `scc` - Schwarzman College of Computing * `ctl` - Center for Transportation & Logistics * `whu` - WHU * `susskind` - Susskind * `globalalumni` - Global Alumni * `simplilearn` - Simplilearn * `emeritus` - Emeritus * `podcast` - Podcast * `youtube` - YouTube - * @param {boolean} [professional] - * @param {Array} [readable_id] Multiple values may be separated by commas. - * @param {Array} [resource_type] The type of learning resource * `course` - Course * `program` - Program * `learning_path` - Learning Path * `podcast` - Podcast * `podcast_episode` - Podcast Episode * `video` - Video * `video_playlist` - Video Playlist - * @param {VideoPlaylistsNewListSortbyEnum} [sortby] Sort By * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `created_on` - Creation Date ascending * `-created_on` - CreationDate descending * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending - * @param {Array} [topic] Multiple values may be separated by commas. + * Retrieve a single video playlist + * @summary Retrieve + * @param {number} id A unique integer value identifying this learning resource. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - videoPlaylistsNewList: async ( - course_feature?: Array, - department?: Array, - free?: boolean, - learning_format?: Array>, - level?: Array, - limit?: number, - offered_by?: Array, - offset?: number, - platform?: Array, - professional?: boolean, - readable_id?: Array, - resource_type?: Array, - sortby?: VideoPlaylistsNewListSortbyEnum, - topic?: Array, + videoPlaylistsRetrieve: async ( + id: number, options: RawAxiosRequestConfig = {}, ): Promise => { - const localVarPath = `/api/v1/video_playlists/new/` + // verify required parameter 'id' is not null or undefined + assertParamExists("videoPlaylistsRetrieve", "id", id) + const localVarPath = `/api/v1/video_playlists/{id}/`.replace( + `{${"id"}}`, + encodeURIComponent(String(id)), + ) // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) let baseOptions @@ -21407,246 +18191,13 @@ export const VideoPlaylistsApiAxiosParamCreator = function ( const localVarHeaderParameter = {} as any const localVarQueryParameter = {} as any - if (course_feature) { - localVarQueryParameter["course_feature"] = course_feature.join( - COLLECTION_FORMATS.csv, - ) - } - - if (department) { - localVarQueryParameter["department"] = department - } - - if (free !== undefined) { - localVarQueryParameter["free"] = free - } - - if (learning_format) { - localVarQueryParameter["learning_format"] = learning_format - } - - if (level) { - localVarQueryParameter["level"] = level - } - - if (limit !== undefined) { - localVarQueryParameter["limit"] = limit - } - - if (offered_by) { - localVarQueryParameter["offered_by"] = offered_by - } - - if (offset !== undefined) { - localVarQueryParameter["offset"] = offset - } - - if (platform) { - localVarQueryParameter["platform"] = platform - } - - if (professional !== undefined) { - localVarQueryParameter["professional"] = professional - } - - if (readable_id) { - localVarQueryParameter["readable_id"] = readable_id.join( - COLLECTION_FORMATS.csv, - ) - } - - if (resource_type) { - localVarQueryParameter["resource_type"] = resource_type - } - - if (sortby !== undefined) { - localVarQueryParameter["sortby"] = sortby - } - - if (topic) { - localVarQueryParameter["topic"] = topic.join(COLLECTION_FORMATS.csv) - } - - setSearchParams(localVarUrlObj, localVarQueryParameter) - let headersFromBaseOptions = - baseOptions && baseOptions.headers ? baseOptions.headers : {} - localVarRequestOptions.headers = { - ...localVarHeaderParameter, - ...headersFromBaseOptions, - ...options.headers, - } - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - } - }, - /** - * Retrieve a single video playlist - * @summary Retrieve - * @param {number} id A unique integer value identifying this learning resource. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - videoPlaylistsRetrieve: async ( - id: number, - options: RawAxiosRequestConfig = {}, - ): Promise => { - // verify required parameter 'id' is not null or undefined - assertParamExists("videoPlaylistsRetrieve", "id", id) - const localVarPath = `/api/v1/video_playlists/{id}/`.replace( - `{${"id"}}`, - encodeURIComponent(String(id)), - ) - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) - let baseOptions - if (configuration) { - baseOptions = configuration.baseOptions - } - - const localVarRequestOptions = { - method: "GET", - ...baseOptions, - ...options, - } - const localVarHeaderParameter = {} as any - const localVarQueryParameter = {} as any - - setSearchParams(localVarUrlObj, localVarQueryParameter) - let headersFromBaseOptions = - baseOptions && baseOptions.headers ? baseOptions.headers : {} - localVarRequestOptions.headers = { - ...localVarHeaderParameter, - ...headersFromBaseOptions, - ...options.headers, - } - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - } - }, - /** - * Get a paginated list of upcoming Video Playlists. - * @summary List Upcoming - * @param {Array} [course_feature] Multiple values may be separated by commas. - * @param {Array} [department] The department that offers learning resources * `1` - Civil and Environmental Engineering * `2` - Mechanical Engineering * `3` - Materials Science and Engineering * `4` - Architecture * `5` - Chemistry * `6` - Electrical Engineering and Computer Science * `7` - Biology * `8` - Physics * `9` - Brain and Cognitive Sciences * `10` - Chemical Engineering * `11` - Urban Studies and Planning * `12` - Earth, Atmospheric, and Planetary Sciences * `14` - Economics * `15` - Sloan School of Management * `16` - Aeronautics and Astronautics * `17` - Political Science * `18` - Mathematics * `20` - Biological Engineering * `21A` - Anthropology * `21G` - Global Studies and Languages * `21H` - History * `21L` - Literature * `21M` - Music and Theater Arts * `22` - Nuclear Science and Engineering * `24` - Linguistics and Philosophy * `CC` - Concourse * `CMS-W` - Comparative Media Studies/Writing * `EC` - Edgerton Center * `ES` - Experimental Study Group * `ESD` - Engineering Systems Division * `HST` - Health Sciences and Technology * `IDS` - Institute for Data, Systems, and Society * `MAS` - Media Arts and Sciences * `PE` - Athletics, Physical Education and Recreation * `RES` - Supplemental Resources * `STS` - Science, Technology, and Society * `WGS` - Women\'s and Gender Studies - * @param {boolean} [free] The course/program is offered for free - * @param {Array>} [learning_format] The learning format of course/program resources * `online` - Online * `hybrid` - Hybrid * `in_person` - In person - * @param {Array} [level] The academic level of the resources * `undergraduate` - Undergraduate * `graduate` - Graduate * `high_school` - High School * `noncredit` - Non-Credit * `advanced` - Advanced * `intermediate` - Intermediate * `introductory` - Introductory - * @param {number} [limit] Number of results to return per page. - * @param {Array} [offered_by] The organization that offers a learning resource * `mitx` - MITx * `ocw` - OCW * `bootcamps` - Bootcamps * `xpro` - xPRO * `csail` - CSAIL * `mitpe` - Professional Education * `see` - Sloan Executive Education * `scc` - Schwarzman College of Computing * `ctl` - Center for Transportation & Logistics - * @param {number} [offset] The initial index from which to return the results. - * @param {Array} [platform] The platform on which learning resources are offered * `edx` - edX * `ocw` - OCW * `oll` - Open Learning Library * `mitxonline` - MITx Online * `bootcamps` - Bootcamps * `xpro` - xPRO * `csail` - CSAIL * `mitpe` - Professional Education * `see` - Sloan Executive Education * `scc` - Schwarzman College of Computing * `ctl` - Center for Transportation & Logistics * `whu` - WHU * `susskind` - Susskind * `globalalumni` - Global Alumni * `simplilearn` - Simplilearn * `emeritus` - Emeritus * `podcast` - Podcast * `youtube` - YouTube - * @param {boolean} [professional] - * @param {Array} [readable_id] Multiple values may be separated by commas. - * @param {Array} [resource_type] The type of learning resource * `course` - Course * `program` - Program * `learning_path` - Learning Path * `podcast` - Podcast * `podcast_episode` - Podcast Episode * `video` - Video * `video_playlist` - Video Playlist - * @param {VideoPlaylistsUpcomingListSortbyEnum} [sortby] Sort By * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `created_on` - Creation Date ascending * `-created_on` - CreationDate descending * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending - * @param {Array} [topic] Multiple values may be separated by commas. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - videoPlaylistsUpcomingList: async ( - course_feature?: Array, - department?: Array, - free?: boolean, - learning_format?: Array>, - level?: Array, - limit?: number, - offered_by?: Array, - offset?: number, - platform?: Array, - professional?: boolean, - readable_id?: Array, - resource_type?: Array, - sortby?: VideoPlaylistsUpcomingListSortbyEnum, - topic?: Array, - options: RawAxiosRequestConfig = {}, - ): Promise => { - const localVarPath = `/api/v1/video_playlists/upcoming/` - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) - let baseOptions - if (configuration) { - baseOptions = configuration.baseOptions - } - - const localVarRequestOptions = { - method: "GET", - ...baseOptions, - ...options, - } - const localVarHeaderParameter = {} as any - const localVarQueryParameter = {} as any - - if (course_feature) { - localVarQueryParameter["course_feature"] = course_feature.join( - COLLECTION_FORMATS.csv, - ) - } - - if (department) { - localVarQueryParameter["department"] = department - } - - if (free !== undefined) { - localVarQueryParameter["free"] = free - } - - if (learning_format) { - localVarQueryParameter["learning_format"] = learning_format - } - - if (level) { - localVarQueryParameter["level"] = level - } - - if (limit !== undefined) { - localVarQueryParameter["limit"] = limit - } - - if (offered_by) { - localVarQueryParameter["offered_by"] = offered_by - } - - if (offset !== undefined) { - localVarQueryParameter["offset"] = offset - } - - if (platform) { - localVarQueryParameter["platform"] = platform - } - - if (professional !== undefined) { - localVarQueryParameter["professional"] = professional - } - - if (readable_id) { - localVarQueryParameter["readable_id"] = readable_id.join( - COLLECTION_FORMATS.csv, - ) - } - - if (resource_type) { - localVarQueryParameter["resource_type"] = resource_type - } - - if (sortby !== undefined) { - localVarQueryParameter["sortby"] = sortby - } - - if (topic) { - localVarQueryParameter["topic"] = topic.join(COLLECTION_FORMATS.csv) - } - - setSearchParams(localVarUrlObj, localVarQueryParameter) - let headersFromBaseOptions = - baseOptions && baseOptions.headers ? baseOptions.headers : {} - localVarRequestOptions.headers = { - ...localVarHeaderParameter, - ...headersFromBaseOptions, - ...options.headers, + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, } return { @@ -21759,7 +18310,7 @@ export const VideoPlaylistsApiFp = function (configuration?: Configuration) { * @param {boolean} [professional] * @param {Array} [readable_id] Multiple values may be separated by commas. * @param {Array} [resource_type] The type of learning resource * `course` - Course * `program` - Program * `learning_path` - Learning Path * `podcast` - Podcast * `podcast_episode` - Podcast Episode * `video` - Video * `video_playlist` - Video Playlist - * @param {VideoPlaylistsListSortbyEnum} [sortby] Sort By * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `created_on` - Creation Date ascending * `-created_on` - CreationDate descending * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending + * @param {VideoPlaylistsListSortbyEnum} [sortby] Sort By * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `new` - Newest resources first * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending * `upcoming` - Next start date ascending * @param {Array} [topic] Multiple values may be separated by commas. * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -21816,92 +18367,20 @@ export const VideoPlaylistsApiFp = function (configuration?: Configuration) { )(axios, operationBasePath || basePath) }, /** - * Get a paginated list of newly released Video Playlists. - * @summary List New - * @param {Array} [course_feature] Multiple values may be separated by commas. - * @param {Array} [department] The department that offers learning resources * `1` - Civil and Environmental Engineering * `2` - Mechanical Engineering * `3` - Materials Science and Engineering * `4` - Architecture * `5` - Chemistry * `6` - Electrical Engineering and Computer Science * `7` - Biology * `8` - Physics * `9` - Brain and Cognitive Sciences * `10` - Chemical Engineering * `11` - Urban Studies and Planning * `12` - Earth, Atmospheric, and Planetary Sciences * `14` - Economics * `15` - Sloan School of Management * `16` - Aeronautics and Astronautics * `17` - Political Science * `18` - Mathematics * `20` - Biological Engineering * `21A` - Anthropology * `21G` - Global Studies and Languages * `21H` - History * `21L` - Literature * `21M` - Music and Theater Arts * `22` - Nuclear Science and Engineering * `24` - Linguistics and Philosophy * `CC` - Concourse * `CMS-W` - Comparative Media Studies/Writing * `EC` - Edgerton Center * `ES` - Experimental Study Group * `ESD` - Engineering Systems Division * `HST` - Health Sciences and Technology * `IDS` - Institute for Data, Systems, and Society * `MAS` - Media Arts and Sciences * `PE` - Athletics, Physical Education and Recreation * `RES` - Supplemental Resources * `STS` - Science, Technology, and Society * `WGS` - Women\'s and Gender Studies - * @param {boolean} [free] The course/program is offered for free - * @param {Array>} [learning_format] The learning format of course/program resources * `online` - Online * `hybrid` - Hybrid * `in_person` - In person - * @param {Array} [level] The academic level of the resources * `undergraduate` - Undergraduate * `graduate` - Graduate * `high_school` - High School * `noncredit` - Non-Credit * `advanced` - Advanced * `intermediate` - Intermediate * `introductory` - Introductory - * @param {number} [limit] Number of results to return per page. - * @param {Array} [offered_by] The organization that offers a learning resource * `mitx` - MITx * `ocw` - OCW * `bootcamps` - Bootcamps * `xpro` - xPRO * `csail` - CSAIL * `mitpe` - Professional Education * `see` - Sloan Executive Education * `scc` - Schwarzman College of Computing * `ctl` - Center for Transportation & Logistics - * @param {number} [offset] The initial index from which to return the results. - * @param {Array} [platform] The platform on which learning resources are offered * `edx` - edX * `ocw` - OCW * `oll` - Open Learning Library * `mitxonline` - MITx Online * `bootcamps` - Bootcamps * `xpro` - xPRO * `csail` - CSAIL * `mitpe` - Professional Education * `see` - Sloan Executive Education * `scc` - Schwarzman College of Computing * `ctl` - Center for Transportation & Logistics * `whu` - WHU * `susskind` - Susskind * `globalalumni` - Global Alumni * `simplilearn` - Simplilearn * `emeritus` - Emeritus * `podcast` - Podcast * `youtube` - YouTube - * @param {boolean} [professional] - * @param {Array} [readable_id] Multiple values may be separated by commas. - * @param {Array} [resource_type] The type of learning resource * `course` - Course * `program` - Program * `learning_path` - Learning Path * `podcast` - Podcast * `podcast_episode` - Podcast Episode * `video` - Video * `video_playlist` - Video Playlist - * @param {VideoPlaylistsNewListSortbyEnum} [sortby] Sort By * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `created_on` - Creation Date ascending * `-created_on` - CreationDate descending * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending - * @param {Array} [topic] Multiple values may be separated by commas. + * Retrieve a single video playlist + * @summary Retrieve + * @param {number} id A unique integer value identifying this learning resource. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async videoPlaylistsNewList( - course_feature?: Array, - department?: Array, - free?: boolean, - learning_format?: Array>, - level?: Array, - limit?: number, - offered_by?: Array, - offset?: number, - platform?: Array, - professional?: boolean, - readable_id?: Array, - resource_type?: Array, - sortby?: VideoPlaylistsNewListSortbyEnum, - topic?: Array, + async videoPlaylistsRetrieve( + id: number, options?: RawAxiosRequestConfig, ): Promise< ( axios?: AxiosInstance, basePath?: string, - ) => AxiosPromise - > { - const localVarAxiosArgs = - await localVarAxiosParamCreator.videoPlaylistsNewList( - course_feature, - department, - free, - learning_format, - level, - limit, - offered_by, - offset, - platform, - professional, - readable_id, - resource_type, - sortby, - topic, - options, - ) - const index = configuration?.serverIndex ?? 0 - const operationBasePath = - operationServerMap["VideoPlaylistsApi.videoPlaylistsNewList"]?.[index] - ?.url - return (axios, basePath) => - createRequestFunction( - localVarAxiosArgs, - globalAxios, - BASE_PATH, - configuration, - )(axios, operationBasePath || basePath) - }, - /** - * Retrieve a single video playlist - * @summary Retrieve - * @param {number} id A unique integer value identifying this learning resource. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async videoPlaylistsRetrieve( - id: number, - options?: RawAxiosRequestConfig, - ): Promise< - ( - axios?: AxiosInstance, - basePath?: string, - ) => AxiosPromise + ) => AxiosPromise > { const localVarAxiosArgs = await localVarAxiosParamCreator.videoPlaylistsRetrieve(id, options) @@ -21917,79 +18396,6 @@ export const VideoPlaylistsApiFp = function (configuration?: Configuration) { configuration, )(axios, operationBasePath || basePath) }, - /** - * Get a paginated list of upcoming Video Playlists. - * @summary List Upcoming - * @param {Array} [course_feature] Multiple values may be separated by commas. - * @param {Array} [department] The department that offers learning resources * `1` - Civil and Environmental Engineering * `2` - Mechanical Engineering * `3` - Materials Science and Engineering * `4` - Architecture * `5` - Chemistry * `6` - Electrical Engineering and Computer Science * `7` - Biology * `8` - Physics * `9` - Brain and Cognitive Sciences * `10` - Chemical Engineering * `11` - Urban Studies and Planning * `12` - Earth, Atmospheric, and Planetary Sciences * `14` - Economics * `15` - Sloan School of Management * `16` - Aeronautics and Astronautics * `17` - Political Science * `18` - Mathematics * `20` - Biological Engineering * `21A` - Anthropology * `21G` - Global Studies and Languages * `21H` - History * `21L` - Literature * `21M` - Music and Theater Arts * `22` - Nuclear Science and Engineering * `24` - Linguistics and Philosophy * `CC` - Concourse * `CMS-W` - Comparative Media Studies/Writing * `EC` - Edgerton Center * `ES` - Experimental Study Group * `ESD` - Engineering Systems Division * `HST` - Health Sciences and Technology * `IDS` - Institute for Data, Systems, and Society * `MAS` - Media Arts and Sciences * `PE` - Athletics, Physical Education and Recreation * `RES` - Supplemental Resources * `STS` - Science, Technology, and Society * `WGS` - Women\'s and Gender Studies - * @param {boolean} [free] The course/program is offered for free - * @param {Array>} [learning_format] The learning format of course/program resources * `online` - Online * `hybrid` - Hybrid * `in_person` - In person - * @param {Array} [level] The academic level of the resources * `undergraduate` - Undergraduate * `graduate` - Graduate * `high_school` - High School * `noncredit` - Non-Credit * `advanced` - Advanced * `intermediate` - Intermediate * `introductory` - Introductory - * @param {number} [limit] Number of results to return per page. - * @param {Array} [offered_by] The organization that offers a learning resource * `mitx` - MITx * `ocw` - OCW * `bootcamps` - Bootcamps * `xpro` - xPRO * `csail` - CSAIL * `mitpe` - Professional Education * `see` - Sloan Executive Education * `scc` - Schwarzman College of Computing * `ctl` - Center for Transportation & Logistics - * @param {number} [offset] The initial index from which to return the results. - * @param {Array} [platform] The platform on which learning resources are offered * `edx` - edX * `ocw` - OCW * `oll` - Open Learning Library * `mitxonline` - MITx Online * `bootcamps` - Bootcamps * `xpro` - xPRO * `csail` - CSAIL * `mitpe` - Professional Education * `see` - Sloan Executive Education * `scc` - Schwarzman College of Computing * `ctl` - Center for Transportation & Logistics * `whu` - WHU * `susskind` - Susskind * `globalalumni` - Global Alumni * `simplilearn` - Simplilearn * `emeritus` - Emeritus * `podcast` - Podcast * `youtube` - YouTube - * @param {boolean} [professional] - * @param {Array} [readable_id] Multiple values may be separated by commas. - * @param {Array} [resource_type] The type of learning resource * `course` - Course * `program` - Program * `learning_path` - Learning Path * `podcast` - Podcast * `podcast_episode` - Podcast Episode * `video` - Video * `video_playlist` - Video Playlist - * @param {VideoPlaylistsUpcomingListSortbyEnum} [sortby] Sort By * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `created_on` - Creation Date ascending * `-created_on` - CreationDate descending * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending - * @param {Array} [topic] Multiple values may be separated by commas. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async videoPlaylistsUpcomingList( - course_feature?: Array, - department?: Array, - free?: boolean, - learning_format?: Array>, - level?: Array, - limit?: number, - offered_by?: Array, - offset?: number, - platform?: Array, - professional?: boolean, - readable_id?: Array, - resource_type?: Array, - sortby?: VideoPlaylistsUpcomingListSortbyEnum, - topic?: Array, - options?: RawAxiosRequestConfig, - ): Promise< - ( - axios?: AxiosInstance, - basePath?: string, - ) => AxiosPromise - > { - const localVarAxiosArgs = - await localVarAxiosParamCreator.videoPlaylistsUpcomingList( - course_feature, - department, - free, - learning_format, - level, - limit, - offered_by, - offset, - platform, - professional, - readable_id, - resource_type, - sortby, - topic, - options, - ) - const index = configuration?.serverIndex ?? 0 - const operationBasePath = - operationServerMap["VideoPlaylistsApi.videoPlaylistsUpcomingList"]?.[ - index - ]?.url - return (axios, basePath) => - createRequestFunction( - localVarAxiosArgs, - globalAxios, - BASE_PATH, - configuration, - )(axios, operationBasePath || basePath) - }, } } @@ -22043,943 +18449,337 @@ export const VideoPlaylistsApiFactory = function ( options, ) .then((request) => request(axios, basePath)) - }, - /** - * Get a paginated list of video playlists - * @summary List - * @param {VideoPlaylistsApiVideoPlaylistsListRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - videoPlaylistsList( - requestParameters: VideoPlaylistsApiVideoPlaylistsListRequest = {}, - options?: RawAxiosRequestConfig, - ): AxiosPromise { - return localVarFp - .videoPlaylistsList( - requestParameters.course_feature, - requestParameters.department, - requestParameters.free, - requestParameters.learning_format, - requestParameters.level, - requestParameters.limit, - requestParameters.offered_by, - requestParameters.offset, - requestParameters.platform, - requestParameters.professional, - requestParameters.readable_id, - requestParameters.resource_type, - requestParameters.sortby, - requestParameters.topic, - options, - ) - .then((request) => request(axios, basePath)) - }, - /** - * Get a paginated list of newly released Video Playlists. - * @summary List New - * @param {VideoPlaylistsApiVideoPlaylistsNewListRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - videoPlaylistsNewList( - requestParameters: VideoPlaylistsApiVideoPlaylistsNewListRequest = {}, - options?: RawAxiosRequestConfig, - ): AxiosPromise { - return localVarFp - .videoPlaylistsNewList( - requestParameters.course_feature, - requestParameters.department, - requestParameters.free, - requestParameters.learning_format, - requestParameters.level, - requestParameters.limit, - requestParameters.offered_by, - requestParameters.offset, - requestParameters.platform, - requestParameters.professional, - requestParameters.readable_id, - requestParameters.resource_type, - requestParameters.sortby, - requestParameters.topic, - options, - ) - .then((request) => request(axios, basePath)) - }, - /** - * Retrieve a single video playlist - * @summary Retrieve - * @param {VideoPlaylistsApiVideoPlaylistsRetrieveRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - videoPlaylistsRetrieve( - requestParameters: VideoPlaylistsApiVideoPlaylistsRetrieveRequest, - options?: RawAxiosRequestConfig, - ): AxiosPromise { - return localVarFp - .videoPlaylistsRetrieve(requestParameters.id, options) - .then((request) => request(axios, basePath)) - }, - /** - * Get a paginated list of upcoming Video Playlists. - * @summary List Upcoming - * @param {VideoPlaylistsApiVideoPlaylistsUpcomingListRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - videoPlaylistsUpcomingList( - requestParameters: VideoPlaylistsApiVideoPlaylistsUpcomingListRequest = {}, - options?: RawAxiosRequestConfig, - ): AxiosPromise { - return localVarFp - .videoPlaylistsUpcomingList( - requestParameters.course_feature, - requestParameters.department, - requestParameters.free, - requestParameters.learning_format, - requestParameters.level, - requestParameters.limit, - requestParameters.offered_by, - requestParameters.offset, - requestParameters.platform, - requestParameters.professional, - requestParameters.readable_id, - requestParameters.resource_type, - requestParameters.sortby, - requestParameters.topic, - options, - ) - .then((request) => request(axios, basePath)) - }, - } -} - -/** - * Request parameters for videoPlaylistsItemsList operation in VideoPlaylistsApi. - * @export - * @interface VideoPlaylistsApiVideoPlaylistsItemsListRequest - */ -export interface VideoPlaylistsApiVideoPlaylistsItemsListRequest { - /** - * id of the parent learning resource - * @type {number} - * @memberof VideoPlaylistsApiVideoPlaylistsItemsList - */ - readonly learning_resource_id: number - - /** - * Number of results to return per page. - * @type {number} - * @memberof VideoPlaylistsApiVideoPlaylistsItemsList - */ - readonly limit?: number - - /** - * The initial index from which to return the results. - * @type {number} - * @memberof VideoPlaylistsApiVideoPlaylistsItemsList - */ - readonly offset?: number - - /** - * Which field to use when ordering the results. - * @type {string} - * @memberof VideoPlaylistsApiVideoPlaylistsItemsList - */ - readonly sortby?: string -} - -/** - * Request parameters for videoPlaylistsItemsRetrieve operation in VideoPlaylistsApi. - * @export - * @interface VideoPlaylistsApiVideoPlaylistsItemsRetrieveRequest - */ -export interface VideoPlaylistsApiVideoPlaylistsItemsRetrieveRequest { - /** - * A unique integer value identifying this learning resource relationship. - * @type {number} - * @memberof VideoPlaylistsApiVideoPlaylistsItemsRetrieve - */ - readonly id: number - - /** - * id of the parent learning resource - * @type {number} - * @memberof VideoPlaylistsApiVideoPlaylistsItemsRetrieve - */ - readonly learning_resource_id: number -} - -/** - * Request parameters for videoPlaylistsList operation in VideoPlaylistsApi. - * @export - * @interface VideoPlaylistsApiVideoPlaylistsListRequest - */ -export interface VideoPlaylistsApiVideoPlaylistsListRequest { - /** - * Multiple values may be separated by commas. - * @type {Array} - * @memberof VideoPlaylistsApiVideoPlaylistsList - */ - readonly course_feature?: Array - - /** - * The department that offers learning resources * `1` - Civil and Environmental Engineering * `2` - Mechanical Engineering * `3` - Materials Science and Engineering * `4` - Architecture * `5` - Chemistry * `6` - Electrical Engineering and Computer Science * `7` - Biology * `8` - Physics * `9` - Brain and Cognitive Sciences * `10` - Chemical Engineering * `11` - Urban Studies and Planning * `12` - Earth, Atmospheric, and Planetary Sciences * `14` - Economics * `15` - Sloan School of Management * `16` - Aeronautics and Astronautics * `17` - Political Science * `18` - Mathematics * `20` - Biological Engineering * `21A` - Anthropology * `21G` - Global Studies and Languages * `21H` - History * `21L` - Literature * `21M` - Music and Theater Arts * `22` - Nuclear Science and Engineering * `24` - Linguistics and Philosophy * `CC` - Concourse * `CMS-W` - Comparative Media Studies/Writing * `EC` - Edgerton Center * `ES` - Experimental Study Group * `ESD` - Engineering Systems Division * `HST` - Health Sciences and Technology * `IDS` - Institute for Data, Systems, and Society * `MAS` - Media Arts and Sciences * `PE` - Athletics, Physical Education and Recreation * `RES` - Supplemental Resources * `STS` - Science, Technology, and Society * `WGS` - Women\'s and Gender Studies - * @type {Array<'1' | '10' | '11' | '12' | '14' | '15' | '16' | '17' | '18' | '2' | '20' | '21A' | '21G' | '21H' | '21L' | '21M' | '22' | '24' | '3' | '4' | '5' | '6' | '7' | '8' | '9' | 'CC' | 'CMS-W' | 'EC' | 'ES' | 'ESD' | 'HST' | 'IDS' | 'MAS' | 'PE' | 'RES' | 'STS' | 'WGS'>} - * @memberof VideoPlaylistsApiVideoPlaylistsList - */ - readonly department?: Array - - /** - * The course/program is offered for free - * @type {boolean} - * @memberof VideoPlaylistsApiVideoPlaylistsList - */ - readonly free?: boolean - - /** - * The learning format of course/program resources * `online` - Online * `hybrid` - Hybrid * `in_person` - In person - * @type {Array>} - * @memberof VideoPlaylistsApiVideoPlaylistsList - */ - readonly learning_format?: Array> - - /** - * The academic level of the resources * `undergraduate` - Undergraduate * `graduate` - Graduate * `high_school` - High School * `noncredit` - Non-Credit * `advanced` - Advanced * `intermediate` - Intermediate * `introductory` - Introductory - * @type {Array<'advanced' | 'graduate' | 'high_school' | 'intermediate' | 'introductory' | 'noncredit' | 'undergraduate'>} - * @memberof VideoPlaylistsApiVideoPlaylistsList - */ - readonly level?: Array - - /** - * Number of results to return per page. - * @type {number} - * @memberof VideoPlaylistsApiVideoPlaylistsList - */ - readonly limit?: number - - /** - * The organization that offers a learning resource * `mitx` - MITx * `ocw` - OCW * `bootcamps` - Bootcamps * `xpro` - xPRO * `csail` - CSAIL * `mitpe` - Professional Education * `see` - Sloan Executive Education * `scc` - Schwarzman College of Computing * `ctl` - Center for Transportation & Logistics - * @type {Array<'bootcamps' | 'csail' | 'ctl' | 'mitpe' | 'mitx' | 'ocw' | 'scc' | 'see' | 'xpro'>} - * @memberof VideoPlaylistsApiVideoPlaylistsList - */ - readonly offered_by?: Array - - /** - * The initial index from which to return the results. - * @type {number} - * @memberof VideoPlaylistsApiVideoPlaylistsList - */ - readonly offset?: number - - /** - * The platform on which learning resources are offered * `edx` - edX * `ocw` - OCW * `oll` - Open Learning Library * `mitxonline` - MITx Online * `bootcamps` - Bootcamps * `xpro` - xPRO * `csail` - CSAIL * `mitpe` - Professional Education * `see` - Sloan Executive Education * `scc` - Schwarzman College of Computing * `ctl` - Center for Transportation & Logistics * `whu` - WHU * `susskind` - Susskind * `globalalumni` - Global Alumni * `simplilearn` - Simplilearn * `emeritus` - Emeritus * `podcast` - Podcast * `youtube` - YouTube - * @type {Array<'bootcamps' | 'csail' | 'ctl' | 'edx' | 'emeritus' | 'globalalumni' | 'mitpe' | 'mitxonline' | 'ocw' | 'oll' | 'podcast' | 'scc' | 'see' | 'simplilearn' | 'susskind' | 'whu' | 'xpro' | 'youtube'>} - * @memberof VideoPlaylistsApiVideoPlaylistsList - */ - readonly platform?: Array - - /** - * - * @type {boolean} - * @memberof VideoPlaylistsApiVideoPlaylistsList - */ - readonly professional?: boolean - - /** - * Multiple values may be separated by commas. - * @type {Array} - * @memberof VideoPlaylistsApiVideoPlaylistsList - */ - readonly readable_id?: Array - - /** - * The type of learning resource * `course` - Course * `program` - Program * `learning_path` - Learning Path * `podcast` - Podcast * `podcast_episode` - Podcast Episode * `video` - Video * `video_playlist` - Video Playlist - * @type {Array<'course' | 'learning_path' | 'podcast' | 'podcast_episode' | 'program' | 'video' | 'video_playlist'>} - * @memberof VideoPlaylistsApiVideoPlaylistsList - */ - readonly resource_type?: Array - - /** - * Sort By * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `created_on` - Creation Date ascending * `-created_on` - CreationDate descending * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending - * @type {'-created_on' | '-id' | '-last_modified' | '-mitcoursenumber' | '-readable_id' | '-start_date' | '-views' | 'created_on' | 'id' | 'last_modified' | 'mitcoursenumber' | 'readable_id' | 'start_date' | 'views'} - * @memberof VideoPlaylistsApiVideoPlaylistsList - */ - readonly sortby?: VideoPlaylistsListSortbyEnum - - /** - * Multiple values may be separated by commas. - * @type {Array} - * @memberof VideoPlaylistsApiVideoPlaylistsList - */ - readonly topic?: Array -} - -/** - * Request parameters for videoPlaylistsNewList operation in VideoPlaylistsApi. - * @export - * @interface VideoPlaylistsApiVideoPlaylistsNewListRequest - */ -export interface VideoPlaylistsApiVideoPlaylistsNewListRequest { - /** - * Multiple values may be separated by commas. - * @type {Array} - * @memberof VideoPlaylistsApiVideoPlaylistsNewList - */ - readonly course_feature?: Array - - /** - * The department that offers learning resources * `1` - Civil and Environmental Engineering * `2` - Mechanical Engineering * `3` - Materials Science and Engineering * `4` - Architecture * `5` - Chemistry * `6` - Electrical Engineering and Computer Science * `7` - Biology * `8` - Physics * `9` - Brain and Cognitive Sciences * `10` - Chemical Engineering * `11` - Urban Studies and Planning * `12` - Earth, Atmospheric, and Planetary Sciences * `14` - Economics * `15` - Sloan School of Management * `16` - Aeronautics and Astronautics * `17` - Political Science * `18` - Mathematics * `20` - Biological Engineering * `21A` - Anthropology * `21G` - Global Studies and Languages * `21H` - History * `21L` - Literature * `21M` - Music and Theater Arts * `22` - Nuclear Science and Engineering * `24` - Linguistics and Philosophy * `CC` - Concourse * `CMS-W` - Comparative Media Studies/Writing * `EC` - Edgerton Center * `ES` - Experimental Study Group * `ESD` - Engineering Systems Division * `HST` - Health Sciences and Technology * `IDS` - Institute for Data, Systems, and Society * `MAS` - Media Arts and Sciences * `PE` - Athletics, Physical Education and Recreation * `RES` - Supplemental Resources * `STS` - Science, Technology, and Society * `WGS` - Women\'s and Gender Studies - * @type {Array<'1' | '10' | '11' | '12' | '14' | '15' | '16' | '17' | '18' | '2' | '20' | '21A' | '21G' | '21H' | '21L' | '21M' | '22' | '24' | '3' | '4' | '5' | '6' | '7' | '8' | '9' | 'CC' | 'CMS-W' | 'EC' | 'ES' | 'ESD' | 'HST' | 'IDS' | 'MAS' | 'PE' | 'RES' | 'STS' | 'WGS'>} - * @memberof VideoPlaylistsApiVideoPlaylistsNewList - */ - readonly department?: Array - - /** - * The course/program is offered for free - * @type {boolean} - * @memberof VideoPlaylistsApiVideoPlaylistsNewList - */ - readonly free?: boolean - - /** - * The learning format of course/program resources * `online` - Online * `hybrid` - Hybrid * `in_person` - In person - * @type {Array>} - * @memberof VideoPlaylistsApiVideoPlaylistsNewList - */ - readonly learning_format?: Array> - - /** - * The academic level of the resources * `undergraduate` - Undergraduate * `graduate` - Graduate * `high_school` - High School * `noncredit` - Non-Credit * `advanced` - Advanced * `intermediate` - Intermediate * `introductory` - Introductory - * @type {Array<'advanced' | 'graduate' | 'high_school' | 'intermediate' | 'introductory' | 'noncredit' | 'undergraduate'>} - * @memberof VideoPlaylistsApiVideoPlaylistsNewList - */ - readonly level?: Array - - /** - * Number of results to return per page. - * @type {number} - * @memberof VideoPlaylistsApiVideoPlaylistsNewList - */ - readonly limit?: number - - /** - * The organization that offers a learning resource * `mitx` - MITx * `ocw` - OCW * `bootcamps` - Bootcamps * `xpro` - xPRO * `csail` - CSAIL * `mitpe` - Professional Education * `see` - Sloan Executive Education * `scc` - Schwarzman College of Computing * `ctl` - Center for Transportation & Logistics - * @type {Array<'bootcamps' | 'csail' | 'ctl' | 'mitpe' | 'mitx' | 'ocw' | 'scc' | 'see' | 'xpro'>} - * @memberof VideoPlaylistsApiVideoPlaylistsNewList - */ - readonly offered_by?: Array - - /** - * The initial index from which to return the results. - * @type {number} - * @memberof VideoPlaylistsApiVideoPlaylistsNewList - */ - readonly offset?: number - - /** - * The platform on which learning resources are offered * `edx` - edX * `ocw` - OCW * `oll` - Open Learning Library * `mitxonline` - MITx Online * `bootcamps` - Bootcamps * `xpro` - xPRO * `csail` - CSAIL * `mitpe` - Professional Education * `see` - Sloan Executive Education * `scc` - Schwarzman College of Computing * `ctl` - Center for Transportation & Logistics * `whu` - WHU * `susskind` - Susskind * `globalalumni` - Global Alumni * `simplilearn` - Simplilearn * `emeritus` - Emeritus * `podcast` - Podcast * `youtube` - YouTube - * @type {Array<'bootcamps' | 'csail' | 'ctl' | 'edx' | 'emeritus' | 'globalalumni' | 'mitpe' | 'mitxonline' | 'ocw' | 'oll' | 'podcast' | 'scc' | 'see' | 'simplilearn' | 'susskind' | 'whu' | 'xpro' | 'youtube'>} - * @memberof VideoPlaylistsApiVideoPlaylistsNewList - */ - readonly platform?: Array - - /** - * - * @type {boolean} - * @memberof VideoPlaylistsApiVideoPlaylistsNewList - */ - readonly professional?: boolean - - /** - * Multiple values may be separated by commas. - * @type {Array} - * @memberof VideoPlaylistsApiVideoPlaylistsNewList - */ - readonly readable_id?: Array - - /** - * The type of learning resource * `course` - Course * `program` - Program * `learning_path` - Learning Path * `podcast` - Podcast * `podcast_episode` - Podcast Episode * `video` - Video * `video_playlist` - Video Playlist - * @type {Array<'course' | 'learning_path' | 'podcast' | 'podcast_episode' | 'program' | 'video' | 'video_playlist'>} - * @memberof VideoPlaylistsApiVideoPlaylistsNewList - */ - readonly resource_type?: Array - - /** - * Sort By * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `created_on` - Creation Date ascending * `-created_on` - CreationDate descending * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending - * @type {'-created_on' | '-id' | '-last_modified' | '-mitcoursenumber' | '-readable_id' | '-start_date' | '-views' | 'created_on' | 'id' | 'last_modified' | 'mitcoursenumber' | 'readable_id' | 'start_date' | 'views'} - * @memberof VideoPlaylistsApiVideoPlaylistsNewList - */ - readonly sortby?: VideoPlaylistsNewListSortbyEnum - - /** - * Multiple values may be separated by commas. - * @type {Array} - * @memberof VideoPlaylistsApiVideoPlaylistsNewList - */ - readonly topic?: Array -} - -/** - * Request parameters for videoPlaylistsRetrieve operation in VideoPlaylistsApi. - * @export - * @interface VideoPlaylistsApiVideoPlaylistsRetrieveRequest - */ -export interface VideoPlaylistsApiVideoPlaylistsRetrieveRequest { - /** - * A unique integer value identifying this learning resource. - * @type {number} - * @memberof VideoPlaylistsApiVideoPlaylistsRetrieve - */ - readonly id: number -} - -/** - * Request parameters for videoPlaylistsUpcomingList operation in VideoPlaylistsApi. - * @export - * @interface VideoPlaylistsApiVideoPlaylistsUpcomingListRequest - */ -export interface VideoPlaylistsApiVideoPlaylistsUpcomingListRequest { - /** - * Multiple values may be separated by commas. - * @type {Array} - * @memberof VideoPlaylistsApiVideoPlaylistsUpcomingList - */ - readonly course_feature?: Array - - /** - * The department that offers learning resources * `1` - Civil and Environmental Engineering * `2` - Mechanical Engineering * `3` - Materials Science and Engineering * `4` - Architecture * `5` - Chemistry * `6` - Electrical Engineering and Computer Science * `7` - Biology * `8` - Physics * `9` - Brain and Cognitive Sciences * `10` - Chemical Engineering * `11` - Urban Studies and Planning * `12` - Earth, Atmospheric, and Planetary Sciences * `14` - Economics * `15` - Sloan School of Management * `16` - Aeronautics and Astronautics * `17` - Political Science * `18` - Mathematics * `20` - Biological Engineering * `21A` - Anthropology * `21G` - Global Studies and Languages * `21H` - History * `21L` - Literature * `21M` - Music and Theater Arts * `22` - Nuclear Science and Engineering * `24` - Linguistics and Philosophy * `CC` - Concourse * `CMS-W` - Comparative Media Studies/Writing * `EC` - Edgerton Center * `ES` - Experimental Study Group * `ESD` - Engineering Systems Division * `HST` - Health Sciences and Technology * `IDS` - Institute for Data, Systems, and Society * `MAS` - Media Arts and Sciences * `PE` - Athletics, Physical Education and Recreation * `RES` - Supplemental Resources * `STS` - Science, Technology, and Society * `WGS` - Women\'s and Gender Studies - * @type {Array<'1' | '10' | '11' | '12' | '14' | '15' | '16' | '17' | '18' | '2' | '20' | '21A' | '21G' | '21H' | '21L' | '21M' | '22' | '24' | '3' | '4' | '5' | '6' | '7' | '8' | '9' | 'CC' | 'CMS-W' | 'EC' | 'ES' | 'ESD' | 'HST' | 'IDS' | 'MAS' | 'PE' | 'RES' | 'STS' | 'WGS'>} - * @memberof VideoPlaylistsApiVideoPlaylistsUpcomingList - */ - readonly department?: Array - - /** - * The course/program is offered for free - * @type {boolean} - * @memberof VideoPlaylistsApiVideoPlaylistsUpcomingList - */ - readonly free?: boolean - - /** - * The learning format of course/program resources * `online` - Online * `hybrid` - Hybrid * `in_person` - In person - * @type {Array>} - * @memberof VideoPlaylistsApiVideoPlaylistsUpcomingList - */ - readonly learning_format?: Array> - - /** - * The academic level of the resources * `undergraduate` - Undergraduate * `graduate` - Graduate * `high_school` - High School * `noncredit` - Non-Credit * `advanced` - Advanced * `intermediate` - Intermediate * `introductory` - Introductory - * @type {Array<'advanced' | 'graduate' | 'high_school' | 'intermediate' | 'introductory' | 'noncredit' | 'undergraduate'>} - * @memberof VideoPlaylistsApiVideoPlaylistsUpcomingList - */ - readonly level?: Array - - /** - * Number of results to return per page. - * @type {number} - * @memberof VideoPlaylistsApiVideoPlaylistsUpcomingList - */ - readonly limit?: number - - /** - * The organization that offers a learning resource * `mitx` - MITx * `ocw` - OCW * `bootcamps` - Bootcamps * `xpro` - xPRO * `csail` - CSAIL * `mitpe` - Professional Education * `see` - Sloan Executive Education * `scc` - Schwarzman College of Computing * `ctl` - Center for Transportation & Logistics - * @type {Array<'bootcamps' | 'csail' | 'ctl' | 'mitpe' | 'mitx' | 'ocw' | 'scc' | 'see' | 'xpro'>} - * @memberof VideoPlaylistsApiVideoPlaylistsUpcomingList - */ - readonly offered_by?: Array - - /** - * The initial index from which to return the results. - * @type {number} - * @memberof VideoPlaylistsApiVideoPlaylistsUpcomingList - */ - readonly offset?: number - - /** - * The platform on which learning resources are offered * `edx` - edX * `ocw` - OCW * `oll` - Open Learning Library * `mitxonline` - MITx Online * `bootcamps` - Bootcamps * `xpro` - xPRO * `csail` - CSAIL * `mitpe` - Professional Education * `see` - Sloan Executive Education * `scc` - Schwarzman College of Computing * `ctl` - Center for Transportation & Logistics * `whu` - WHU * `susskind` - Susskind * `globalalumni` - Global Alumni * `simplilearn` - Simplilearn * `emeritus` - Emeritus * `podcast` - Podcast * `youtube` - YouTube - * @type {Array<'bootcamps' | 'csail' | 'ctl' | 'edx' | 'emeritus' | 'globalalumni' | 'mitpe' | 'mitxonline' | 'ocw' | 'oll' | 'podcast' | 'scc' | 'see' | 'simplilearn' | 'susskind' | 'whu' | 'xpro' | 'youtube'>} - * @memberof VideoPlaylistsApiVideoPlaylistsUpcomingList - */ - readonly platform?: Array - - /** - * - * @type {boolean} - * @memberof VideoPlaylistsApiVideoPlaylistsUpcomingList - */ - readonly professional?: boolean - - /** - * Multiple values may be separated by commas. - * @type {Array} - * @memberof VideoPlaylistsApiVideoPlaylistsUpcomingList - */ - readonly readable_id?: Array - - /** - * The type of learning resource * `course` - Course * `program` - Program * `learning_path` - Learning Path * `podcast` - Podcast * `podcast_episode` - Podcast Episode * `video` - Video * `video_playlist` - Video Playlist - * @type {Array<'course' | 'learning_path' | 'podcast' | 'podcast_episode' | 'program' | 'video' | 'video_playlist'>} - * @memberof VideoPlaylistsApiVideoPlaylistsUpcomingList - */ - readonly resource_type?: Array - - /** - * Sort By * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `created_on` - Creation Date ascending * `-created_on` - CreationDate descending * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending - * @type {'-created_on' | '-id' | '-last_modified' | '-mitcoursenumber' | '-readable_id' | '-start_date' | '-views' | 'created_on' | 'id' | 'last_modified' | 'mitcoursenumber' | 'readable_id' | 'start_date' | 'views'} - * @memberof VideoPlaylistsApiVideoPlaylistsUpcomingList - */ - readonly sortby?: VideoPlaylistsUpcomingListSortbyEnum - - /** - * Multiple values may be separated by commas. - * @type {Array} - * @memberof VideoPlaylistsApiVideoPlaylistsUpcomingList - */ - readonly topic?: Array -} - -/** - * VideoPlaylistsApi - object-oriented interface - * @export - * @class VideoPlaylistsApi - * @extends {BaseAPI} - */ -export class VideoPlaylistsApi extends BaseAPI { - /** - * Get a list of related learning resources for a learning resource. - * @summary Nested Learning Resource List - * @param {VideoPlaylistsApiVideoPlaylistsItemsListRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof VideoPlaylistsApi - */ - public videoPlaylistsItemsList( - requestParameters: VideoPlaylistsApiVideoPlaylistsItemsListRequest, - options?: RawAxiosRequestConfig, - ) { - return VideoPlaylistsApiFp(this.configuration) - .videoPlaylistsItemsList( - requestParameters.learning_resource_id, - requestParameters.limit, - requestParameters.offset, - requestParameters.sortby, - options, - ) - .then((request) => request(this.axios, this.basePath)) - } - - /** - * Get a singe related learning resource for a learning resource. - * @summary Nested Learning Resource Retrieve - * @param {VideoPlaylistsApiVideoPlaylistsItemsRetrieveRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof VideoPlaylistsApi - */ - public videoPlaylistsItemsRetrieve( - requestParameters: VideoPlaylistsApiVideoPlaylistsItemsRetrieveRequest, - options?: RawAxiosRequestConfig, - ) { - return VideoPlaylistsApiFp(this.configuration) - .videoPlaylistsItemsRetrieve( - requestParameters.id, - requestParameters.learning_resource_id, - options, - ) - .then((request) => request(this.axios, this.basePath)) - } - - /** - * Get a paginated list of video playlists - * @summary List - * @param {VideoPlaylistsApiVideoPlaylistsListRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof VideoPlaylistsApi - */ - public videoPlaylistsList( - requestParameters: VideoPlaylistsApiVideoPlaylistsListRequest = {}, - options?: RawAxiosRequestConfig, - ) { - return VideoPlaylistsApiFp(this.configuration) - .videoPlaylistsList( - requestParameters.course_feature, - requestParameters.department, - requestParameters.free, - requestParameters.learning_format, - requestParameters.level, - requestParameters.limit, - requestParameters.offered_by, - requestParameters.offset, - requestParameters.platform, - requestParameters.professional, - requestParameters.readable_id, - requestParameters.resource_type, - requestParameters.sortby, - requestParameters.topic, - options, - ) - .then((request) => request(this.axios, this.basePath)) - } - - /** - * Get a paginated list of newly released Video Playlists. - * @summary List New - * @param {VideoPlaylistsApiVideoPlaylistsNewListRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof VideoPlaylistsApi - */ - public videoPlaylistsNewList( - requestParameters: VideoPlaylistsApiVideoPlaylistsNewListRequest = {}, - options?: RawAxiosRequestConfig, - ) { - return VideoPlaylistsApiFp(this.configuration) - .videoPlaylistsNewList( - requestParameters.course_feature, - requestParameters.department, - requestParameters.free, - requestParameters.learning_format, - requestParameters.level, - requestParameters.limit, - requestParameters.offered_by, - requestParameters.offset, - requestParameters.platform, - requestParameters.professional, - requestParameters.readable_id, - requestParameters.resource_type, - requestParameters.sortby, - requestParameters.topic, - options, - ) - .then((request) => request(this.axios, this.basePath)) - } - - /** - * Retrieve a single video playlist - * @summary Retrieve - * @param {VideoPlaylistsApiVideoPlaylistsRetrieveRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof VideoPlaylistsApi - */ - public videoPlaylistsRetrieve( - requestParameters: VideoPlaylistsApiVideoPlaylistsRetrieveRequest, - options?: RawAxiosRequestConfig, - ) { - return VideoPlaylistsApiFp(this.configuration) - .videoPlaylistsRetrieve(requestParameters.id, options) - .then((request) => request(this.axios, this.basePath)) - } - - /** - * Get a paginated list of upcoming Video Playlists. - * @summary List Upcoming - * @param {VideoPlaylistsApiVideoPlaylistsUpcomingListRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof VideoPlaylistsApi - */ - public videoPlaylistsUpcomingList( - requestParameters: VideoPlaylistsApiVideoPlaylistsUpcomingListRequest = {}, - options?: RawAxiosRequestConfig, - ) { - return VideoPlaylistsApiFp(this.configuration) - .videoPlaylistsUpcomingList( - requestParameters.course_feature, - requestParameters.department, - requestParameters.free, - requestParameters.learning_format, - requestParameters.level, - requestParameters.limit, - requestParameters.offered_by, - requestParameters.offset, - requestParameters.platform, - requestParameters.professional, - requestParameters.readable_id, - requestParameters.resource_type, - requestParameters.sortby, - requestParameters.topic, - options, - ) - .then((request) => request(this.axios, this.basePath)) - } -} - -/** - * @export - */ -export const VideoPlaylistsListDepartmentEnum = { - _1: "1", - _10: "10", - _11: "11", - _12: "12", - _14: "14", - _15: "15", - _16: "16", - _17: "17", - _18: "18", - _2: "2", - _20: "20", - _21A: "21A", - _21G: "21G", - _21H: "21H", - _21L: "21L", - _21M: "21M", - _22: "22", - _24: "24", - _3: "3", - _4: "4", - _5: "5", - _6: "6", - _7: "7", - _8: "8", - _9: "9", - Cc: "CC", - CmsW: "CMS-W", - Ec: "EC", - Es: "ES", - Esd: "ESD", - Hst: "HST", - Ids: "IDS", - Mas: "MAS", - Pe: "PE", - Res: "RES", - Sts: "STS", - Wgs: "WGS", -} as const -export type VideoPlaylistsListDepartmentEnum = - (typeof VideoPlaylistsListDepartmentEnum)[keyof typeof VideoPlaylistsListDepartmentEnum] -/** - * @export - */ -export const VideoPlaylistsListLevelEnum = { - Advanced: "advanced", - Graduate: "graduate", - HighSchool: "high_school", - Intermediate: "intermediate", - Introductory: "introductory", - Noncredit: "noncredit", - Undergraduate: "undergraduate", -} as const -export type VideoPlaylistsListLevelEnum = - (typeof VideoPlaylistsListLevelEnum)[keyof typeof VideoPlaylistsListLevelEnum] -/** - * @export - */ -export const VideoPlaylistsListOfferedByEnum = { - Bootcamps: "bootcamps", - Csail: "csail", - Ctl: "ctl", - Mitpe: "mitpe", - Mitx: "mitx", - Ocw: "ocw", - Scc: "scc", - See: "see", - Xpro: "xpro", -} as const -export type VideoPlaylistsListOfferedByEnum = - (typeof VideoPlaylistsListOfferedByEnum)[keyof typeof VideoPlaylistsListOfferedByEnum] -/** - * @export - */ -export const VideoPlaylistsListPlatformEnum = { - Bootcamps: "bootcamps", - Csail: "csail", - Ctl: "ctl", - Edx: "edx", - Emeritus: "emeritus", - Globalalumni: "globalalumni", - Mitpe: "mitpe", - Mitxonline: "mitxonline", - Ocw: "ocw", - Oll: "oll", - Podcast: "podcast", - Scc: "scc", - See: "see", - Simplilearn: "simplilearn", - Susskind: "susskind", - Whu: "whu", - Xpro: "xpro", - Youtube: "youtube", -} as const -export type VideoPlaylistsListPlatformEnum = - (typeof VideoPlaylistsListPlatformEnum)[keyof typeof VideoPlaylistsListPlatformEnum] -/** - * @export - */ -export const VideoPlaylistsListResourceTypeEnum = { - Course: "course", - LearningPath: "learning_path", - Podcast: "podcast", - PodcastEpisode: "podcast_episode", - Program: "program", - Video: "video", - VideoPlaylist: "video_playlist", -} as const -export type VideoPlaylistsListResourceTypeEnum = - (typeof VideoPlaylistsListResourceTypeEnum)[keyof typeof VideoPlaylistsListResourceTypeEnum] -/** - * @export - */ -export const VideoPlaylistsListSortbyEnum = { - CreatedOn: "-created_on", - Id: "-id", - LastModified: "-last_modified", - Mitcoursenumber: "-mitcoursenumber", - ReadableId: "-readable_id", - StartDate: "-start_date", - Views: "-views", - CreatedOn2: "created_on", - Id2: "id", - LastModified2: "last_modified", - Mitcoursenumber2: "mitcoursenumber", - ReadableId2: "readable_id", - StartDate2: "start_date", - Views2: "views", -} as const -export type VideoPlaylistsListSortbyEnum = - (typeof VideoPlaylistsListSortbyEnum)[keyof typeof VideoPlaylistsListSortbyEnum] -/** - * @export - */ -export const VideoPlaylistsNewListDepartmentEnum = { - _1: "1", - _10: "10", - _11: "11", - _12: "12", - _14: "14", - _15: "15", - _16: "16", - _17: "17", - _18: "18", - _2: "2", - _20: "20", - _21A: "21A", - _21G: "21G", - _21H: "21H", - _21L: "21L", - _21M: "21M", - _22: "22", - _24: "24", - _3: "3", - _4: "4", - _5: "5", - _6: "6", - _7: "7", - _8: "8", - _9: "9", - Cc: "CC", - CmsW: "CMS-W", - Ec: "EC", - Es: "ES", - Esd: "ESD", - Hst: "HST", - Ids: "IDS", - Mas: "MAS", - Pe: "PE", - Res: "RES", - Sts: "STS", - Wgs: "WGS", -} as const -export type VideoPlaylistsNewListDepartmentEnum = - (typeof VideoPlaylistsNewListDepartmentEnum)[keyof typeof VideoPlaylistsNewListDepartmentEnum] -/** - * @export - */ -export const VideoPlaylistsNewListLevelEnum = { - Advanced: "advanced", - Graduate: "graduate", - HighSchool: "high_school", - Intermediate: "intermediate", - Introductory: "introductory", - Noncredit: "noncredit", - Undergraduate: "undergraduate", -} as const -export type VideoPlaylistsNewListLevelEnum = - (typeof VideoPlaylistsNewListLevelEnum)[keyof typeof VideoPlaylistsNewListLevelEnum] + }, + /** + * Get a paginated list of video playlists + * @summary List + * @param {VideoPlaylistsApiVideoPlaylistsListRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + videoPlaylistsList( + requestParameters: VideoPlaylistsApiVideoPlaylistsListRequest = {}, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .videoPlaylistsList( + requestParameters.course_feature, + requestParameters.department, + requestParameters.free, + requestParameters.learning_format, + requestParameters.level, + requestParameters.limit, + requestParameters.offered_by, + requestParameters.offset, + requestParameters.platform, + requestParameters.professional, + requestParameters.readable_id, + requestParameters.resource_type, + requestParameters.sortby, + requestParameters.topic, + options, + ) + .then((request) => request(axios, basePath)) + }, + /** + * Retrieve a single video playlist + * @summary Retrieve + * @param {VideoPlaylistsApiVideoPlaylistsRetrieveRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + videoPlaylistsRetrieve( + requestParameters: VideoPlaylistsApiVideoPlaylistsRetrieveRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .videoPlaylistsRetrieve(requestParameters.id, options) + .then((request) => request(axios, basePath)) + }, + } +} + /** + * Request parameters for videoPlaylistsItemsList operation in VideoPlaylistsApi. * @export + * @interface VideoPlaylistsApiVideoPlaylistsItemsListRequest */ -export const VideoPlaylistsNewListOfferedByEnum = { - Bootcamps: "bootcamps", - Csail: "csail", - Ctl: "ctl", - Mitpe: "mitpe", - Mitx: "mitx", - Ocw: "ocw", - Scc: "scc", - See: "see", - Xpro: "xpro", -} as const -export type VideoPlaylistsNewListOfferedByEnum = - (typeof VideoPlaylistsNewListOfferedByEnum)[keyof typeof VideoPlaylistsNewListOfferedByEnum] +export interface VideoPlaylistsApiVideoPlaylistsItemsListRequest { + /** + * id of the parent learning resource + * @type {number} + * @memberof VideoPlaylistsApiVideoPlaylistsItemsList + */ + readonly learning_resource_id: number + + /** + * Number of results to return per page. + * @type {number} + * @memberof VideoPlaylistsApiVideoPlaylistsItemsList + */ + readonly limit?: number + + /** + * The initial index from which to return the results. + * @type {number} + * @memberof VideoPlaylistsApiVideoPlaylistsItemsList + */ + readonly offset?: number + + /** + * Which field to use when ordering the results. + * @type {string} + * @memberof VideoPlaylistsApiVideoPlaylistsItemsList + */ + readonly sortby?: string +} + /** + * Request parameters for videoPlaylistsItemsRetrieve operation in VideoPlaylistsApi. * @export + * @interface VideoPlaylistsApiVideoPlaylistsItemsRetrieveRequest */ -export const VideoPlaylistsNewListPlatformEnum = { - Bootcamps: "bootcamps", - Csail: "csail", - Ctl: "ctl", - Edx: "edx", - Emeritus: "emeritus", - Globalalumni: "globalalumni", - Mitpe: "mitpe", - Mitxonline: "mitxonline", - Ocw: "ocw", - Oll: "oll", - Podcast: "podcast", - Scc: "scc", - See: "see", - Simplilearn: "simplilearn", - Susskind: "susskind", - Whu: "whu", - Xpro: "xpro", - Youtube: "youtube", -} as const -export type VideoPlaylistsNewListPlatformEnum = - (typeof VideoPlaylistsNewListPlatformEnum)[keyof typeof VideoPlaylistsNewListPlatformEnum] +export interface VideoPlaylistsApiVideoPlaylistsItemsRetrieveRequest { + /** + * A unique integer value identifying this learning resource relationship. + * @type {number} + * @memberof VideoPlaylistsApiVideoPlaylistsItemsRetrieve + */ + readonly id: number + + /** + * id of the parent learning resource + * @type {number} + * @memberof VideoPlaylistsApiVideoPlaylistsItemsRetrieve + */ + readonly learning_resource_id: number +} + /** + * Request parameters for videoPlaylistsList operation in VideoPlaylistsApi. * @export + * @interface VideoPlaylistsApiVideoPlaylistsListRequest */ -export const VideoPlaylistsNewListResourceTypeEnum = { - Course: "course", - LearningPath: "learning_path", - Podcast: "podcast", - PodcastEpisode: "podcast_episode", - Program: "program", - Video: "video", - VideoPlaylist: "video_playlist", -} as const -export type VideoPlaylistsNewListResourceTypeEnum = - (typeof VideoPlaylistsNewListResourceTypeEnum)[keyof typeof VideoPlaylistsNewListResourceTypeEnum] +export interface VideoPlaylistsApiVideoPlaylistsListRequest { + /** + * Multiple values may be separated by commas. + * @type {Array} + * @memberof VideoPlaylistsApiVideoPlaylistsList + */ + readonly course_feature?: Array + + /** + * The department that offers learning resources * `1` - Civil and Environmental Engineering * `2` - Mechanical Engineering * `3` - Materials Science and Engineering * `4` - Architecture * `5` - Chemistry * `6` - Electrical Engineering and Computer Science * `7` - Biology * `8` - Physics * `9` - Brain and Cognitive Sciences * `10` - Chemical Engineering * `11` - Urban Studies and Planning * `12` - Earth, Atmospheric, and Planetary Sciences * `14` - Economics * `15` - Sloan School of Management * `16` - Aeronautics and Astronautics * `17` - Political Science * `18` - Mathematics * `20` - Biological Engineering * `21A` - Anthropology * `21G` - Global Studies and Languages * `21H` - History * `21L` - Literature * `21M` - Music and Theater Arts * `22` - Nuclear Science and Engineering * `24` - Linguistics and Philosophy * `CC` - Concourse * `CMS-W` - Comparative Media Studies/Writing * `EC` - Edgerton Center * `ES` - Experimental Study Group * `ESD` - Engineering Systems Division * `HST` - Health Sciences and Technology * `IDS` - Institute for Data, Systems, and Society * `MAS` - Media Arts and Sciences * `PE` - Athletics, Physical Education and Recreation * `RES` - Supplemental Resources * `STS` - Science, Technology, and Society * `WGS` - Women\'s and Gender Studies + * @type {Array<'1' | '10' | '11' | '12' | '14' | '15' | '16' | '17' | '18' | '2' | '20' | '21A' | '21G' | '21H' | '21L' | '21M' | '22' | '24' | '3' | '4' | '5' | '6' | '7' | '8' | '9' | 'CC' | 'CMS-W' | 'EC' | 'ES' | 'ESD' | 'HST' | 'IDS' | 'MAS' | 'PE' | 'RES' | 'STS' | 'WGS'>} + * @memberof VideoPlaylistsApiVideoPlaylistsList + */ + readonly department?: Array + + /** + * The course/program is offered for free + * @type {boolean} + * @memberof VideoPlaylistsApiVideoPlaylistsList + */ + readonly free?: boolean + + /** + * The learning format of course/program resources * `online` - Online * `hybrid` - Hybrid * `in_person` - In person + * @type {Array>} + * @memberof VideoPlaylistsApiVideoPlaylistsList + */ + readonly learning_format?: Array> + + /** + * The academic level of the resources * `undergraduate` - Undergraduate * `graduate` - Graduate * `high_school` - High School * `noncredit` - Non-Credit * `advanced` - Advanced * `intermediate` - Intermediate * `introductory` - Introductory + * @type {Array<'advanced' | 'graduate' | 'high_school' | 'intermediate' | 'introductory' | 'noncredit' | 'undergraduate'>} + * @memberof VideoPlaylistsApiVideoPlaylistsList + */ + readonly level?: Array + + /** + * Number of results to return per page. + * @type {number} + * @memberof VideoPlaylistsApiVideoPlaylistsList + */ + readonly limit?: number + + /** + * The organization that offers a learning resource * `mitx` - MITx * `ocw` - OCW * `bootcamps` - Bootcamps * `xpro` - xPRO * `csail` - CSAIL * `mitpe` - Professional Education * `see` - Sloan Executive Education * `scc` - Schwarzman College of Computing * `ctl` - Center for Transportation & Logistics + * @type {Array<'bootcamps' | 'csail' | 'ctl' | 'mitpe' | 'mitx' | 'ocw' | 'scc' | 'see' | 'xpro'>} + * @memberof VideoPlaylistsApiVideoPlaylistsList + */ + readonly offered_by?: Array + + /** + * The initial index from which to return the results. + * @type {number} + * @memberof VideoPlaylistsApiVideoPlaylistsList + */ + readonly offset?: number + + /** + * The platform on which learning resources are offered * `edx` - edX * `ocw` - OCW * `oll` - Open Learning Library * `mitxonline` - MITx Online * `bootcamps` - Bootcamps * `xpro` - xPRO * `csail` - CSAIL * `mitpe` - Professional Education * `see` - Sloan Executive Education * `scc` - Schwarzman College of Computing * `ctl` - Center for Transportation & Logistics * `whu` - WHU * `susskind` - Susskind * `globalalumni` - Global Alumni * `simplilearn` - Simplilearn * `emeritus` - Emeritus * `podcast` - Podcast * `youtube` - YouTube + * @type {Array<'bootcamps' | 'csail' | 'ctl' | 'edx' | 'emeritus' | 'globalalumni' | 'mitpe' | 'mitxonline' | 'ocw' | 'oll' | 'podcast' | 'scc' | 'see' | 'simplilearn' | 'susskind' | 'whu' | 'xpro' | 'youtube'>} + * @memberof VideoPlaylistsApiVideoPlaylistsList + */ + readonly platform?: Array + + /** + * + * @type {boolean} + * @memberof VideoPlaylistsApiVideoPlaylistsList + */ + readonly professional?: boolean + + /** + * Multiple values may be separated by commas. + * @type {Array} + * @memberof VideoPlaylistsApiVideoPlaylistsList + */ + readonly readable_id?: Array + + /** + * The type of learning resource * `course` - Course * `program` - Program * `learning_path` - Learning Path * `podcast` - Podcast * `podcast_episode` - Podcast Episode * `video` - Video * `video_playlist` - Video Playlist + * @type {Array<'course' | 'learning_path' | 'podcast' | 'podcast_episode' | 'program' | 'video' | 'video_playlist'>} + * @memberof VideoPlaylistsApiVideoPlaylistsList + */ + readonly resource_type?: Array + + /** + * Sort By * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `new` - Newest resources first * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending * `upcoming` - Next start date ascending + * @type {'-id' | '-last_modified' | '-mitcoursenumber' | '-readable_id' | '-start_date' | '-views' | 'id' | 'last_modified' | 'mitcoursenumber' | 'new' | 'readable_id' | 'start_date' | 'upcoming' | 'views'} + * @memberof VideoPlaylistsApiVideoPlaylistsList + */ + readonly sortby?: VideoPlaylistsListSortbyEnum + + /** + * Multiple values may be separated by commas. + * @type {Array} + * @memberof VideoPlaylistsApiVideoPlaylistsList + */ + readonly topic?: Array +} + /** + * Request parameters for videoPlaylistsRetrieve operation in VideoPlaylistsApi. * @export + * @interface VideoPlaylistsApiVideoPlaylistsRetrieveRequest */ -export const VideoPlaylistsNewListSortbyEnum = { - CreatedOn: "-created_on", - Id: "-id", - LastModified: "-last_modified", - Mitcoursenumber: "-mitcoursenumber", - ReadableId: "-readable_id", - StartDate: "-start_date", - Views: "-views", - CreatedOn2: "created_on", - Id2: "id", - LastModified2: "last_modified", - Mitcoursenumber2: "mitcoursenumber", - ReadableId2: "readable_id", - StartDate2: "start_date", - Views2: "views", -} as const -export type VideoPlaylistsNewListSortbyEnum = - (typeof VideoPlaylistsNewListSortbyEnum)[keyof typeof VideoPlaylistsNewListSortbyEnum] +export interface VideoPlaylistsApiVideoPlaylistsRetrieveRequest { + /** + * A unique integer value identifying this learning resource. + * @type {number} + * @memberof VideoPlaylistsApiVideoPlaylistsRetrieve + */ + readonly id: number +} + +/** + * VideoPlaylistsApi - object-oriented interface + * @export + * @class VideoPlaylistsApi + * @extends {BaseAPI} + */ +export class VideoPlaylistsApi extends BaseAPI { + /** + * Get a list of related learning resources for a learning resource. + * @summary Nested Learning Resource List + * @param {VideoPlaylistsApiVideoPlaylistsItemsListRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof VideoPlaylistsApi + */ + public videoPlaylistsItemsList( + requestParameters: VideoPlaylistsApiVideoPlaylistsItemsListRequest, + options?: RawAxiosRequestConfig, + ) { + return VideoPlaylistsApiFp(this.configuration) + .videoPlaylistsItemsList( + requestParameters.learning_resource_id, + requestParameters.limit, + requestParameters.offset, + requestParameters.sortby, + options, + ) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Get a singe related learning resource for a learning resource. + * @summary Nested Learning Resource Retrieve + * @param {VideoPlaylistsApiVideoPlaylistsItemsRetrieveRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof VideoPlaylistsApi + */ + public videoPlaylistsItemsRetrieve( + requestParameters: VideoPlaylistsApiVideoPlaylistsItemsRetrieveRequest, + options?: RawAxiosRequestConfig, + ) { + return VideoPlaylistsApiFp(this.configuration) + .videoPlaylistsItemsRetrieve( + requestParameters.id, + requestParameters.learning_resource_id, + options, + ) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Get a paginated list of video playlists + * @summary List + * @param {VideoPlaylistsApiVideoPlaylistsListRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof VideoPlaylistsApi + */ + public videoPlaylistsList( + requestParameters: VideoPlaylistsApiVideoPlaylistsListRequest = {}, + options?: RawAxiosRequestConfig, + ) { + return VideoPlaylistsApiFp(this.configuration) + .videoPlaylistsList( + requestParameters.course_feature, + requestParameters.department, + requestParameters.free, + requestParameters.learning_format, + requestParameters.level, + requestParameters.limit, + requestParameters.offered_by, + requestParameters.offset, + requestParameters.platform, + requestParameters.professional, + requestParameters.readable_id, + requestParameters.resource_type, + requestParameters.sortby, + requestParameters.topic, + options, + ) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Retrieve a single video playlist + * @summary Retrieve + * @param {VideoPlaylistsApiVideoPlaylistsRetrieveRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof VideoPlaylistsApi + */ + public videoPlaylistsRetrieve( + requestParameters: VideoPlaylistsApiVideoPlaylistsRetrieveRequest, + options?: RawAxiosRequestConfig, + ) { + return VideoPlaylistsApiFp(this.configuration) + .videoPlaylistsRetrieve(requestParameters.id, options) + .then((request) => request(this.axios, this.basePath)) + } +} + /** * @export */ -export const VideoPlaylistsUpcomingListDepartmentEnum = { +export const VideoPlaylistsListDepartmentEnum = { _1: "1", _10: "10", _11: "11", @@ -23018,12 +18818,12 @@ export const VideoPlaylistsUpcomingListDepartmentEnum = { Sts: "STS", Wgs: "WGS", } as const -export type VideoPlaylistsUpcomingListDepartmentEnum = - (typeof VideoPlaylistsUpcomingListDepartmentEnum)[keyof typeof VideoPlaylistsUpcomingListDepartmentEnum] +export type VideoPlaylistsListDepartmentEnum = + (typeof VideoPlaylistsListDepartmentEnum)[keyof typeof VideoPlaylistsListDepartmentEnum] /** * @export */ -export const VideoPlaylistsUpcomingListLevelEnum = { +export const VideoPlaylistsListLevelEnum = { Advanced: "advanced", Graduate: "graduate", HighSchool: "high_school", @@ -23032,12 +18832,12 @@ export const VideoPlaylistsUpcomingListLevelEnum = { Noncredit: "noncredit", Undergraduate: "undergraduate", } as const -export type VideoPlaylistsUpcomingListLevelEnum = - (typeof VideoPlaylistsUpcomingListLevelEnum)[keyof typeof VideoPlaylistsUpcomingListLevelEnum] +export type VideoPlaylistsListLevelEnum = + (typeof VideoPlaylistsListLevelEnum)[keyof typeof VideoPlaylistsListLevelEnum] /** * @export */ -export const VideoPlaylistsUpcomingListOfferedByEnum = { +export const VideoPlaylistsListOfferedByEnum = { Bootcamps: "bootcamps", Csail: "csail", Ctl: "ctl", @@ -23048,12 +18848,12 @@ export const VideoPlaylistsUpcomingListOfferedByEnum = { See: "see", Xpro: "xpro", } as const -export type VideoPlaylistsUpcomingListOfferedByEnum = - (typeof VideoPlaylistsUpcomingListOfferedByEnum)[keyof typeof VideoPlaylistsUpcomingListOfferedByEnum] +export type VideoPlaylistsListOfferedByEnum = + (typeof VideoPlaylistsListOfferedByEnum)[keyof typeof VideoPlaylistsListOfferedByEnum] /** * @export */ -export const VideoPlaylistsUpcomingListPlatformEnum = { +export const VideoPlaylistsListPlatformEnum = { Bootcamps: "bootcamps", Csail: "csail", Ctl: "ctl", @@ -23073,12 +18873,12 @@ export const VideoPlaylistsUpcomingListPlatformEnum = { Xpro: "xpro", Youtube: "youtube", } as const -export type VideoPlaylistsUpcomingListPlatformEnum = - (typeof VideoPlaylistsUpcomingListPlatformEnum)[keyof typeof VideoPlaylistsUpcomingListPlatformEnum] +export type VideoPlaylistsListPlatformEnum = + (typeof VideoPlaylistsListPlatformEnum)[keyof typeof VideoPlaylistsListPlatformEnum] /** * @export */ -export const VideoPlaylistsUpcomingListResourceTypeEnum = { +export const VideoPlaylistsListResourceTypeEnum = { Course: "course", LearningPath: "learning_path", Podcast: "podcast", @@ -23087,203 +18887,76 @@ export const VideoPlaylistsUpcomingListResourceTypeEnum = { Video: "video", VideoPlaylist: "video_playlist", } as const -export type VideoPlaylistsUpcomingListResourceTypeEnum = - (typeof VideoPlaylistsUpcomingListResourceTypeEnum)[keyof typeof VideoPlaylistsUpcomingListResourceTypeEnum] +export type VideoPlaylistsListResourceTypeEnum = + (typeof VideoPlaylistsListResourceTypeEnum)[keyof typeof VideoPlaylistsListResourceTypeEnum] /** * @export */ -export const VideoPlaylistsUpcomingListSortbyEnum = { - CreatedOn: "-created_on", +export const VideoPlaylistsListSortbyEnum = { Id: "-id", LastModified: "-last_modified", Mitcoursenumber: "-mitcoursenumber", ReadableId: "-readable_id", StartDate: "-start_date", Views: "-views", - CreatedOn2: "created_on", Id2: "id", LastModified2: "last_modified", Mitcoursenumber2: "mitcoursenumber", + New: "new", ReadableId2: "readable_id", StartDate2: "start_date", + Upcoming: "upcoming", Views2: "views", } as const -export type VideoPlaylistsUpcomingListSortbyEnum = - (typeof VideoPlaylistsUpcomingListSortbyEnum)[keyof typeof VideoPlaylistsUpcomingListSortbyEnum] +export type VideoPlaylistsListSortbyEnum = + (typeof VideoPlaylistsListSortbyEnum)[keyof typeof VideoPlaylistsListSortbyEnum] /** * VideosApi - axios parameter creator * @export - */ -export const VideosApiAxiosParamCreator = function ( - configuration?: Configuration, -) { - return { - /** - * Get a paginated list of videos - * @summary List - * @param {Array} [course_feature] Multiple values may be separated by commas. - * @param {Array} [department] The department that offers learning resources * `1` - Civil and Environmental Engineering * `2` - Mechanical Engineering * `3` - Materials Science and Engineering * `4` - Architecture * `5` - Chemistry * `6` - Electrical Engineering and Computer Science * `7` - Biology * `8` - Physics * `9` - Brain and Cognitive Sciences * `10` - Chemical Engineering * `11` - Urban Studies and Planning * `12` - Earth, Atmospheric, and Planetary Sciences * `14` - Economics * `15` - Sloan School of Management * `16` - Aeronautics and Astronautics * `17` - Political Science * `18` - Mathematics * `20` - Biological Engineering * `21A` - Anthropology * `21G` - Global Studies and Languages * `21H` - History * `21L` - Literature * `21M` - Music and Theater Arts * `22` - Nuclear Science and Engineering * `24` - Linguistics and Philosophy * `CC` - Concourse * `CMS-W` - Comparative Media Studies/Writing * `EC` - Edgerton Center * `ES` - Experimental Study Group * `ESD` - Engineering Systems Division * `HST` - Health Sciences and Technology * `IDS` - Institute for Data, Systems, and Society * `MAS` - Media Arts and Sciences * `PE` - Athletics, Physical Education and Recreation * `RES` - Supplemental Resources * `STS` - Science, Technology, and Society * `WGS` - Women\'s and Gender Studies - * @param {boolean} [free] The course/program is offered for free - * @param {Array>} [learning_format] The learning format of course/program resources * `online` - Online * `hybrid` - Hybrid * `in_person` - In person - * @param {Array} [level] The academic level of the resources * `undergraduate` - Undergraduate * `graduate` - Graduate * `high_school` - High School * `noncredit` - Non-Credit * `advanced` - Advanced * `intermediate` - Intermediate * `introductory` - Introductory - * @param {number} [limit] Number of results to return per page. - * @param {Array} [offered_by] The organization that offers a learning resource * `mitx` - MITx * `ocw` - OCW * `bootcamps` - Bootcamps * `xpro` - xPRO * `csail` - CSAIL * `mitpe` - Professional Education * `see` - Sloan Executive Education * `scc` - Schwarzman College of Computing * `ctl` - Center for Transportation & Logistics - * @param {number} [offset] The initial index from which to return the results. - * @param {Array} [platform] The platform on which learning resources are offered * `edx` - edX * `ocw` - OCW * `oll` - Open Learning Library * `mitxonline` - MITx Online * `bootcamps` - Bootcamps * `xpro` - xPRO * `csail` - CSAIL * `mitpe` - Professional Education * `see` - Sloan Executive Education * `scc` - Schwarzman College of Computing * `ctl` - Center for Transportation & Logistics * `whu` - WHU * `susskind` - Susskind * `globalalumni` - Global Alumni * `simplilearn` - Simplilearn * `emeritus` - Emeritus * `podcast` - Podcast * `youtube` - YouTube - * @param {boolean} [professional] - * @param {Array} [readable_id] Multiple values may be separated by commas. - * @param {Array} [resource_type] The type of learning resource * `course` - Course * `program` - Program * `learning_path` - Learning Path * `podcast` - Podcast * `podcast_episode` - Podcast Episode * `video` - Video * `video_playlist` - Video Playlist - * @param {VideosListSortbyEnum} [sortby] Sort By * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `created_on` - Creation Date ascending * `-created_on` - CreationDate descending * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending - * @param {Array} [topic] Multiple values may be separated by commas. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - videosList: async ( - course_feature?: Array, - department?: Array, - free?: boolean, - learning_format?: Array>, - level?: Array, - limit?: number, - offered_by?: Array, - offset?: number, - platform?: Array, - professional?: boolean, - readable_id?: Array, - resource_type?: Array, - sortby?: VideosListSortbyEnum, - topic?: Array, - options: RawAxiosRequestConfig = {}, - ): Promise => { - const localVarPath = `/api/v1/videos/` - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) - let baseOptions - if (configuration) { - baseOptions = configuration.baseOptions - } - - const localVarRequestOptions = { - method: "GET", - ...baseOptions, - ...options, - } - const localVarHeaderParameter = {} as any - const localVarQueryParameter = {} as any - - if (course_feature) { - localVarQueryParameter["course_feature"] = course_feature.join( - COLLECTION_FORMATS.csv, - ) - } - - if (department) { - localVarQueryParameter["department"] = department - } - - if (free !== undefined) { - localVarQueryParameter["free"] = free - } - - if (learning_format) { - localVarQueryParameter["learning_format"] = learning_format - } - - if (level) { - localVarQueryParameter["level"] = level - } - - if (limit !== undefined) { - localVarQueryParameter["limit"] = limit - } - - if (offered_by) { - localVarQueryParameter["offered_by"] = offered_by - } - - if (offset !== undefined) { - localVarQueryParameter["offset"] = offset - } - - if (platform) { - localVarQueryParameter["platform"] = platform - } - - if (professional !== undefined) { - localVarQueryParameter["professional"] = professional - } - - if (readable_id) { - localVarQueryParameter["readable_id"] = readable_id.join( - COLLECTION_FORMATS.csv, - ) - } - - if (resource_type) { - localVarQueryParameter["resource_type"] = resource_type - } - - if (sortby !== undefined) { - localVarQueryParameter["sortby"] = sortby - } - - if (topic) { - localVarQueryParameter["topic"] = topic.join(COLLECTION_FORMATS.csv) - } - - setSearchParams(localVarUrlObj, localVarQueryParameter) - let headersFromBaseOptions = - baseOptions && baseOptions.headers ? baseOptions.headers : {} - localVarRequestOptions.headers = { - ...localVarHeaderParameter, - ...headersFromBaseOptions, - ...options.headers, - } - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - } - }, + */ +export const VideosApiAxiosParamCreator = function ( + configuration?: Configuration, +) { + return { /** - * Get a paginated list of newly released Videos. - * @summary List New + * Get a paginated list of videos + * @summary List * @param {Array} [course_feature] Multiple values may be separated by commas. - * @param {Array} [department] The department that offers learning resources * `1` - Civil and Environmental Engineering * `2` - Mechanical Engineering * `3` - Materials Science and Engineering * `4` - Architecture * `5` - Chemistry * `6` - Electrical Engineering and Computer Science * `7` - Biology * `8` - Physics * `9` - Brain and Cognitive Sciences * `10` - Chemical Engineering * `11` - Urban Studies and Planning * `12` - Earth, Atmospheric, and Planetary Sciences * `14` - Economics * `15` - Sloan School of Management * `16` - Aeronautics and Astronautics * `17` - Political Science * `18` - Mathematics * `20` - Biological Engineering * `21A` - Anthropology * `21G` - Global Studies and Languages * `21H` - History * `21L` - Literature * `21M` - Music and Theater Arts * `22` - Nuclear Science and Engineering * `24` - Linguistics and Philosophy * `CC` - Concourse * `CMS-W` - Comparative Media Studies/Writing * `EC` - Edgerton Center * `ES` - Experimental Study Group * `ESD` - Engineering Systems Division * `HST` - Health Sciences and Technology * `IDS` - Institute for Data, Systems, and Society * `MAS` - Media Arts and Sciences * `PE` - Athletics, Physical Education and Recreation * `RES` - Supplemental Resources * `STS` - Science, Technology, and Society * `WGS` - Women\'s and Gender Studies + * @param {Array} [department] The department that offers learning resources * `1` - Civil and Environmental Engineering * `2` - Mechanical Engineering * `3` - Materials Science and Engineering * `4` - Architecture * `5` - Chemistry * `6` - Electrical Engineering and Computer Science * `7` - Biology * `8` - Physics * `9` - Brain and Cognitive Sciences * `10` - Chemical Engineering * `11` - Urban Studies and Planning * `12` - Earth, Atmospheric, and Planetary Sciences * `14` - Economics * `15` - Sloan School of Management * `16` - Aeronautics and Astronautics * `17` - Political Science * `18` - Mathematics * `20` - Biological Engineering * `21A` - Anthropology * `21G` - Global Studies and Languages * `21H` - History * `21L` - Literature * `21M` - Music and Theater Arts * `22` - Nuclear Science and Engineering * `24` - Linguistics and Philosophy * `CC` - Concourse * `CMS-W` - Comparative Media Studies/Writing * `EC` - Edgerton Center * `ES` - Experimental Study Group * `ESD` - Engineering Systems Division * `HST` - Health Sciences and Technology * `IDS` - Institute for Data, Systems, and Society * `MAS` - Media Arts and Sciences * `PE` - Athletics, Physical Education and Recreation * `RES` - Supplemental Resources * `STS` - Science, Technology, and Society * `WGS` - Women\'s and Gender Studies * @param {boolean} [free] The course/program is offered for free * @param {Array>} [learning_format] The learning format of course/program resources * `online` - Online * `hybrid` - Hybrid * `in_person` - In person - * @param {Array} [level] The academic level of the resources * `undergraduate` - Undergraduate * `graduate` - Graduate * `high_school` - High School * `noncredit` - Non-Credit * `advanced` - Advanced * `intermediate` - Intermediate * `introductory` - Introductory + * @param {Array} [level] The academic level of the resources * `undergraduate` - Undergraduate * `graduate` - Graduate * `high_school` - High School * `noncredit` - Non-Credit * `advanced` - Advanced * `intermediate` - Intermediate * `introductory` - Introductory * @param {number} [limit] Number of results to return per page. - * @param {Array} [offered_by] The organization that offers a learning resource * `mitx` - MITx * `ocw` - OCW * `bootcamps` - Bootcamps * `xpro` - xPRO * `csail` - CSAIL * `mitpe` - Professional Education * `see` - Sloan Executive Education * `scc` - Schwarzman College of Computing * `ctl` - Center for Transportation & Logistics + * @param {Array} [offered_by] The organization that offers a learning resource * `mitx` - MITx * `ocw` - OCW * `bootcamps` - Bootcamps * `xpro` - xPRO * `csail` - CSAIL * `mitpe` - Professional Education * `see` - Sloan Executive Education * `scc` - Schwarzman College of Computing * `ctl` - Center for Transportation & Logistics * @param {number} [offset] The initial index from which to return the results. - * @param {Array} [platform] The platform on which learning resources are offered * `edx` - edX * `ocw` - OCW * `oll` - Open Learning Library * `mitxonline` - MITx Online * `bootcamps` - Bootcamps * `xpro` - xPRO * `csail` - CSAIL * `mitpe` - Professional Education * `see` - Sloan Executive Education * `scc` - Schwarzman College of Computing * `ctl` - Center for Transportation & Logistics * `whu` - WHU * `susskind` - Susskind * `globalalumni` - Global Alumni * `simplilearn` - Simplilearn * `emeritus` - Emeritus * `podcast` - Podcast * `youtube` - YouTube + * @param {Array} [platform] The platform on which learning resources are offered * `edx` - edX * `ocw` - OCW * `oll` - Open Learning Library * `mitxonline` - MITx Online * `bootcamps` - Bootcamps * `xpro` - xPRO * `csail` - CSAIL * `mitpe` - Professional Education * `see` - Sloan Executive Education * `scc` - Schwarzman College of Computing * `ctl` - Center for Transportation & Logistics * `whu` - WHU * `susskind` - Susskind * `globalalumni` - Global Alumni * `simplilearn` - Simplilearn * `emeritus` - Emeritus * `podcast` - Podcast * `youtube` - YouTube * @param {boolean} [professional] * @param {Array} [readable_id] Multiple values may be separated by commas. - * @param {Array} [resource_type] The type of learning resource * `course` - Course * `program` - Program * `learning_path` - Learning Path * `podcast` - Podcast * `podcast_episode` - Podcast Episode * `video` - Video * `video_playlist` - Video Playlist - * @param {VideosNewListSortbyEnum} [sortby] Sort By * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `created_on` - Creation Date ascending * `-created_on` - CreationDate descending * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending + * @param {Array} [resource_type] The type of learning resource * `course` - Course * `program` - Program * `learning_path` - Learning Path * `podcast` - Podcast * `podcast_episode` - Podcast Episode * `video` - Video * `video_playlist` - Video Playlist + * @param {VideosListSortbyEnum} [sortby] Sort By * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `new` - Newest resources first * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending * `upcoming` - Next start date ascending * @param {Array} [topic] Multiple values may be separated by commas. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - videosNewList: async ( + videosList: async ( course_feature?: Array, - department?: Array, + department?: Array, free?: boolean, learning_format?: Array>, - level?: Array, + level?: Array, limit?: number, - offered_by?: Array, + offered_by?: Array, offset?: number, - platform?: Array, + platform?: Array, professional?: boolean, readable_id?: Array, - resource_type?: Array, - sortby?: VideosNewListSortbyEnum, + resource_type?: Array, + sortby?: VideosListSortbyEnum, topic?: Array, options: RawAxiosRequestConfig = {}, ): Promise => { - const localVarPath = `/api/v1/videos/new/` + const localVarPath = `/api/v1/videos/` // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) let baseOptions @@ -23414,133 +19087,6 @@ export const VideosApiAxiosParamCreator = function ( ...options.headers, } - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - } - }, - /** - * Get a paginated list of upcoming Videos. - * @summary List Upcoming - * @param {Array} [course_feature] Multiple values may be separated by commas. - * @param {Array} [department] The department that offers learning resources * `1` - Civil and Environmental Engineering * `2` - Mechanical Engineering * `3` - Materials Science and Engineering * `4` - Architecture * `5` - Chemistry * `6` - Electrical Engineering and Computer Science * `7` - Biology * `8` - Physics * `9` - Brain and Cognitive Sciences * `10` - Chemical Engineering * `11` - Urban Studies and Planning * `12` - Earth, Atmospheric, and Planetary Sciences * `14` - Economics * `15` - Sloan School of Management * `16` - Aeronautics and Astronautics * `17` - Political Science * `18` - Mathematics * `20` - Biological Engineering * `21A` - Anthropology * `21G` - Global Studies and Languages * `21H` - History * `21L` - Literature * `21M` - Music and Theater Arts * `22` - Nuclear Science and Engineering * `24` - Linguistics and Philosophy * `CC` - Concourse * `CMS-W` - Comparative Media Studies/Writing * `EC` - Edgerton Center * `ES` - Experimental Study Group * `ESD` - Engineering Systems Division * `HST` - Health Sciences and Technology * `IDS` - Institute for Data, Systems, and Society * `MAS` - Media Arts and Sciences * `PE` - Athletics, Physical Education and Recreation * `RES` - Supplemental Resources * `STS` - Science, Technology, and Society * `WGS` - Women\'s and Gender Studies - * @param {boolean} [free] The course/program is offered for free - * @param {Array>} [learning_format] The learning format of course/program resources * `online` - Online * `hybrid` - Hybrid * `in_person` - In person - * @param {Array} [level] The academic level of the resources * `undergraduate` - Undergraduate * `graduate` - Graduate * `high_school` - High School * `noncredit` - Non-Credit * `advanced` - Advanced * `intermediate` - Intermediate * `introductory` - Introductory - * @param {number} [limit] Number of results to return per page. - * @param {Array} [offered_by] The organization that offers a learning resource * `mitx` - MITx * `ocw` - OCW * `bootcamps` - Bootcamps * `xpro` - xPRO * `csail` - CSAIL * `mitpe` - Professional Education * `see` - Sloan Executive Education * `scc` - Schwarzman College of Computing * `ctl` - Center for Transportation & Logistics - * @param {number} [offset] The initial index from which to return the results. - * @param {Array} [platform] The platform on which learning resources are offered * `edx` - edX * `ocw` - OCW * `oll` - Open Learning Library * `mitxonline` - MITx Online * `bootcamps` - Bootcamps * `xpro` - xPRO * `csail` - CSAIL * `mitpe` - Professional Education * `see` - Sloan Executive Education * `scc` - Schwarzman College of Computing * `ctl` - Center for Transportation & Logistics * `whu` - WHU * `susskind` - Susskind * `globalalumni` - Global Alumni * `simplilearn` - Simplilearn * `emeritus` - Emeritus * `podcast` - Podcast * `youtube` - YouTube - * @param {boolean} [professional] - * @param {Array} [readable_id] Multiple values may be separated by commas. - * @param {Array} [resource_type] The type of learning resource * `course` - Course * `program` - Program * `learning_path` - Learning Path * `podcast` - Podcast * `podcast_episode` - Podcast Episode * `video` - Video * `video_playlist` - Video Playlist - * @param {VideosUpcomingListSortbyEnum} [sortby] Sort By * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `created_on` - Creation Date ascending * `-created_on` - CreationDate descending * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending - * @param {Array} [topic] Multiple values may be separated by commas. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - videosUpcomingList: async ( - course_feature?: Array, - department?: Array, - free?: boolean, - learning_format?: Array>, - level?: Array, - limit?: number, - offered_by?: Array, - offset?: number, - platform?: Array, - professional?: boolean, - readable_id?: Array, - resource_type?: Array, - sortby?: VideosUpcomingListSortbyEnum, - topic?: Array, - options: RawAxiosRequestConfig = {}, - ): Promise => { - const localVarPath = `/api/v1/videos/upcoming/` - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) - let baseOptions - if (configuration) { - baseOptions = configuration.baseOptions - } - - const localVarRequestOptions = { - method: "GET", - ...baseOptions, - ...options, - } - const localVarHeaderParameter = {} as any - const localVarQueryParameter = {} as any - - if (course_feature) { - localVarQueryParameter["course_feature"] = course_feature.join( - COLLECTION_FORMATS.csv, - ) - } - - if (department) { - localVarQueryParameter["department"] = department - } - - if (free !== undefined) { - localVarQueryParameter["free"] = free - } - - if (learning_format) { - localVarQueryParameter["learning_format"] = learning_format - } - - if (level) { - localVarQueryParameter["level"] = level - } - - if (limit !== undefined) { - localVarQueryParameter["limit"] = limit - } - - if (offered_by) { - localVarQueryParameter["offered_by"] = offered_by - } - - if (offset !== undefined) { - localVarQueryParameter["offset"] = offset - } - - if (platform) { - localVarQueryParameter["platform"] = platform - } - - if (professional !== undefined) { - localVarQueryParameter["professional"] = professional - } - - if (readable_id) { - localVarQueryParameter["readable_id"] = readable_id.join( - COLLECTION_FORMATS.csv, - ) - } - - if (resource_type) { - localVarQueryParameter["resource_type"] = resource_type - } - - if (sortby !== undefined) { - localVarQueryParameter["sortby"] = sortby - } - - if (topic) { - localVarQueryParameter["topic"] = topic.join(COLLECTION_FORMATS.csv) - } - - setSearchParams(localVarUrlObj, localVarQueryParameter) - let headersFromBaseOptions = - baseOptions && baseOptions.headers ? baseOptions.headers : {} - localVarRequestOptions.headers = { - ...localVarHeaderParameter, - ...headersFromBaseOptions, - ...options.headers, - } - return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, @@ -23571,7 +19117,7 @@ export const VideosApiFp = function (configuration?: Configuration) { * @param {boolean} [professional] * @param {Array} [readable_id] Multiple values may be separated by commas. * @param {Array} [resource_type] The type of learning resource * `course` - Course * `program` - Program * `learning_path` - Learning Path * `podcast` - Podcast * `podcast_episode` - Podcast Episode * `video` - Video * `video_playlist` - Video Playlist - * @param {VideosListSortbyEnum} [sortby] Sort By * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `created_on` - Creation Date ascending * `-created_on` - CreationDate descending * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending + * @param {VideosListSortbyEnum} [sortby] Sort By * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `new` - Newest resources first * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending * `upcoming` - Next start date ascending * @param {Array} [topic] Multiple values may be separated by commas. * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -23626,167 +19172,26 @@ export const VideosApiFp = function (configuration?: Configuration) { configuration, )(axios, operationBasePath || basePath) }, - /** - * Get a paginated list of newly released Videos. - * @summary List New - * @param {Array} [course_feature] Multiple values may be separated by commas. - * @param {Array} [department] The department that offers learning resources * `1` - Civil and Environmental Engineering * `2` - Mechanical Engineering * `3` - Materials Science and Engineering * `4` - Architecture * `5` - Chemistry * `6` - Electrical Engineering and Computer Science * `7` - Biology * `8` - Physics * `9` - Brain and Cognitive Sciences * `10` - Chemical Engineering * `11` - Urban Studies and Planning * `12` - Earth, Atmospheric, and Planetary Sciences * `14` - Economics * `15` - Sloan School of Management * `16` - Aeronautics and Astronautics * `17` - Political Science * `18` - Mathematics * `20` - Biological Engineering * `21A` - Anthropology * `21G` - Global Studies and Languages * `21H` - History * `21L` - Literature * `21M` - Music and Theater Arts * `22` - Nuclear Science and Engineering * `24` - Linguistics and Philosophy * `CC` - Concourse * `CMS-W` - Comparative Media Studies/Writing * `EC` - Edgerton Center * `ES` - Experimental Study Group * `ESD` - Engineering Systems Division * `HST` - Health Sciences and Technology * `IDS` - Institute for Data, Systems, and Society * `MAS` - Media Arts and Sciences * `PE` - Athletics, Physical Education and Recreation * `RES` - Supplemental Resources * `STS` - Science, Technology, and Society * `WGS` - Women\'s and Gender Studies - * @param {boolean} [free] The course/program is offered for free - * @param {Array>} [learning_format] The learning format of course/program resources * `online` - Online * `hybrid` - Hybrid * `in_person` - In person - * @param {Array} [level] The academic level of the resources * `undergraduate` - Undergraduate * `graduate` - Graduate * `high_school` - High School * `noncredit` - Non-Credit * `advanced` - Advanced * `intermediate` - Intermediate * `introductory` - Introductory - * @param {number} [limit] Number of results to return per page. - * @param {Array} [offered_by] The organization that offers a learning resource * `mitx` - MITx * `ocw` - OCW * `bootcamps` - Bootcamps * `xpro` - xPRO * `csail` - CSAIL * `mitpe` - Professional Education * `see` - Sloan Executive Education * `scc` - Schwarzman College of Computing * `ctl` - Center for Transportation & Logistics - * @param {number} [offset] The initial index from which to return the results. - * @param {Array} [platform] The platform on which learning resources are offered * `edx` - edX * `ocw` - OCW * `oll` - Open Learning Library * `mitxonline` - MITx Online * `bootcamps` - Bootcamps * `xpro` - xPRO * `csail` - CSAIL * `mitpe` - Professional Education * `see` - Sloan Executive Education * `scc` - Schwarzman College of Computing * `ctl` - Center for Transportation & Logistics * `whu` - WHU * `susskind` - Susskind * `globalalumni` - Global Alumni * `simplilearn` - Simplilearn * `emeritus` - Emeritus * `podcast` - Podcast * `youtube` - YouTube - * @param {boolean} [professional] - * @param {Array} [readable_id] Multiple values may be separated by commas. - * @param {Array} [resource_type] The type of learning resource * `course` - Course * `program` - Program * `learning_path` - Learning Path * `podcast` - Podcast * `podcast_episode` - Podcast Episode * `video` - Video * `video_playlist` - Video Playlist - * @param {VideosNewListSortbyEnum} [sortby] Sort By * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `created_on` - Creation Date ascending * `-created_on` - CreationDate descending * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending - * @param {Array} [topic] Multiple values may be separated by commas. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async videosNewList( - course_feature?: Array, - department?: Array, - free?: boolean, - learning_format?: Array>, - level?: Array, - limit?: number, - offered_by?: Array, - offset?: number, - platform?: Array, - professional?: boolean, - readable_id?: Array, - resource_type?: Array, - sortby?: VideosNewListSortbyEnum, - topic?: Array, - options?: RawAxiosRequestConfig, - ): Promise< - ( - axios?: AxiosInstance, - basePath?: string, - ) => AxiosPromise - > { - const localVarAxiosArgs = await localVarAxiosParamCreator.videosNewList( - course_feature, - department, - free, - learning_format, - level, - limit, - offered_by, - offset, - platform, - professional, - readable_id, - resource_type, - sortby, - topic, - options, - ) - const index = configuration?.serverIndex ?? 0 - const operationBasePath = - operationServerMap["VideosApi.videosNewList"]?.[index]?.url - return (axios, basePath) => - createRequestFunction( - localVarAxiosArgs, - globalAxios, - BASE_PATH, - configuration, - )(axios, operationBasePath || basePath) - }, - /** - * Retrieve a single video - * @summary Retrieve - * @param {number} id A unique integer value identifying this learning resource. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async videosRetrieve( - id: number, - options?: RawAxiosRequestConfig, - ): Promise< - (axios?: AxiosInstance, basePath?: string) => AxiosPromise - > { - const localVarAxiosArgs = await localVarAxiosParamCreator.videosRetrieve( - id, - options, - ) - const index = configuration?.serverIndex ?? 0 - const operationBasePath = - operationServerMap["VideosApi.videosRetrieve"]?.[index]?.url - return (axios, basePath) => - createRequestFunction( - localVarAxiosArgs, - globalAxios, - BASE_PATH, - configuration, - )(axios, operationBasePath || basePath) - }, - /** - * Get a paginated list of upcoming Videos. - * @summary List Upcoming - * @param {Array} [course_feature] Multiple values may be separated by commas. - * @param {Array} [department] The department that offers learning resources * `1` - Civil and Environmental Engineering * `2` - Mechanical Engineering * `3` - Materials Science and Engineering * `4` - Architecture * `5` - Chemistry * `6` - Electrical Engineering and Computer Science * `7` - Biology * `8` - Physics * `9` - Brain and Cognitive Sciences * `10` - Chemical Engineering * `11` - Urban Studies and Planning * `12` - Earth, Atmospheric, and Planetary Sciences * `14` - Economics * `15` - Sloan School of Management * `16` - Aeronautics and Astronautics * `17` - Political Science * `18` - Mathematics * `20` - Biological Engineering * `21A` - Anthropology * `21G` - Global Studies and Languages * `21H` - History * `21L` - Literature * `21M` - Music and Theater Arts * `22` - Nuclear Science and Engineering * `24` - Linguistics and Philosophy * `CC` - Concourse * `CMS-W` - Comparative Media Studies/Writing * `EC` - Edgerton Center * `ES` - Experimental Study Group * `ESD` - Engineering Systems Division * `HST` - Health Sciences and Technology * `IDS` - Institute for Data, Systems, and Society * `MAS` - Media Arts and Sciences * `PE` - Athletics, Physical Education and Recreation * `RES` - Supplemental Resources * `STS` - Science, Technology, and Society * `WGS` - Women\'s and Gender Studies - * @param {boolean} [free] The course/program is offered for free - * @param {Array>} [learning_format] The learning format of course/program resources * `online` - Online * `hybrid` - Hybrid * `in_person` - In person - * @param {Array} [level] The academic level of the resources * `undergraduate` - Undergraduate * `graduate` - Graduate * `high_school` - High School * `noncredit` - Non-Credit * `advanced` - Advanced * `intermediate` - Intermediate * `introductory` - Introductory - * @param {number} [limit] Number of results to return per page. - * @param {Array} [offered_by] The organization that offers a learning resource * `mitx` - MITx * `ocw` - OCW * `bootcamps` - Bootcamps * `xpro` - xPRO * `csail` - CSAIL * `mitpe` - Professional Education * `see` - Sloan Executive Education * `scc` - Schwarzman College of Computing * `ctl` - Center for Transportation & Logistics - * @param {number} [offset] The initial index from which to return the results. - * @param {Array} [platform] The platform on which learning resources are offered * `edx` - edX * `ocw` - OCW * `oll` - Open Learning Library * `mitxonline` - MITx Online * `bootcamps` - Bootcamps * `xpro` - xPRO * `csail` - CSAIL * `mitpe` - Professional Education * `see` - Sloan Executive Education * `scc` - Schwarzman College of Computing * `ctl` - Center for Transportation & Logistics * `whu` - WHU * `susskind` - Susskind * `globalalumni` - Global Alumni * `simplilearn` - Simplilearn * `emeritus` - Emeritus * `podcast` - Podcast * `youtube` - YouTube - * @param {boolean} [professional] - * @param {Array} [readable_id] Multiple values may be separated by commas. - * @param {Array} [resource_type] The type of learning resource * `course` - Course * `program` - Program * `learning_path` - Learning Path * `podcast` - Podcast * `podcast_episode` - Podcast Episode * `video` - Video * `video_playlist` - Video Playlist - * @param {VideosUpcomingListSortbyEnum} [sortby] Sort By * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `created_on` - Creation Date ascending * `-created_on` - CreationDate descending * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending - * @param {Array} [topic] Multiple values may be separated by commas. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async videosUpcomingList( - course_feature?: Array, - department?: Array, - free?: boolean, - learning_format?: Array>, - level?: Array, - limit?: number, - offered_by?: Array, - offset?: number, - platform?: Array, - professional?: boolean, - readable_id?: Array, - resource_type?: Array, - sortby?: VideosUpcomingListSortbyEnum, - topic?: Array, - options?: RawAxiosRequestConfig, - ): Promise< - ( - axios?: AxiosInstance, - basePath?: string, - ) => AxiosPromise - > { - const localVarAxiosArgs = - await localVarAxiosParamCreator.videosUpcomingList( - course_feature, - department, - free, - learning_format, - level, - limit, - offered_by, - offset, - platform, - professional, - readable_id, - resource_type, - sortby, - topic, - options, - ) + /** + * Retrieve a single video + * @summary Retrieve + * @param {number} id A unique integer value identifying this learning resource. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async videosRetrieve( + id: number, + options?: RawAxiosRequestConfig, + ): Promise< + (axios?: AxiosInstance, basePath?: string) => AxiosPromise + > { + const localVarAxiosArgs = await localVarAxiosParamCreator.videosRetrieve( + id, + options, + ) const index = configuration?.serverIndex ?? 0 const operationBasePath = - operationServerMap["VideosApi.videosUpcomingList"]?.[index]?.url + operationServerMap["VideosApi.videosRetrieve"]?.[index]?.url return (axios, basePath) => createRequestFunction( localVarAxiosArgs, @@ -23840,37 +19245,6 @@ export const VideosApiFactory = function ( ) .then((request) => request(axios, basePath)) }, - /** - * Get a paginated list of newly released Videos. - * @summary List New - * @param {VideosApiVideosNewListRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - videosNewList( - requestParameters: VideosApiVideosNewListRequest = {}, - options?: RawAxiosRequestConfig, - ): AxiosPromise { - return localVarFp - .videosNewList( - requestParameters.course_feature, - requestParameters.department, - requestParameters.free, - requestParameters.learning_format, - requestParameters.level, - requestParameters.limit, - requestParameters.offered_by, - requestParameters.offset, - requestParameters.platform, - requestParameters.professional, - requestParameters.readable_id, - requestParameters.resource_type, - requestParameters.sortby, - requestParameters.topic, - options, - ) - .then((request) => request(axios, basePath)) - }, /** * Retrieve a single video * @summary Retrieve @@ -23886,37 +19260,6 @@ export const VideosApiFactory = function ( .videosRetrieve(requestParameters.id, options) .then((request) => request(axios, basePath)) }, - /** - * Get a paginated list of upcoming Videos. - * @summary List Upcoming - * @param {VideosApiVideosUpcomingListRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - videosUpcomingList( - requestParameters: VideosApiVideosUpcomingListRequest = {}, - options?: RawAxiosRequestConfig, - ): AxiosPromise { - return localVarFp - .videosUpcomingList( - requestParameters.course_feature, - requestParameters.department, - requestParameters.free, - requestParameters.learning_format, - requestParameters.level, - requestParameters.limit, - requestParameters.offered_by, - requestParameters.offset, - requestParameters.platform, - requestParameters.professional, - requestParameters.readable_id, - requestParameters.resource_type, - requestParameters.sortby, - requestParameters.topic, - options, - ) - .then((request) => request(axios, basePath)) - }, } } @@ -24011,8 +19354,8 @@ export interface VideosApiVideosListRequest { readonly resource_type?: Array /** - * Sort By * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `created_on` - Creation Date ascending * `-created_on` - CreationDate descending * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending - * @type {'-created_on' | '-id' | '-last_modified' | '-mitcoursenumber' | '-readable_id' | '-start_date' | '-views' | 'created_on' | 'id' | 'last_modified' | 'mitcoursenumber' | 'readable_id' | 'start_date' | 'views'} + * Sort By * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `new` - Newest resources first * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending * `upcoming` - Next start date ascending + * @type {'-id' | '-last_modified' | '-mitcoursenumber' | '-readable_id' | '-start_date' | '-views' | 'id' | 'last_modified' | 'mitcoursenumber' | 'new' | 'readable_id' | 'start_date' | 'upcoming' | 'views'} * @memberof VideosApiVideosList */ readonly sortby?: VideosListSortbyEnum @@ -24025,111 +19368,6 @@ export interface VideosApiVideosListRequest { readonly topic?: Array } -/** - * Request parameters for videosNewList operation in VideosApi. - * @export - * @interface VideosApiVideosNewListRequest - */ -export interface VideosApiVideosNewListRequest { - /** - * Multiple values may be separated by commas. - * @type {Array} - * @memberof VideosApiVideosNewList - */ - readonly course_feature?: Array - - /** - * The department that offers learning resources * `1` - Civil and Environmental Engineering * `2` - Mechanical Engineering * `3` - Materials Science and Engineering * `4` - Architecture * `5` - Chemistry * `6` - Electrical Engineering and Computer Science * `7` - Biology * `8` - Physics * `9` - Brain and Cognitive Sciences * `10` - Chemical Engineering * `11` - Urban Studies and Planning * `12` - Earth, Atmospheric, and Planetary Sciences * `14` - Economics * `15` - Sloan School of Management * `16` - Aeronautics and Astronautics * `17` - Political Science * `18` - Mathematics * `20` - Biological Engineering * `21A` - Anthropology * `21G` - Global Studies and Languages * `21H` - History * `21L` - Literature * `21M` - Music and Theater Arts * `22` - Nuclear Science and Engineering * `24` - Linguistics and Philosophy * `CC` - Concourse * `CMS-W` - Comparative Media Studies/Writing * `EC` - Edgerton Center * `ES` - Experimental Study Group * `ESD` - Engineering Systems Division * `HST` - Health Sciences and Technology * `IDS` - Institute for Data, Systems, and Society * `MAS` - Media Arts and Sciences * `PE` - Athletics, Physical Education and Recreation * `RES` - Supplemental Resources * `STS` - Science, Technology, and Society * `WGS` - Women\'s and Gender Studies - * @type {Array<'1' | '10' | '11' | '12' | '14' | '15' | '16' | '17' | '18' | '2' | '20' | '21A' | '21G' | '21H' | '21L' | '21M' | '22' | '24' | '3' | '4' | '5' | '6' | '7' | '8' | '9' | 'CC' | 'CMS-W' | 'EC' | 'ES' | 'ESD' | 'HST' | 'IDS' | 'MAS' | 'PE' | 'RES' | 'STS' | 'WGS'>} - * @memberof VideosApiVideosNewList - */ - readonly department?: Array - - /** - * The course/program is offered for free - * @type {boolean} - * @memberof VideosApiVideosNewList - */ - readonly free?: boolean - - /** - * The learning format of course/program resources * `online` - Online * `hybrid` - Hybrid * `in_person` - In person - * @type {Array>} - * @memberof VideosApiVideosNewList - */ - readonly learning_format?: Array> - - /** - * The academic level of the resources * `undergraduate` - Undergraduate * `graduate` - Graduate * `high_school` - High School * `noncredit` - Non-Credit * `advanced` - Advanced * `intermediate` - Intermediate * `introductory` - Introductory - * @type {Array<'advanced' | 'graduate' | 'high_school' | 'intermediate' | 'introductory' | 'noncredit' | 'undergraduate'>} - * @memberof VideosApiVideosNewList - */ - readonly level?: Array - - /** - * Number of results to return per page. - * @type {number} - * @memberof VideosApiVideosNewList - */ - readonly limit?: number - - /** - * The organization that offers a learning resource * `mitx` - MITx * `ocw` - OCW * `bootcamps` - Bootcamps * `xpro` - xPRO * `csail` - CSAIL * `mitpe` - Professional Education * `see` - Sloan Executive Education * `scc` - Schwarzman College of Computing * `ctl` - Center for Transportation & Logistics - * @type {Array<'bootcamps' | 'csail' | 'ctl' | 'mitpe' | 'mitx' | 'ocw' | 'scc' | 'see' | 'xpro'>} - * @memberof VideosApiVideosNewList - */ - readonly offered_by?: Array - - /** - * The initial index from which to return the results. - * @type {number} - * @memberof VideosApiVideosNewList - */ - readonly offset?: number - - /** - * The platform on which learning resources are offered * `edx` - edX * `ocw` - OCW * `oll` - Open Learning Library * `mitxonline` - MITx Online * `bootcamps` - Bootcamps * `xpro` - xPRO * `csail` - CSAIL * `mitpe` - Professional Education * `see` - Sloan Executive Education * `scc` - Schwarzman College of Computing * `ctl` - Center for Transportation & Logistics * `whu` - WHU * `susskind` - Susskind * `globalalumni` - Global Alumni * `simplilearn` - Simplilearn * `emeritus` - Emeritus * `podcast` - Podcast * `youtube` - YouTube - * @type {Array<'bootcamps' | 'csail' | 'ctl' | 'edx' | 'emeritus' | 'globalalumni' | 'mitpe' | 'mitxonline' | 'ocw' | 'oll' | 'podcast' | 'scc' | 'see' | 'simplilearn' | 'susskind' | 'whu' | 'xpro' | 'youtube'>} - * @memberof VideosApiVideosNewList - */ - readonly platform?: Array - - /** - * - * @type {boolean} - * @memberof VideosApiVideosNewList - */ - readonly professional?: boolean - - /** - * Multiple values may be separated by commas. - * @type {Array} - * @memberof VideosApiVideosNewList - */ - readonly readable_id?: Array - - /** - * The type of learning resource * `course` - Course * `program` - Program * `learning_path` - Learning Path * `podcast` - Podcast * `podcast_episode` - Podcast Episode * `video` - Video * `video_playlist` - Video Playlist - * @type {Array<'course' | 'learning_path' | 'podcast' | 'podcast_episode' | 'program' | 'video' | 'video_playlist'>} - * @memberof VideosApiVideosNewList - */ - readonly resource_type?: Array - - /** - * Sort By * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `created_on` - Creation Date ascending * `-created_on` - CreationDate descending * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending - * @type {'-created_on' | '-id' | '-last_modified' | '-mitcoursenumber' | '-readable_id' | '-start_date' | '-views' | 'created_on' | 'id' | 'last_modified' | 'mitcoursenumber' | 'readable_id' | 'start_date' | 'views'} - * @memberof VideosApiVideosNewList - */ - readonly sortby?: VideosNewListSortbyEnum - - /** - * Multiple values may be separated by commas. - * @type {Array} - * @memberof VideosApiVideosNewList - */ - readonly topic?: Array -} - /** * Request parameters for videosRetrieve operation in VideosApi. * @export @@ -24144,111 +19382,6 @@ export interface VideosApiVideosRetrieveRequest { readonly id: number } -/** - * Request parameters for videosUpcomingList operation in VideosApi. - * @export - * @interface VideosApiVideosUpcomingListRequest - */ -export interface VideosApiVideosUpcomingListRequest { - /** - * Multiple values may be separated by commas. - * @type {Array} - * @memberof VideosApiVideosUpcomingList - */ - readonly course_feature?: Array - - /** - * The department that offers learning resources * `1` - Civil and Environmental Engineering * `2` - Mechanical Engineering * `3` - Materials Science and Engineering * `4` - Architecture * `5` - Chemistry * `6` - Electrical Engineering and Computer Science * `7` - Biology * `8` - Physics * `9` - Brain and Cognitive Sciences * `10` - Chemical Engineering * `11` - Urban Studies and Planning * `12` - Earth, Atmospheric, and Planetary Sciences * `14` - Economics * `15` - Sloan School of Management * `16` - Aeronautics and Astronautics * `17` - Political Science * `18` - Mathematics * `20` - Biological Engineering * `21A` - Anthropology * `21G` - Global Studies and Languages * `21H` - History * `21L` - Literature * `21M` - Music and Theater Arts * `22` - Nuclear Science and Engineering * `24` - Linguistics and Philosophy * `CC` - Concourse * `CMS-W` - Comparative Media Studies/Writing * `EC` - Edgerton Center * `ES` - Experimental Study Group * `ESD` - Engineering Systems Division * `HST` - Health Sciences and Technology * `IDS` - Institute for Data, Systems, and Society * `MAS` - Media Arts and Sciences * `PE` - Athletics, Physical Education and Recreation * `RES` - Supplemental Resources * `STS` - Science, Technology, and Society * `WGS` - Women\'s and Gender Studies - * @type {Array<'1' | '10' | '11' | '12' | '14' | '15' | '16' | '17' | '18' | '2' | '20' | '21A' | '21G' | '21H' | '21L' | '21M' | '22' | '24' | '3' | '4' | '5' | '6' | '7' | '8' | '9' | 'CC' | 'CMS-W' | 'EC' | 'ES' | 'ESD' | 'HST' | 'IDS' | 'MAS' | 'PE' | 'RES' | 'STS' | 'WGS'>} - * @memberof VideosApiVideosUpcomingList - */ - readonly department?: Array - - /** - * The course/program is offered for free - * @type {boolean} - * @memberof VideosApiVideosUpcomingList - */ - readonly free?: boolean - - /** - * The learning format of course/program resources * `online` - Online * `hybrid` - Hybrid * `in_person` - In person - * @type {Array>} - * @memberof VideosApiVideosUpcomingList - */ - readonly learning_format?: Array> - - /** - * The academic level of the resources * `undergraduate` - Undergraduate * `graduate` - Graduate * `high_school` - High School * `noncredit` - Non-Credit * `advanced` - Advanced * `intermediate` - Intermediate * `introductory` - Introductory - * @type {Array<'advanced' | 'graduate' | 'high_school' | 'intermediate' | 'introductory' | 'noncredit' | 'undergraduate'>} - * @memberof VideosApiVideosUpcomingList - */ - readonly level?: Array - - /** - * Number of results to return per page. - * @type {number} - * @memberof VideosApiVideosUpcomingList - */ - readonly limit?: number - - /** - * The organization that offers a learning resource * `mitx` - MITx * `ocw` - OCW * `bootcamps` - Bootcamps * `xpro` - xPRO * `csail` - CSAIL * `mitpe` - Professional Education * `see` - Sloan Executive Education * `scc` - Schwarzman College of Computing * `ctl` - Center for Transportation & Logistics - * @type {Array<'bootcamps' | 'csail' | 'ctl' | 'mitpe' | 'mitx' | 'ocw' | 'scc' | 'see' | 'xpro'>} - * @memberof VideosApiVideosUpcomingList - */ - readonly offered_by?: Array - - /** - * The initial index from which to return the results. - * @type {number} - * @memberof VideosApiVideosUpcomingList - */ - readonly offset?: number - - /** - * The platform on which learning resources are offered * `edx` - edX * `ocw` - OCW * `oll` - Open Learning Library * `mitxonline` - MITx Online * `bootcamps` - Bootcamps * `xpro` - xPRO * `csail` - CSAIL * `mitpe` - Professional Education * `see` - Sloan Executive Education * `scc` - Schwarzman College of Computing * `ctl` - Center for Transportation & Logistics * `whu` - WHU * `susskind` - Susskind * `globalalumni` - Global Alumni * `simplilearn` - Simplilearn * `emeritus` - Emeritus * `podcast` - Podcast * `youtube` - YouTube - * @type {Array<'bootcamps' | 'csail' | 'ctl' | 'edx' | 'emeritus' | 'globalalumni' | 'mitpe' | 'mitxonline' | 'ocw' | 'oll' | 'podcast' | 'scc' | 'see' | 'simplilearn' | 'susskind' | 'whu' | 'xpro' | 'youtube'>} - * @memberof VideosApiVideosUpcomingList - */ - readonly platform?: Array - - /** - * - * @type {boolean} - * @memberof VideosApiVideosUpcomingList - */ - readonly professional?: boolean - - /** - * Multiple values may be separated by commas. - * @type {Array} - * @memberof VideosApiVideosUpcomingList - */ - readonly readable_id?: Array - - /** - * The type of learning resource * `course` - Course * `program` - Program * `learning_path` - Learning Path * `podcast` - Podcast * `podcast_episode` - Podcast Episode * `video` - Video * `video_playlist` - Video Playlist - * @type {Array<'course' | 'learning_path' | 'podcast' | 'podcast_episode' | 'program' | 'video' | 'video_playlist'>} - * @memberof VideosApiVideosUpcomingList - */ - readonly resource_type?: Array - - /** - * Sort By * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `created_on` - Creation Date ascending * `-created_on` - CreationDate descending * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending - * @type {'-created_on' | '-id' | '-last_modified' | '-mitcoursenumber' | '-readable_id' | '-start_date' | '-views' | 'created_on' | 'id' | 'last_modified' | 'mitcoursenumber' | 'readable_id' | 'start_date' | 'views'} - * @memberof VideosApiVideosUpcomingList - */ - readonly sortby?: VideosUpcomingListSortbyEnum - - /** - * Multiple values may be separated by commas. - * @type {Array} - * @memberof VideosApiVideosUpcomingList - */ - readonly topic?: Array -} - /** * VideosApi - object-oriented interface * @export @@ -24269,40 +19402,7 @@ export class VideosApi extends BaseAPI { options?: RawAxiosRequestConfig, ) { return VideosApiFp(this.configuration) - .videosList( - requestParameters.course_feature, - requestParameters.department, - requestParameters.free, - requestParameters.learning_format, - requestParameters.level, - requestParameters.limit, - requestParameters.offered_by, - requestParameters.offset, - requestParameters.platform, - requestParameters.professional, - requestParameters.readable_id, - requestParameters.resource_type, - requestParameters.sortby, - requestParameters.topic, - options, - ) - .then((request) => request(this.axios, this.basePath)) - } - - /** - * Get a paginated list of newly released Videos. - * @summary List New - * @param {VideosApiVideosNewListRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof VideosApi - */ - public videosNewList( - requestParameters: VideosApiVideosNewListRequest = {}, - options?: RawAxiosRequestConfig, - ) { - return VideosApiFp(this.configuration) - .videosNewList( + .videosList( requestParameters.course_feature, requestParameters.department, requestParameters.free, @@ -24338,39 +19438,6 @@ export class VideosApi extends BaseAPI { .videosRetrieve(requestParameters.id, options) .then((request) => request(this.axios, this.basePath)) } - - /** - * Get a paginated list of upcoming Videos. - * @summary List Upcoming - * @param {VideosApiVideosUpcomingListRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof VideosApi - */ - public videosUpcomingList( - requestParameters: VideosApiVideosUpcomingListRequest = {}, - options?: RawAxiosRequestConfig, - ) { - return VideosApiFp(this.configuration) - .videosUpcomingList( - requestParameters.course_feature, - requestParameters.department, - requestParameters.free, - requestParameters.learning_format, - requestParameters.level, - requestParameters.limit, - requestParameters.offered_by, - requestParameters.offset, - requestParameters.platform, - requestParameters.professional, - requestParameters.readable_id, - requestParameters.resource_type, - requestParameters.sortby, - requestParameters.topic, - options, - ) - .then((request) => request(this.axios, this.basePath)) - } } /** @@ -24490,288 +19557,20 @@ export type VideosListResourceTypeEnum = * @export */ export const VideosListSortbyEnum = { - CreatedOn: "-created_on", Id: "-id", LastModified: "-last_modified", Mitcoursenumber: "-mitcoursenumber", ReadableId: "-readable_id", StartDate: "-start_date", Views: "-views", - CreatedOn2: "created_on", Id2: "id", LastModified2: "last_modified", Mitcoursenumber2: "mitcoursenumber", + New: "new", ReadableId2: "readable_id", StartDate2: "start_date", + Upcoming: "upcoming", Views2: "views", } as const export type VideosListSortbyEnum = (typeof VideosListSortbyEnum)[keyof typeof VideosListSortbyEnum] -/** - * @export - */ -export const VideosNewListDepartmentEnum = { - _1: "1", - _10: "10", - _11: "11", - _12: "12", - _14: "14", - _15: "15", - _16: "16", - _17: "17", - _18: "18", - _2: "2", - _20: "20", - _21A: "21A", - _21G: "21G", - _21H: "21H", - _21L: "21L", - _21M: "21M", - _22: "22", - _24: "24", - _3: "3", - _4: "4", - _5: "5", - _6: "6", - _7: "7", - _8: "8", - _9: "9", - Cc: "CC", - CmsW: "CMS-W", - Ec: "EC", - Es: "ES", - Esd: "ESD", - Hst: "HST", - Ids: "IDS", - Mas: "MAS", - Pe: "PE", - Res: "RES", - Sts: "STS", - Wgs: "WGS", -} as const -export type VideosNewListDepartmentEnum = - (typeof VideosNewListDepartmentEnum)[keyof typeof VideosNewListDepartmentEnum] -/** - * @export - */ -export const VideosNewListLevelEnum = { - Advanced: "advanced", - Graduate: "graduate", - HighSchool: "high_school", - Intermediate: "intermediate", - Introductory: "introductory", - Noncredit: "noncredit", - Undergraduate: "undergraduate", -} as const -export type VideosNewListLevelEnum = - (typeof VideosNewListLevelEnum)[keyof typeof VideosNewListLevelEnum] -/** - * @export - */ -export const VideosNewListOfferedByEnum = { - Bootcamps: "bootcamps", - Csail: "csail", - Ctl: "ctl", - Mitpe: "mitpe", - Mitx: "mitx", - Ocw: "ocw", - Scc: "scc", - See: "see", - Xpro: "xpro", -} as const -export type VideosNewListOfferedByEnum = - (typeof VideosNewListOfferedByEnum)[keyof typeof VideosNewListOfferedByEnum] -/** - * @export - */ -export const VideosNewListPlatformEnum = { - Bootcamps: "bootcamps", - Csail: "csail", - Ctl: "ctl", - Edx: "edx", - Emeritus: "emeritus", - Globalalumni: "globalalumni", - Mitpe: "mitpe", - Mitxonline: "mitxonline", - Ocw: "ocw", - Oll: "oll", - Podcast: "podcast", - Scc: "scc", - See: "see", - Simplilearn: "simplilearn", - Susskind: "susskind", - Whu: "whu", - Xpro: "xpro", - Youtube: "youtube", -} as const -export type VideosNewListPlatformEnum = - (typeof VideosNewListPlatformEnum)[keyof typeof VideosNewListPlatformEnum] -/** - * @export - */ -export const VideosNewListResourceTypeEnum = { - Course: "course", - LearningPath: "learning_path", - Podcast: "podcast", - PodcastEpisode: "podcast_episode", - Program: "program", - Video: "video", - VideoPlaylist: "video_playlist", -} as const -export type VideosNewListResourceTypeEnum = - (typeof VideosNewListResourceTypeEnum)[keyof typeof VideosNewListResourceTypeEnum] -/** - * @export - */ -export const VideosNewListSortbyEnum = { - CreatedOn: "-created_on", - Id: "-id", - LastModified: "-last_modified", - Mitcoursenumber: "-mitcoursenumber", - ReadableId: "-readable_id", - StartDate: "-start_date", - Views: "-views", - CreatedOn2: "created_on", - Id2: "id", - LastModified2: "last_modified", - Mitcoursenumber2: "mitcoursenumber", - ReadableId2: "readable_id", - StartDate2: "start_date", - Views2: "views", -} as const -export type VideosNewListSortbyEnum = - (typeof VideosNewListSortbyEnum)[keyof typeof VideosNewListSortbyEnum] -/** - * @export - */ -export const VideosUpcomingListDepartmentEnum = { - _1: "1", - _10: "10", - _11: "11", - _12: "12", - _14: "14", - _15: "15", - _16: "16", - _17: "17", - _18: "18", - _2: "2", - _20: "20", - _21A: "21A", - _21G: "21G", - _21H: "21H", - _21L: "21L", - _21M: "21M", - _22: "22", - _24: "24", - _3: "3", - _4: "4", - _5: "5", - _6: "6", - _7: "7", - _8: "8", - _9: "9", - Cc: "CC", - CmsW: "CMS-W", - Ec: "EC", - Es: "ES", - Esd: "ESD", - Hst: "HST", - Ids: "IDS", - Mas: "MAS", - Pe: "PE", - Res: "RES", - Sts: "STS", - Wgs: "WGS", -} as const -export type VideosUpcomingListDepartmentEnum = - (typeof VideosUpcomingListDepartmentEnum)[keyof typeof VideosUpcomingListDepartmentEnum] -/** - * @export - */ -export const VideosUpcomingListLevelEnum = { - Advanced: "advanced", - Graduate: "graduate", - HighSchool: "high_school", - Intermediate: "intermediate", - Introductory: "introductory", - Noncredit: "noncredit", - Undergraduate: "undergraduate", -} as const -export type VideosUpcomingListLevelEnum = - (typeof VideosUpcomingListLevelEnum)[keyof typeof VideosUpcomingListLevelEnum] -/** - * @export - */ -export const VideosUpcomingListOfferedByEnum = { - Bootcamps: "bootcamps", - Csail: "csail", - Ctl: "ctl", - Mitpe: "mitpe", - Mitx: "mitx", - Ocw: "ocw", - Scc: "scc", - See: "see", - Xpro: "xpro", -} as const -export type VideosUpcomingListOfferedByEnum = - (typeof VideosUpcomingListOfferedByEnum)[keyof typeof VideosUpcomingListOfferedByEnum] -/** - * @export - */ -export const VideosUpcomingListPlatformEnum = { - Bootcamps: "bootcamps", - Csail: "csail", - Ctl: "ctl", - Edx: "edx", - Emeritus: "emeritus", - Globalalumni: "globalalumni", - Mitpe: "mitpe", - Mitxonline: "mitxonline", - Ocw: "ocw", - Oll: "oll", - Podcast: "podcast", - Scc: "scc", - See: "see", - Simplilearn: "simplilearn", - Susskind: "susskind", - Whu: "whu", - Xpro: "xpro", - Youtube: "youtube", -} as const -export type VideosUpcomingListPlatformEnum = - (typeof VideosUpcomingListPlatformEnum)[keyof typeof VideosUpcomingListPlatformEnum] -/** - * @export - */ -export const VideosUpcomingListResourceTypeEnum = { - Course: "course", - LearningPath: "learning_path", - Podcast: "podcast", - PodcastEpisode: "podcast_episode", - Program: "program", - Video: "video", - VideoPlaylist: "video_playlist", -} as const -export type VideosUpcomingListResourceTypeEnum = - (typeof VideosUpcomingListResourceTypeEnum)[keyof typeof VideosUpcomingListResourceTypeEnum] -/** - * @export - */ -export const VideosUpcomingListSortbyEnum = { - CreatedOn: "-created_on", - Id: "-id", - LastModified: "-last_modified", - Mitcoursenumber: "-mitcoursenumber", - ReadableId: "-readable_id", - StartDate: "-start_date", - Views: "-views", - CreatedOn2: "created_on", - Id2: "id", - LastModified2: "last_modified", - Mitcoursenumber2: "mitcoursenumber", - ReadableId2: "readable_id", - StartDate2: "start_date", - Views2: "views", -} as const -export type VideosUpcomingListSortbyEnum = - (typeof VideosUpcomingListSortbyEnum)[keyof typeof VideosUpcomingListSortbyEnum] diff --git a/frontends/api/src/hooks/learningResources/index.ts b/frontends/api/src/hooks/learningResources/index.ts index 41a9a75dd9..c736aaff90 100644 --- a/frontends/api/src/hooks/learningResources/index.ts +++ b/frontends/api/src/hooks/learningResources/index.ts @@ -44,16 +44,6 @@ const useLearningResourcesList = ( }) } -const useLearningResourcesUpcoming = ( - params: LRListRequest = {}, - opts: Pick = {}, -) => { - return useQuery({ - ...learningResources.upcoming(params), - ...opts, - }) -} - const useLearningResourcesDetail = (id: number) => { return useQuery(learningResources.detail(id)) } @@ -426,7 +416,6 @@ const usePlatformsList = ( export { useLearningResourcesList, - useLearningResourcesUpcoming, useLearningResourcesDetail, useLearningResourceTopics, useLearningPathsList, diff --git a/frontends/api/src/hooks/learningResources/keyFactory.ts b/frontends/api/src/hooks/learningResources/keyFactory.ts index 1787dd55bf..1445c2371a 100644 --- a/frontends/api/src/hooks/learningResources/keyFactory.ts +++ b/frontends/api/src/hooks/learningResources/keyFactory.ts @@ -11,7 +11,6 @@ import { import axiosInstance from "../../axios" import type { LearningResourcesApiLearningResourcesListRequest as LRListRequest, - LearningResourcesApiLearningResourcesUpcomingListRequest as LRUpcomingListRequest, TopicsApiTopicsListRequest as TopicsListRequest, LearningpathsApiLearningpathsItemsListRequest as LPResourcesListRequest, LearningpathsApiLearningpathsListRequest as LPListRequest, @@ -43,13 +42,6 @@ const learningResources = createQueryKeys("learningResources", { .learningResourcesList(params) .then((res) => res.data), }), - upcoming: (params: LRUpcomingListRequest) => ({ - queryKey: [params], - queryFn: () => - learningResourcesApi - .learningResourcesUpcomingList(params) - .then((res) => res.data), - }), topics: (params: TopicsListRequest) => ({ queryKey: [params], queryFn: () => topicsApi.topicsList(params).then((res) => res.data), @@ -185,7 +177,6 @@ const invalidateResourceQueries = ( */ const lists = [ learningResources.list._def, - learningResources.upcoming._def, learningResources.learningpaths._ctx.list._def, learningResources.userlists._ctx.list._def, ] diff --git a/frontends/api/src/test-utils/urls.ts b/frontends/api/src/test-utils/urls.ts index 19a31da996..fa8685f752 100644 --- a/frontends/api/src/test-utils/urls.ts +++ b/frontends/api/src/test-utils/urls.ts @@ -34,8 +34,6 @@ type Params = API[K] extends Callable const learningResources = { list: (params?: Params) => `/api/v1/learning_resources/${query(params)}`, - upcoming: (params?: Params) => - `/api/v1/learning_resources/upcoming/${query(params)}`, details: (params: Params) => `/api/v1/learning_resources/${params.id}/`, } diff --git a/frontends/mit-open/src/page-components/TabbedCarousel/TabbedCarousel.test.tsx b/frontends/mit-open/src/page-components/TabbedCarousel/TabbedCarousel.test.tsx index a5bb917204..67968955e3 100644 --- a/frontends/mit-open/src/page-components/TabbedCarousel/TabbedCarousel.test.tsx +++ b/frontends/mit-open/src/page-components/TabbedCarousel/TabbedCarousel.test.tsx @@ -10,12 +10,7 @@ describe("TabbedCarousel", () => { const resources = { search: factories.learningResources.resources({ count: 10 }), list: factories.learningResources.resources({ count: 10 }), - upcoming: factories.learningResources.resources({ count: 10 }), } - setMockResponse.get( - expect.stringContaining(urls.learningResources.upcoming()), - resources.upcoming, - ) setMockResponse.get( expect.stringContaining(urls.search.resources()), resources.search, @@ -37,14 +32,6 @@ describe("TabbedCarousel", () => { params: { resource_type: ["video", "podcast"] }, }, }, - { - label: "Upcoming", - pageSize: 4, - data: { - type: "resources_upcoming", - params: { resource_type: ["video"] }, - }, - }, { label: "Search", pageSize: 4, @@ -54,19 +41,18 @@ describe("TabbedCarousel", () => { }, }, ] + setMockResponse.get(urls.userMe.get(), {}) - const { list, search, upcoming } = setupApis() + const { list, search } = setupApis() renderWithProviders() const tabs = screen.getAllByRole("tab") - expect(tabs).toHaveLength(3) + expect(tabs).toHaveLength(2) expect(tabs[0]).toHaveTextContent("Resources") - expect(tabs[1]).toHaveTextContent("Upcoming") - expect(tabs[2]).toHaveTextContent("Search") + expect(tabs[1]).toHaveTextContent("Search") await screen.findByText(list.results[0].title) + await user.click(tabs[0]) await user.click(tabs[1]) - await screen.findByText(upcoming.results[0].title) - await user.click(tabs[2]) await act(() => { return new Promise((resolve) => setTimeout(resolve, 1000)) }) diff --git a/frontends/mit-open/src/page-components/TabbedCarousel/TabbedCarousel.tsx b/frontends/mit-open/src/page-components/TabbedCarousel/TabbedCarousel.tsx index 7331c265e7..9969e16f5e 100644 --- a/frontends/mit-open/src/page-components/TabbedCarousel/TabbedCarousel.tsx +++ b/frontends/mit-open/src/page-components/TabbedCarousel/TabbedCarousel.tsx @@ -1,7 +1,6 @@ import React from "react" import { useLearningResourcesList, - useLearningResourcesUpcoming, useLearningResourcesSearch, } from "api/hooks/learningResources" import { @@ -12,12 +11,7 @@ import { Carousel, styled, } from "ol-components" -import type { - TabConfig, - ResourceDataSource, - SearchDataSource, - UpcomingDataSource, -} from "./types" +import type { TabConfig, ResourceDataSource, SearchDataSource } from "./types" import { LearningResource } from "api" import LearningResourceCard from "../LearningResourceCard/LearningResourceCard" @@ -40,14 +34,6 @@ const ResourcesData: React.FC> = ({ return children({ resources: data?.results ?? [], isLoading }) } -const UpcomingResourcesData: React.FC> = ({ - dataConfig, - children, -}) => { - const { data, isLoading } = useLearningResourcesUpcoming(dataConfig.params) - return children({ resources: data?.results ?? [], isLoading }) -} - const SearchData: React.FC> = ({ dataConfig, children, @@ -69,12 +55,6 @@ const DataPanel: React.FC = ({ dataConfig, children }) => { return {children} case "lr_search": return {children} - case "resources_upcoming": - return ( - - {children} - - ) default: // @ts-expect-error This will always be an error if the switch statement // is exhaustive since dataConfig will have type `never` diff --git a/frontends/mit-open/src/page-components/TabbedCarousel/types.ts b/frontends/mit-open/src/page-components/TabbedCarousel/types.ts index 1d69a9f253..d7105e5027 100644 --- a/frontends/mit-open/src/page-components/TabbedCarousel/types.ts +++ b/frontends/mit-open/src/page-components/TabbedCarousel/types.ts @@ -1,7 +1,6 @@ import type { LearningResourcesApiLearningResourcesListRequest as LRListRequest, LearningResourcesSearchApiLearningResourcesSearchRetrieveRequest as SearchRequest, - LearningResourcesApiLearningResourcesUpcomingListRequest as LRUpcomingListRequest, } from "api" interface ResourceDataSource { @@ -9,11 +8,6 @@ interface ResourceDataSource { params: LRListRequest } -interface UpcomingDataSource { - type: "resources_upcoming" - params: LRUpcomingListRequest -} - interface SearchDataSource { type: "lr_search" params: SearchRequest @@ -22,12 +16,7 @@ interface SearchDataSource { type TabConfig = { label: React.ReactNode pageSize: number - data: ResourceDataSource | SearchDataSource | UpcomingDataSource + data: ResourceDataSource | SearchDataSource } -export type { - TabConfig, - ResourceDataSource, - SearchDataSource, - UpcomingDataSource, -} +export type { TabConfig, ResourceDataSource, SearchDataSource } diff --git a/frontends/mit-open/src/pages/HomePage/HomePage.test.tsx b/frontends/mit-open/src/pages/HomePage/HomePage.test.tsx index f30f7b724a..3136e32f54 100644 --- a/frontends/mit-open/src/pages/HomePage/HomePage.test.tsx +++ b/frontends/mit-open/src/pages/HomePage/HomePage.test.tsx @@ -23,17 +23,10 @@ const assertLinksTo = ( } const setup = () => { - // upcoming resources carousel - const upcoming = factory.resources({ count: 4 }) - setMockResponse.get( - expect.stringContaining(urls.learningResources.upcoming()), - upcoming, - ) - // media carousel - const media = factory.resources({ count: 4 }) + const resources = factory.resources({ count: 4 }) setMockResponse.get( expect.stringContaining(urls.learningResources.list()), - media, + resources, ) return renderWithProviders() } diff --git a/frontends/mit-open/src/pages/HomePage/HomePage.tsx b/frontends/mit-open/src/pages/HomePage/HomePage.tsx index e9eea02a16..680f489b74 100644 --- a/frontends/mit-open/src/pages/HomePage/HomePage.tsx +++ b/frontends/mit-open/src/pages/HomePage/HomePage.tsx @@ -10,16 +10,21 @@ const UPCOMING_COURSES_CAROUSEL: TabbedCarouselProps["config"] = [ label: "All", pageSize: 4, data: { - type: "resources_upcoming", - params: { resource_type: ["course"], limit: 12 }, + type: "resources", + params: { resource_type: ["course"], limit: 12, sortby: "upcoming" }, }, }, { label: "Professional", pageSize: 4, data: { - type: "resources_upcoming", - params: { professional: true, resource_type: ["course"], limit: 12 }, + type: "resources", + params: { + professional: true, + resource_type: ["course"], + limit: 12, + sortby: "upcoming", + }, }, }, ] diff --git a/frontends/mit-open/src/pages/SearchPage/SearchPage.tsx b/frontends/mit-open/src/pages/SearchPage/SearchPage.tsx index 8fd012b047..976a10a6c4 100644 --- a/frontends/mit-open/src/pages/SearchPage/SearchPage.tsx +++ b/frontends/mit-open/src/pages/SearchPage/SearchPage.tsx @@ -281,7 +281,7 @@ const SearchPage: React.FC = () => { const { data } = useLearningResourcesSearch( { - ...params, + ...(params as LRSearchRequest), aggregations: AGGREGATIONS, resource_type: resourceType ? resourceType : ALL_RESOURCE_TABS, limit: PAGE_SIZE, diff --git a/learning_resources/constants.py b/learning_resources/constants.py index 25b09987c5..8c74ca29f7 100644 --- a/learning_resources/constants.py +++ b/learning_resources/constants.py @@ -211,12 +211,8 @@ class LearningResourceRelationTypes(TextChoices): "title": "Last Modified Date descending", "sort": "-last_modified", }, - "created_on": { - "title": "Creation Date ascending", - "sort": "created_on", - }, - "-created_on": { - "title": "CreationDate descending", + "new": { + "title": "Newest resources first", "sort": "-created_on", }, "start_date": { @@ -243,6 +239,10 @@ class LearningResourceRelationTypes(TextChoices): "title": "Popularity descending", "sort": "-views", }, + "upcoming": { + "title": "Next start date ascending", + "sort": "next_start_date", + }, } diff --git a/learning_resources/etl/loaders.py b/learning_resources/etl/loaders.py index 80c68f3b95..12f091a321 100644 --- a/learning_resources/etl/loaders.py +++ b/learning_resources/etl/loaders.py @@ -1,10 +1,13 @@ """learning_resources data loaders""" +import datetime import json import logging from django.contrib.auth import get_user_model from django.db import transaction +from django.db.models import Q +from django.utils import timezone from learning_resources.constants import ( LearningResourceFormat, @@ -104,6 +107,22 @@ def load_departments( return resource.departments.all() +def load_next_start_date(resource: LearningResource) -> datetime.time | None: + next_upcoming_run = ( + resource.runs.filter(Q(published=True) & Q(start_date__gt=timezone.now())) + .order_by("start_date") + .first() + ) + + if next_upcoming_run: + resource.next_start_date = next_upcoming_run.start_date + else: + resource.next_start_date = None + + resource.save() + return resource.next_start_date + + def load_instructors( run: LearningResourceRun, instructors_data: list[dict] ) -> list[LearningResourceInstructor]: @@ -332,6 +351,7 @@ def load_course( run.save() unpublished_runs.append(run.id) + load_next_start_date(learning_resource) load_topics(learning_resource, topics_data) load_offered_by(learning_resource, offered_bys_data) load_image(learning_resource, image_data) @@ -462,6 +482,8 @@ def load_program( run.save() unpublished_runs.append(run.id) + load_next_start_date(learning_resource) + for course_data in courses_data: # skip courses that don't define a readable_id if not course_data.get("readable_id", None): diff --git a/learning_resources/etl/loaders_test.py b/learning_resources/etl/loaders_test.py index e2474e9fd4..f1de5a73d6 100644 --- a/learning_resources/etl/loaders_test.py +++ b/learning_resources/etl/loaders_test.py @@ -1,12 +1,14 @@ """Tests for ETL loaders""" import json +from datetime import timedelta # pylint: disable=redefined-outer-name,too-many-locals,too-many-lines from types import SimpleNamespace import pytest from django.forms.models import model_to_dict +from django.utils import timezone from learning_resources.constants import ( LearningResourceFormat, @@ -293,6 +295,7 @@ def test_load_program_bad_platform(mocker): @pytest.mark.parametrize("is_run_published", [True, False]) @pytest.mark.parametrize("blocklisted", [True, False]) @pytest.mark.parametrize("resource_format", [LearningResourceFormat.hybrid.name, None]) +@pytest.mark.parametrize("has_upcoming_run", [True, False]) def test_load_course( # noqa: PLR0913 mock_upsert_tasks, course_exists, @@ -300,6 +303,7 @@ def test_load_course( # noqa: PLR0913 is_run_published, blocklisted, resource_format, + has_upcoming_run, ): """Test that load_course loads the course""" platform = LearningResourcePlatformFactory.create() @@ -314,14 +318,20 @@ def test_load_course( # noqa: PLR0913 learning_resource.published = is_published + start_date = ( + timezone.now() + timedelta(10) + if has_upcoming_run + else timezone.now() - timedelta(1) + ) + if course_exists: run = LearningResourceRunFactory.create( - learning_resource=learning_resource, published=True + learning_resource=learning_resource, published=True, start_date=start_date ) learning_resource.runs.set([run]) learning_resource.save() else: - run = LearningResourceRunFactory.build() + run = LearningResourceRunFactory.build(start_date=start_date) assert Course.objects.count() == (1 if course_exists else 0) format_data = {"learning_format": [resource_format]} if resource_format else {} @@ -341,7 +351,7 @@ def test_load_course( # noqa: PLR0913 run = { "run_id": run.run_id, "enrollment_start": run.enrollment_start, - "start_date": run.start_date, + "start_date": start_date, "end_date": run.end_date, } props["runs"] = [run] @@ -353,6 +363,11 @@ def test_load_course( # noqa: PLR0913 result = load_course(props, blocklist, [], config=CourseLoaderConfig(prune=True)) assert result.professional is True + expected_next_start_date = ( + start_date if has_upcoming_run and is_run_published else None + ) + assert result.next_start_date == expected_next_start_date + if course_exists and ((not is_published or not is_run_published) or blocklisted): mock_upsert_tasks.deindex_learning_resource.assert_called_with( result.id, result.resource_type diff --git a/learning_resources/filters.py b/learning_resources/filters.py index 6cfc8a39f1..4f1e9a60c6 100644 --- a/learning_resources/filters.py +++ b/learning_resources/filters.py @@ -3,7 +3,7 @@ import logging from decimal import Decimal -from django.db.models import Q +from django.db.models import Count, Q from django_filters import ( BooleanFilter, ChoiceFilter, @@ -138,7 +138,13 @@ def filter_course_feature(self, queryset, _, value): def filter_sortby(self, queryset, _, value): """Sort the queryset in the order specified by the value""" - return queryset.order_by(LEARNING_RESOURCE_SORTBY_OPTIONS[value]["sort"]) + sort_param = LEARNING_RESOURCE_SORTBY_OPTIONS[value]["sort"] + + if "views" in value: + queryset = queryset.annotate(num_hits=Count("views")) + sort_param = sort_param.replace("views", "num_hits") + + return queryset.order_by(sort_param) def filter_format(self, queryset, _, value): """Format Filter for learning resources""" diff --git a/learning_resources/filters_test.py b/learning_resources/filters_test.py index 1c6698d3c7..b8d2948f44 100644 --- a/learning_resources/filters_test.py +++ b/learning_resources/filters_test.py @@ -293,7 +293,7 @@ def test_video_playlist_filter_readable_id(client): assert results[0]["readable_id"] == resource.readable_id -@pytest.mark.parametrize("sortby", ["created_on", "readable_id", "id"]) +@pytest.mark.parametrize("sortby", ["readable_id", "id"]) @pytest.mark.parametrize("descending", [True, False]) def test_learning_resource_sortby(client, sortby, descending): """Test that the query is sorted in the correct order""" @@ -318,6 +318,25 @@ def test_learning_resource_sortby(client, sortby, descending): ) +def test_learning_resource_sortby_new(client): + """Test that the query is sorted in the correct order""" + resources = [course.learning_resource for course in CourseFactory.create_batch(3)] + sortby_param = "new" + + results = client.get(f"{RESOURCE_API_URL}?sortby={sortby_param}").json()["results"] + + assert [result["id"] for result in results] == sorted( + [ + resource.id + for resource in sorted( + resources, + key=lambda x: x.created_on, + ) + ], + reverse=True, + ) + + @pytest.mark.parametrize("multifilter", ["topic={}&topic={}", "topic={},{}"]) def test_learning_resource_filter_topics(mock_courses, client, multifilter): """Test that the topic filter works""" diff --git a/learning_resources/migrations/0045_learningresource_next_start_date.py b/learning_resources/migrations/0045_learningresource_next_start_date.py new file mode 100644 index 0000000000..fdc9d9f96d --- /dev/null +++ b/learning_resources/migrations/0045_learningresource_next_start_date.py @@ -0,0 +1,39 @@ +# Generated by Django 4.2.11 on 2024-04-30 17:18 + +from django.db import migrations, models + +from learning_resources.etl.loaders import load_next_start_date + + +def assign_next_start_date(apps, schema_editor): + """ + Assign next start dates + """ + LearningResource = apps.get_model("learning_resources", "LearningResource") + + for resource in LearningResource.objects.filter( + resource_type__in=["course", "program"] + ).iterator(): + load_next_start_date(resource) + + +class Migration(migrations.Migration): + dependencies = [ + ("learning_resources", "0044_rename_learningresource_format"), + ] + + operations = [ + migrations.AddField( + model_name="learningresource", + name="next_start_date", + field=models.DateTimeField(blank=True, db_index=True, null=True), + ), + migrations.AlterField( + model_name="learningresourcerun", + name="start_date", + field=models.DateTimeField(blank=True, null=True), + ), + migrations.RunPython( + assign_next_start_date, reverse_code=migrations.RunPython.noop + ), + ] diff --git a/learning_resources/models.py b/learning_resources/models.py index 01970a20bf..f612674d1b 100644 --- a/learning_resources/models.py +++ b/learning_resources/models.py @@ -189,6 +189,8 @@ class LearningResource(TimestampedModel): "self", through="LearningResourceRelationship", symmetrical=False, blank=True ) etl_source = models.CharField(max_length=12, default="") + professional = models.BooleanField(default=False) + next_start_date = models.DateTimeField(null=True, blank=True, db_index=True) @property def audience(self) -> str | None: @@ -197,8 +199,6 @@ def audience(self) -> str | None: return self.platform.audience return None - professional = models.BooleanField(default=False) - @property def prices(self) -> list[Decimal]: """Returns the prices for the learning resource""" @@ -265,7 +265,7 @@ class LearningResourceRun(TimestampedModel): ) semester = models.CharField(max_length=20, null=True, blank=True) # noqa: DJ001 year = models.IntegerField(null=True, blank=True) - start_date = models.DateTimeField(null=True, blank=True, db_index=True) + start_date = models.DateTimeField(null=True, blank=True) end_date = models.DateTimeField(null=True, blank=True) enrollment_start = models.DateTimeField(null=True, blank=True) enrollment_end = models.DateTimeField(null=True, blank=True) diff --git a/learning_resources/serializers_test.py b/learning_resources/serializers_test.py index b72ed07c48..c44aaf193c 100644 --- a/learning_resources/serializers_test.py +++ b/learning_resources/serializers_test.py @@ -244,6 +244,7 @@ def test_learning_resource_serializer( # noqa: PLR0913 {"code": lr_format, "name": LearningResourceFormat[lr_format].value} for lr_format in resource.learning_format ], + "next_start_date": resource.next_start_date, } diff --git a/learning_resources/tasks.py b/learning_resources/tasks.py index 95de3f6a07..769a9d0fa6 100644 --- a/learning_resources/tasks.py +++ b/learning_resources/tasks.py @@ -9,6 +9,7 @@ import boto3 import celery from django.conf import settings +from django.utils import timezone from learning_resources.etl import pipelines, youtube from learning_resources.etl.constants import ETLSource @@ -16,6 +17,7 @@ get_most_recent_course_archives, sync_edx_course_files, ) +from learning_resources.etl.loaders import load_next_start_date from learning_resources.etl.pipelines import ocw_courses_etl from learning_resources.etl.utils import get_learning_course_bucket_name from learning_resources.models import LearningResource @@ -27,6 +29,15 @@ log = logging.getLogger(__name__) +@app.task +def update_next_start_date(): + """Update expired next start dates""" + resources = LearningResource.objects.filter(next_start_date__lt=timezone.now()) + for resource in resources: + load_next_start_date(resource) + return len(resources) + + @app.task def get_micromasters_data(): """Execute the MicroMasters ETL pipeline""" diff --git a/learning_resources/tasks_test.py b/learning_resources/tasks_test.py index dd5e2ec0fa..929f5060c6 100644 --- a/learning_resources/tasks_test.py +++ b/learning_resources/tasks_test.py @@ -2,20 +2,26 @@ Test tasks """ +from datetime import timedelta from unittest.mock import ANY import pytest from decorator import contextmanager +from django.utils import timezone from moto import mock_s3 from learning_resources import factories, models, tasks from learning_resources.conftest import OCW_TEST_PREFIX, setup_s3, setup_s3_ocw from learning_resources.constants import LearningResourceType, PlatformType from learning_resources.etl.constants import ETLSource +from learning_resources.factories import ( + LearningResourceFactory, +) from learning_resources.tasks import ( get_ocw_data, get_youtube_data, get_youtube_transcripts, + update_next_start_date, ) pytestmark = pytest.mark.django_db @@ -316,3 +322,16 @@ def test_get_youtube_transcripts(mocker): mock_etl_youtube.get_youtube_transcripts.assert_called_once_with( mock_etl_youtube.get_youtube_videos_for_transcripts_job.return_value ) + + +def test_update_next_start_date(mocker): + learning_resource = LearningResourceFactory.create( + next_start_date=(timezone.now() - timedelta(10)) + ) + LearningResourceFactory.create(next_start_date=(timezone.now() + timedelta(1))) + + mock_load_next_start_date = mocker.patch( + "learning_resources.tasks.load_next_start_date" + ) + update_next_start_date() + mock_load_next_start_date.assert_called_once_with(learning_resource) diff --git a/learning_resources/views.py b/learning_resources/views.py index 8d2f0bcfd9..99481eeb6c 100644 --- a/learning_resources/views.py +++ b/learning_resources/views.py @@ -8,17 +8,14 @@ from django.db import transaction from django.db.models import Count, F, Q, QuerySet from django.http import HttpResponse -from django.utils import timezone from django.utils.decorators import method_decorator from django.views.decorators.cache import cache_page from drf_spectacular.types import OpenApiTypes from drf_spectacular.utils import OpenApiParameter, extend_schema, extend_schema_view from rest_framework import views, viewsets -from rest_framework.decorators import action from rest_framework.filters import OrderingFilter -from rest_framework.generics import GenericAPIView, get_object_or_404 +from rest_framework.generics import get_object_or_404 from rest_framework.pagination import LimitOffsetPagination -from rest_framework.request import Request from rest_framework.response import Response from rest_framework_nested.viewsets import NestedViewSetMixin @@ -156,108 +153,6 @@ def get_queryset(self) -> QuerySet: return self._get_base_queryset().filter(published=True) -class NewResourcesViewSetMixin(GenericAPIView): - """ViewSet mixin for adding new resource functionality.""" - - resource_type_name_plural: str - - def __init_subclass__(cls) -> None: - """Initialize subclasses by updating the view with the correct serializer.""" - name = cls.resource_type_name_plural - # this decorator mutates the view in place so the return value is safely ignored - extend_schema_view( - new=extend_schema( - description=f"Get a paginated list of newly released {name}.", - responses=cls.serializer_class(many=True), - ), - )(cls) - super().__init_subclass__() - - @extend_schema(summary="List New") - @action(methods=["GET"], detail=False, name="New Resources") - def new(self, request: Request) -> QuerySet: # noqa: ARG002 - queryset = self.get_queryset() - filtered_queryset = self.filter_queryset(queryset) - page = self.paginate_queryset(filtered_queryset.order_by("-created_on")) - serializer = self.get_serializer(page, many=True) - return self.get_paginated_response(serializer.data) - - -class UpcomingResourcesViewSetMixin(GenericAPIView): - """ViewSet mixin for adding upcoming resource functionality.""" - - resource_type_name_plural: str - - def __init_subclass__(cls) -> None: - """Initialize subclasses by updating the view with the correct serializer.""" - name = cls.resource_type_name_plural - # this decorator mutates the view in place so the return value is safely ignored - extend_schema_view( - upcoming=extend_schema( - description=f"Get a paginated list of upcoming {name}.", - responses=cls.serializer_class(many=True), - ), - )(cls) - super().__init_subclass__() - - @extend_schema(summary="List Upcoming") - @action(methods=["GET"], detail=False, name="Upcoming Resources") - def upcoming(self, request: Request) -> QuerySet: # noqa: ARG002 - """ - Get upcoming LearningResources - - Args: - request(Request): The request object - - Returns: - QuerySet of LearningResource objects with future runs - - """ - - queryset = self.get_queryset() - filtered_queryset = self.filter_queryset(queryset) - page = self.paginate_queryset( - filtered_queryset.filter( - Q(runs__published=True) - & ( - Q(runs__start_date__gt=timezone.now()) - | Q(runs__enrollment_start__gt=timezone.now()) - ) - ).order_by("runs__start_date") - ) - serializer = self.get_serializer(page, many=True) - return self.get_paginated_response(serializer.data) - - -class PopularResourcesViewSetMixin(GenericAPIView): - """ViewSet mixin for adding popular resource functionality.""" - - resource_type_name_plural: str - - def __init_subclass__(cls) -> None: - """Initialize subclasses by updating the view with the correct serializer.""" - name = cls.resource_type_name_plural - # this decorator mutates the view in place so the return value is safely ignored - extend_schema_view( - new=extend_schema( - description=f"Get a paginated list of popular {name}.", - responses=cls.serializer_class(many=True), - ), - )(cls) - super().__init_subclass__() - - @extend_schema(summary="List Popular") - @action(methods=["GET"], detail=False, name="Popular Resources") - def popular(self, request: Request) -> QuerySet: # noqa: ARG002 - """Retrieve a list of popular resources""" - - queryset = self.get_queryset().annotate(num_hits=Count("views")) - filtered_queryset = self.filter_queryset(queryset) - page = self.paginate_queryset(filtered_queryset.order_by("-num_hits")) - serializer = self.get_serializer(page, many=True) - return self.get_paginated_response(serializer.data) - - @extend_schema_view( list=extend_schema( description="Get a paginated list of learning resources.", @@ -268,9 +163,6 @@ def popular(self, request: Request) -> QuerySet: # noqa: ARG002 ) class LearningResourceViewSet( BaseLearningResourceViewSet, - UpcomingResourcesViewSetMixin, - NewResourcesViewSetMixin, - PopularResourcesViewSetMixin, ): """ Viewset for LearningResources @@ -290,9 +182,6 @@ class LearningResourceViewSet( ) class CourseViewSet( BaseLearningResourceViewSet, - NewResourcesViewSetMixin, - UpcomingResourcesViewSetMixin, - PopularResourcesViewSetMixin, ): """ Viewset for Courses @@ -324,9 +213,6 @@ def get_queryset(self) -> QuerySet: ) class ProgramViewSet( BaseLearningResourceViewSet, - UpcomingResourcesViewSetMixin, - NewResourcesViewSetMixin, - PopularResourcesViewSetMixin, ): """ Viewset for Programs @@ -869,9 +755,7 @@ class OfferedByViewSet(viewsets.ReadOnlyModelViewSet): description="Retrieve a single video", ), ) -class VideoViewSet( - BaseLearningResourceViewSet, UpcomingResourcesViewSetMixin, NewResourcesViewSetMixin -): +class VideoViewSet(BaseLearningResourceViewSet): """ Viewset for Videos """ @@ -900,9 +784,7 @@ def get_queryset(self): description="Retrieve a single video playlist", ), ) -class VideoPlaylistViewSet( - BaseLearningResourceViewSet, UpcomingResourcesViewSetMixin, NewResourcesViewSetMixin -): +class VideoPlaylistViewSet(BaseLearningResourceViewSet): """ Viewset for VideoPlaylists """ diff --git a/learning_resources/views_test.py b/learning_resources/views_test.py index c81d0b672e..7438e0a375 100644 --- a/learning_resources/views_test.py +++ b/learning_resources/views_test.py @@ -1,8 +1,10 @@ """Test for learning_resources views""" import random +from datetime import timedelta import pytest +from django.utils import timezone from rest_framework.reverse import reverse from learning_resources.constants import ( @@ -29,7 +31,6 @@ VideoPlaylistFactory, ) from learning_resources.models import ( - LearningResource, LearningResourceRelationship, ) from learning_resources.serializers import ( @@ -137,97 +138,6 @@ def test_get_course_content_files_filtered(client, reverse_url, expected_url): assert resp.data.get("count") == 3 -@pytest.mark.parametrize( - ("url", "params"), - [ - ("lr:v1:courses_api-list", ""), - ("lr:v1:learning_resources_api-list", "resource_type=course"), - ], -) -def test_new_courses_endpoint(client, url, params): - """Test new courses endpoint""" - courses = sorted( - CourseFactory.create_batch(3), - key=lambda course: course.learning_resource.created_on, - reverse=True, - ) - - resp = client.get(f"{reverse(url)}new/?{params}") - assert resp.data.get("count") == 3 - for i in range(3): - assert resp.data.get("results")[i]["id"] == courses[i].learning_resource.id - - -@pytest.mark.parametrize( - ("url", "params"), - [ - ("lr:v1:courses_api-list", "platform=ocw"), - ("lr:v1:learning_resources_api-list", "resource_type=course&platform=ocw"), - ], -) -def test_new_courses_endpoint_stacks_with_other_filters(client, url, params): - """Test new courses endpoint stacks with other filters""" - courses = sorted( - CourseFactory.create_batch(3, platform=PlatformType.ocw.name), - key=lambda course: course.learning_resource.created_on, - reverse=True, - ) - - CourseFactory.create_batch(3, platform=PlatformType.mitxonline.name) - - resp = client.get(f"{reverse(url)}new/?{params}") - assert resp.data.get("count") == 3 - for i in range(3): - assert resp.data.get("results")[i]["id"] == courses[i].learning_resource.id - - -@pytest.mark.parametrize( - ("url", "params"), - [ - ("lr:v1:courses_api-list", ""), - ("lr:v1:learning_resources_api-list", "resource_type=course"), - ], -) -def test_upcoming_courses_endpoint(client, url, params): - """Test upcoming courses endpoint""" - learning_resource = LearningResourceFactory.create( - is_course=True, runs__in_future=True - ) - - LearningResourceFactory.create(is_course=True, runs__in_past=True) - - resp = client.get(f"{reverse(url)}upcoming/?{params}") - assert resp.data.get("count") == 1 - assert resp.data.get("results")[0]["id"] == learning_resource.id - - -@pytest.mark.parametrize( - ("url", "params"), - [ - ("lr:v1:courses_api-list", "platform=edx"), - ("lr:v1:learning_resources_api-list", "resource_type=course&platform=edx"), - ], -) -def test_upcoming_courses_endpoint_stacks_with_other_filters(client, url, params): - """Test upcoming courses endpoint stacks with other filters""" - edx = LearningResourcePlatformFactory.create( - code=PlatformType.edx.name, name=PlatformType.edx.value - ) - ocw = LearningResourcePlatformFactory.create( - code=PlatformType.ocw.name, name=PlatformType.ocw.value - ) - learning_resource = LearningResourceFactory.create( - is_course=True, runs__in_future=True, platform=edx - ) - - LearningResourceFactory.create(is_course=True, runs__in_past=True, platform=edx) - LearningResourceFactory.create(is_course=True, runs__in_future=True, platform=ocw) - - resp = client.get(f"{reverse(url)}upcoming/?{params}") - assert resp.data.get("count") == 1 - assert resp.data.get("results")[0]["id"] == learning_resource.id - - @pytest.mark.parametrize( ("url", "params"), [ @@ -882,8 +792,64 @@ def test_get_video_detail_endpoint(client, url): assert resp.data.get("video") == VideoSerializer(instance=video).data +@pytest.mark.parametrize( + ("url", "params"), + [ + ("lr:v1:courses_api-list", "sortby=new"), + ( + "lr:v1:learning_resources_api-list", + "sortby=new&resource_type=course", + ), + ], +) +def test_sortby_new(client, url, params): + """Test new courses endpoint""" + courses = sorted( + CourseFactory.create_batch(3), + key=lambda course: course.learning_resource.created_on, + reverse=True, + ) + + resp = client.get(f"{reverse(url)}?{params}") + + assert resp.data.get("count") == 3 + assert len(resp.data.get("results")) == 3 + + for i in range(3): + assert resp.data.get("results")[i]["id"] == courses[i].learning_resource.id + + +@pytest.mark.parametrize( + ("url", "params"), + [ + ("lr:v1:courses_api-list", "sortby=upcoming"), + ("lr:v1:learning_resources_api-list", "sortby=upcoming&resource_type=course"), + ], +) +def test_sortby_upcoming(client, url, params): + """Test upcoming courses endpoint""" + other_learning_resource = LearningResourceFactory.create( + is_course=True, next_start_date=None + ) + + later_upcoming_learning_resource = LearningResourceFactory.create( + is_course=True, next_start_date=timezone.now() + timedelta(2) + ) + + upcoming_learning_resource = LearningResourceFactory.create( + is_course=True, next_start_date=timezone.now() + timedelta(1) + ) + + resp = client.get(f"{reverse(url)}?{params}") + assert resp.data.get("count") == 3 + assert len(resp.data.get("results")) == 3 + assert resp.data.get("results")[0]["id"] == upcoming_learning_resource.id + assert resp.data.get("results")[1]["id"] == later_upcoming_learning_resource.id + assert resp.data.get("results")[2]["id"] == other_learning_resource.id + + @pytest.mark.parametrize("resource_type", ["course", "program"]) -def test_popular_endpoints(client, resource_type): +def test_popular_sort(client, resource_type): """Test the popular endpoints to ensure they return data correctly.""" resources = LearningResourceFactory.create_batch(5, resource_type=resource_type) @@ -894,17 +860,18 @@ def test_popular_endpoints(client, resource_type): learning_resource=resource, ) - url = reverse("lr:v1:learning_resources_api-popular") - params = f"resource_type={resource_type}" if resource_type else "" - - resp = client.get(f"{url}?{params}") + url = reverse("lr:v1:learning_resources_api-list") - lr_queryset = LearningResource.objects.filter(published=True) + params = ( + f"resource_type={resource_type}&sortby=-views" + if resource_type + else "sortby=-views" + ) - if resource_type: - lr_queryset = lr_queryset.filter(resource_type=resource_type) + resp = client.get(f"{url}?{params}") - assert len(resp.data.get("results")) == lr_queryset.count() + assert resp.data.get("count") == 5 + assert len(resp.data.get("results")) == 5 for i in range(1, 5): assert ( diff --git a/learning_resources_search/api_test.py b/learning_resources_search/api_test.py index 8bf5fcbeb2..408991f194 100644 --- a/learning_resources_search/api_test.py +++ b/learning_resources_search/api_test.py @@ -1423,9 +1423,9 @@ def test_execute_learn_search_for_learning_resource_query(opensearch): }, "_source": { "excludes": [ + "created_on", "course.course_numbers.sort_coursenum", "course.course_numbers.primary", - "created_on", "resource_relations", "free", ] @@ -1626,9 +1626,9 @@ def test_execute_learn_search_for_content_file_query(opensearch): }, "_source": { "excludes": [ + "created_on", "course.course_numbers.sort_coursenum", "course.course_numbers.primary", - "created_on", "resource_relations", "free", ] diff --git a/learning_resources_search/constants.py b/learning_resources_search/constants.py index c71ce46e0d..9a3fe11d1b 100644 --- a/learning_resources_search/constants.py +++ b/learning_resources_search/constants.py @@ -236,6 +236,7 @@ class FilterConfig: "prices": {"type": "scaled_float", "scaling_factor": 100}, }, }, + "next_start_date": {"type": "date"}, } @@ -355,9 +356,9 @@ class FilterConfig: SEARCH_CONN_EXCEPTIONS = (ESConnectionError, UrlTimeoutError) SOURCE_EXCLUDED_FIELDS = [ + "created_on", "course.course_numbers.sort_coursenum", "course.course_numbers.primary", - "created_on", "resource_relations", "free", ] diff --git a/main/settings_celery.py b/main/settings_celery.py index e081f780aa..92f06dbfd0 100644 --- a/main/settings_celery.py +++ b/main/settings_celery.py @@ -21,6 +21,10 @@ ) CELERY_BEAT_SCHEDULE = { + "update_next-start-date-every-1-days": { + "task": "learning_resources.tasks.update_next_start_date", + "schedule": crontab(minute=0, hour=4), # midnight EST + }, "update_edx-courses-every-1-days": { "task": "learning_resources.tasks.get_mit_edx_data", "schedule": crontab(minute=30, hour=15), # 11:30am EST diff --git a/openapi/specs/v1.yaml b/openapi/specs/v1.yaml index 1fab8eda50..10bc217c48 100644 --- a/openapi/specs/v1.yaml +++ b/openapi/specs/v1.yaml @@ -810,19 +810,19 @@ paths: schema: type: string enum: - - -created_on - -id - -last_modified - -mitcoursenumber - -readable_id - -start_date - -views - - created_on - id - last_modified - mitcoursenumber + - new - readable_id - start_date + - upcoming - views description: |- Sort By @@ -833,14 +833,14 @@ paths: * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending - * `created_on` - Creation Date ascending - * `-created_on` - CreationDate descending + * `new` - Newest resources first * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending + * `upcoming` - Next start date ascending - in: query name: topic schema: @@ -1045,11 +1045,59 @@ paths: schema: $ref: '#/components/schemas/ContentFile' description: '' - /api/v1/courses/new/: + /api/v1/departments/: + get: + operationId: departments_list + description: MIT academic departments + summary: List + parameters: + - name: limit + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - name: offset + required: false + in: query + description: The initial index from which to return the results. + schema: + type: integer + tags: + - departments + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedLearningResourceDepartmentList' + description: '' + /api/v1/departments/{department_id}/: + get: + operationId: departments_retrieve + description: MIT academic departments + summary: Retrieve + parameters: + - in: path + name: department_id + schema: + type: string + description: A unique value identifying this learning resource department. + required: true + tags: + - departments + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/LearningResourceDepartment' + description: '' + /api/v1/learning_resources/: get: - operationId: courses_new_list - description: Get a paginated list of popular Courses. - summary: List New + operationId: learning_resources_list + description: Get a paginated list of learning resources. + summary: List parameters: - in: query name: course_feature @@ -1332,19 +1380,19 @@ paths: schema: type: string enum: - - -created_on - -id - -last_modified - -mitcoursenumber - -readable_id - -start_date - -views - - created_on - id - last_modified - mitcoursenumber + - new - readable_id - start_date + - upcoming - views description: |- Sort By @@ -1355,14 +1403,14 @@ paths: * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending - * `created_on` - Creation Date ascending - * `-created_on` - CreationDate descending + * `new` - Newest resources first * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending + * `upcoming` - Next start date ascending - in: query name: topic schema: @@ -1373,36 +1421,43 @@ paths: explode: false style: form tags: - - courses + - learning_resources responses: '200': content: application/json: schema: - $ref: '#/components/schemas/PaginatedCourseResourceList' + $ref: '#/components/schemas/PaginatedLearningResourceList' description: '' - /api/v1/courses/popular/: + /api/v1/learning_resources/{id}/: get: - operationId: courses_popular_retrieve - description: Retrieve a list of popular resources - summary: List Popular + operationId: learning_resources_retrieve + description: Retrieve a single learning resource. + summary: Retrieve + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this learning resource. + required: true tags: - - courses + - learning_resources responses: '200': content: application/json: schema: - $ref: '#/components/schemas/CourseResource' + $ref: '#/components/schemas/LearningResource' description: '' - /api/v1/courses/upcoming/: + /api/v1/learning_resources/{learning_resource_id}/contentfiles/: get: - operationId: courses_upcoming_list - description: Get a paginated list of upcoming Courses. - summary: List Upcoming + operationId: learning_resources_contentfiles_list + description: Show content files for a learning resource + summary: Learning Resource Content File List parameters: - in: query - name: course_feature + name: content_feature_type schema: type: array items: @@ -1410,144 +1465,12 @@ paths: description: Multiple values may be separated by commas. explode: false style: form - - in: query - name: department - schema: - type: array - items: - type: string - enum: - - '1' - - '10' - - '11' - - '12' - - '14' - - '15' - - '16' - - '17' - - '18' - - '2' - - '20' - - 21A - - 21G - - 21H - - 21L - - 21M - - '22' - - '24' - - '3' - - '4' - - '5' - - '6' - - '7' - - '8' - - '9' - - CC - - CMS-W - - EC - - ES - - ESD - - HST - - IDS - - MAS - - PE - - RES - - STS - - WGS - description: |- - The department that offers learning resources - - * `1` - Civil and Environmental Engineering - * `2` - Mechanical Engineering - * `3` - Materials Science and Engineering - * `4` - Architecture - * `5` - Chemistry - * `6` - Electrical Engineering and Computer Science - * `7` - Biology - * `8` - Physics - * `9` - Brain and Cognitive Sciences - * `10` - Chemical Engineering - * `11` - Urban Studies and Planning - * `12` - Earth, Atmospheric, and Planetary Sciences - * `14` - Economics - * `15` - Sloan School of Management - * `16` - Aeronautics and Astronautics - * `17` - Political Science - * `18` - Mathematics - * `20` - Biological Engineering - * `21A` - Anthropology - * `21G` - Global Studies and Languages - * `21H` - History - * `21L` - Literature - * `21M` - Music and Theater Arts - * `22` - Nuclear Science and Engineering - * `24` - Linguistics and Philosophy - * `CC` - Concourse - * `CMS-W` - Comparative Media Studies/Writing - * `EC` - Edgerton Center - * `ES` - Experimental Study Group - * `ESD` - Engineering Systems Division - * `HST` - Health Sciences and Technology - * `IDS` - Institute for Data, Systems, and Society - * `MAS` - Media Arts and Sciences - * `PE` - Athletics, Physical Education and Recreation - * `RES` - Supplemental Resources - * `STS` - Science, Technology, and Society - * `WGS` - Women's and Gender Studies - explode: true - style: form - - in: query - name: free - schema: - type: boolean - description: The course/program is offered for free - - in: query - name: learning_format - schema: - type: array - items: - type: array - items: - type: string - maxLength: 24 - enum: - - hybrid - - in_person - - online - description: |- - The learning format of course/program resources - - * `online` - Online - * `hybrid` - Hybrid - * `in_person` - In person - explode: true - style: form - - in: query - name: level + - in: path + name: learning_resource_id schema: - type: array - items: - type: string - enum: - - advanced - - graduate - - high_school - - intermediate - - introductory - - noncredit - - undergraduate - description: |- - The academic level of the resources - - * `undergraduate` - Undergraduate - * `graduate` - Graduate - * `high_school` - High School - * `noncredit` - Non-Credit - * `advanced` - Advanced - * `intermediate` - Intermediate - * `introductory` - Introductory - explode: true - style: form + type: integer + description: id of the parent learning resource + required: true - name: limit required: false in: query @@ -1571,7 +1494,7 @@ paths: - see - xpro description: |- - The organization that offers a learning resource + The organization that offers a learning resource the content file belongs to * `mitx` - MITx * `ocw` - OCW @@ -1616,7 +1539,7 @@ paths: - xpro - youtube description: |- - The platform on which learning resources are offered + The platform on which learning resources the content file belongs to is offered * `edx` - edX * `ocw` - OCW @@ -1639,104 +1562,71 @@ paths: explode: true style: form - in: query - name: professional - schema: - type: boolean - - in: query - name: readable_id + name: resource_id schema: type: array items: - type: string + type: number description: Multiple values may be separated by commas. explode: false style: form - in: query - name: resource_type + name: run_id schema: type: array items: - type: string - enum: - - course - - learning_path - - podcast - - podcast_episode - - program - - video - - video_playlist - description: |- - The type of learning resource - - * `course` - Course - * `program` - Program - * `learning_path` - Learning Path - * `podcast` - Podcast - * `podcast_episode` - Podcast Episode - * `video` - Video - * `video_playlist` - Video Playlist - explode: true + type: number + description: Multiple values may be separated by commas. + explode: false style: form - - in: query - name: sortby + tags: + - learning_resources + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedContentFileList' + description: '' + /api/v1/learning_resources/{learning_resource_id}/contentfiles/{id}/: + get: + operationId: learning_resources_contentfiles_retrieve + description: Show content files for a learning resource + summary: Learning Resource Content File Retrieve + parameters: + - in: path + name: id schema: - type: string - enum: - - -created_on - - -id - - -last_modified - - -mitcoursenumber - - -readable_id - - -start_date - - -views - - created_on - - id - - last_modified - - mitcoursenumber - - readable_id - - start_date - - views - description: |- - Sort By - - * `id` - Object ID ascending - * `-id` - Object ID descending - * `readable_id` - Readable ID ascending - * `-readable_id` - Readable ID descending - * `last_modified` - Last Modified Date ascending - * `-last_modified` - Last Modified Date descending - * `created_on` - Creation Date ascending - * `-created_on` - CreationDate descending - * `start_date` - Start Date ascending - * `-start_date` - Start Date descending - * `mitcoursenumber` - MIT course number ascending - * `-mitcoursenumber` - MIT course number descending - * `views` - Popularity ascending - * `-views` - Popularity descending - - in: query - name: topic + type: integer + description: A unique integer value identifying this contentfile. + required: true + - in: path + name: learning_resource_id schema: - type: array - items: - type: string - description: Multiple values may be separated by commas. - explode: false - style: form + type: integer + description: id of the parent learning resource + required: true tags: - - courses + - learning_resources responses: '200': content: application/json: schema: - $ref: '#/components/schemas/PaginatedCourseResourceList' + $ref: '#/components/schemas/ContentFile' description: '' - /api/v1/departments/: + /api/v1/learning_resources/{learning_resource_id}/items/: get: - operationId: departments_list - description: MIT academic departments - summary: List + operationId: learning_resources_items_list + description: Get a list of related learning resources for a learning resource. + summary: Nested Learning Resource List parameters: + - in: path + name: learning_resource_id + schema: + type: integer + description: id of the parent learning resource + required: true - name: limit required: false in: query @@ -1749,59 +1639,114 @@ paths: description: The initial index from which to return the results. schema: type: integer + - name: sortby + required: false + in: query + description: Which field to use when ordering the results. + schema: + type: string tags: - - departments + - learning_resources responses: '200': content: application/json: schema: - $ref: '#/components/schemas/PaginatedLearningResourceDepartmentList' + $ref: '#/components/schemas/PaginatedLearningResourceRelationshipList' description: '' - /api/v1/departments/{department_id}/: + /api/v1/learning_resources/{learning_resource_id}/items/{id}/: get: - operationId: departments_retrieve - description: MIT academic departments - summary: Retrieve + operationId: learning_resources_items_retrieve + description: Get a singe related learning resource for a learning resource. + summary: Nested Learning Resource Retrieve parameters: - in: path - name: department_id + name: id schema: - type: string - description: A unique value identifying this learning resource department. + type: integer + description: A unique integer value identifying this learning resource relationship. + required: true + - in: path + name: learning_resource_id + schema: + type: integer + description: id of the parent learning resource required: true tags: - - departments + - learning_resources responses: '200': content: application/json: schema: - $ref: '#/components/schemas/LearningResourceDepartment' + $ref: '#/components/schemas/LearningResourceRelationship' description: '' - /api/v1/learning_resources/: + /api/v1/learning_resources_search/: get: - operationId: learning_resources_list - description: Get a paginated list of learning resources. - summary: List + operationId: learning_resources_search_retrieve + description: Search for learning resources + summary: Search parameters: + - in: query + name: aggregations + schema: + type: array + items: + enum: + - resource_type + - certification + - offered_by + - platform + - topic + - department + - level + - course_feature + - professional + - free + - learning_format + type: string + description: |- + * `resource_type` - resource_type + * `certification` - certification + * `offered_by` - offered_by + * `platform` - platform + * `topic` - topic + * `department` - department + * `level` - level + * `course_feature` - course_feature + * `professional` - professional + * `free` - free + * `learning_format` - learning_format + description: Show resource counts by category + - in: query + name: certification + schema: + type: boolean + nullable: true + description: True if the learning resource offers a certificate - in: query name: course_feature schema: type: array items: type: string - description: Multiple values may be separated by commas. - explode: false - style: form + minLength: 1 + description: The course feature. Possible options are at api/v1/course_features/ - in: query name: department schema: type: array items: - type: string enum: - '1' + - '2' + - '3' + - '4' + - '5' + - '6' + - '7' + - '8' + - '9' - '10' - '11' - '12' @@ -1810,7 +1755,6 @@ paths: - '16' - '17' - '18' - - '2' - '20' - 21A - 21G @@ -1819,13 +1763,6 @@ paths: - 21M - '22' - '24' - - '3' - - '4' - - '5' - - '6' - - '7' - - '8' - - '9' - CC - CMS-W - EC @@ -1838,250 +1775,267 @@ paths: - RES - STS - WGS - description: |- - The department that offers learning resources - - * `1` - Civil and Environmental Engineering - * `2` - Mechanical Engineering - * `3` - Materials Science and Engineering - * `4` - Architecture - * `5` - Chemistry - * `6` - Electrical Engineering and Computer Science - * `7` - Biology - * `8` - Physics - * `9` - Brain and Cognitive Sciences - * `10` - Chemical Engineering - * `11` - Urban Studies and Planning - * `12` - Earth, Atmospheric, and Planetary Sciences - * `14` - Economics - * `15` - Sloan School of Management - * `16` - Aeronautics and Astronautics - * `17` - Political Science - * `18` - Mathematics - * `20` - Biological Engineering - * `21A` - Anthropology - * `21G` - Global Studies and Languages - * `21H` - History - * `21L` - Literature - * `21M` - Music and Theater Arts - * `22` - Nuclear Science and Engineering - * `24` - Linguistics and Philosophy - * `CC` - Concourse - * `CMS-W` - Comparative Media Studies/Writing - * `EC` - Edgerton Center - * `ES` - Experimental Study Group - * `ESD` - Engineering Systems Division - * `HST` - Health Sciences and Technology - * `IDS` - Institute for Data, Systems, and Society - * `MAS` - Media Arts and Sciences - * `PE` - Athletics, Physical Education and Recreation - * `RES` - Supplemental Resources - * `STS` - Science, Technology, and Society - * `WGS` - Women's and Gender Studies - explode: true - style: form - - in: query - name: free - schema: - type: boolean - description: The course/program is offered for free - - in: query - name: learning_format - schema: - type: array - items: - type: array - items: - type: string - maxLength: 24 - enum: - - hybrid - - in_person - - online - description: |- - The learning format of course/program resources - - * `online` - Online - * `hybrid` - Hybrid - * `in_person` - In person - explode: true - style: form - - in: query - name: level - schema: - type: array - items: type: string + description: |- + * `1` - Civil and Environmental Engineering + * `2` - Mechanical Engineering + * `3` - Materials Science and Engineering + * `4` - Architecture + * `5` - Chemistry + * `6` - Electrical Engineering and Computer Science + * `7` - Biology + * `8` - Physics + * `9` - Brain and Cognitive Sciences + * `10` - Chemical Engineering + * `11` - Urban Studies and Planning + * `12` - Earth, Atmospheric, and Planetary Sciences + * `14` - Economics + * `15` - Sloan School of Management + * `16` - Aeronautics and Astronautics + * `17` - Political Science + * `18` - Mathematics + * `20` - Biological Engineering + * `21A` - Anthropology + * `21G` - Global Studies and Languages + * `21H` - History + * `21L` - Literature + * `21M` - Music and Theater Arts + * `22` - Nuclear Science and Engineering + * `24` - Linguistics and Philosophy + * `CC` - Concourse + * `CMS-W` - Comparative Media Studies/Writing + * `EC` - Edgerton Center + * `ES` - Experimental Study Group + * `ESD` - Engineering Systems Division + * `HST` - Health Sciences and Technology + * `IDS` - Institute for Data, Systems, and Society + * `MAS` - Media Arts and Sciences + * `PE` - Athletics, Physical Education and Recreation + * `RES` - Supplemental Resources + * `STS` - Science, Technology, and Society + * `WGS` - Women's and Gender Studies + description: "The department that offers the learning resource \ + \ \n\n* `1` - Civil and Environmental Engineering\n* `2` - Mechanical Engineering\n\ + * `3` - Materials Science and Engineering\n* `4` - Architecture\n* `5` -\ + \ Chemistry\n* `6` - Electrical Engineering and Computer Science\n* `7`\ + \ - Biology\n* `8` - Physics\n* `9` - Brain and Cognitive Sciences\n* `10`\ + \ - Chemical Engineering\n* `11` - Urban Studies and Planning\n* `12` -\ + \ Earth, Atmospheric, and Planetary Sciences\n* `14` - Economics\n* `15`\ + \ - Sloan School of Management\n* `16` - Aeronautics and Astronautics\n\ + * `17` - Political Science\n* `18` - Mathematics\n* `20` - Biological Engineering\n\ + * `21A` - Anthropology\n* `21G` - Global Studies and Languages\n* `21H`\ + \ - History\n* `21L` - Literature\n* `21M` - Music and Theater Arts\n* `22`\ + \ - Nuclear Science and Engineering\n* `24` - Linguistics and Philosophy\n\ + * `CC` - Concourse\n* `CMS-W` - Comparative Media Studies/Writing\n* `EC`\ + \ - Edgerton Center\n* `ES` - Experimental Study Group\n* `ESD` - Engineering\ + \ Systems Division\n* `HST` - Health Sciences and Technology\n* `IDS` -\ + \ Institute for Data, Systems, and Society\n* `MAS` - Media Arts and Sciences\n\ + * `PE` - Athletics, Physical Education and Recreation\n* `RES` - Supplemental\ + \ Resources\n* `STS` - Science, Technology, and Society\n* `WGS` - Women's\ + \ and Gender Studies" + - in: query + name: free + schema: + type: boolean + nullable: true + - in: query + name: id + schema: + type: array + items: + type: integer + description: The id value for the learning resource + - in: query + name: learning_format + schema: + type: array + items: enum: - - advanced + - online + - hybrid + - in_person + type: string + description: |- + * `online` - Online + * `hybrid` - Hybrid + * `in_person` - In person + description: "The format(s) in which the learning resource is offered \ + \ \n\n* `online` - Online\n* `hybrid` - Hybrid\n* `in_person` -\ + \ In person" + - in: query + name: level + schema: + type: array + items: + enum: + - undergraduate - graduate - high_school + - noncredit + - advanced - intermediate - introductory - - noncredit - - undergraduate - description: |- - The academic level of the resources - - * `undergraduate` - Undergraduate - * `graduate` - Graduate - * `high_school` - High School - * `noncredit` - Non-Credit - * `advanced` - Advanced - * `intermediate` - Intermediate - * `introductory` - Introductory - explode: true - style: form - - name: limit - required: false - in: query - description: Number of results to return per page. + type: string + description: |- + * `undergraduate` - Undergraduate + * `graduate` - Graduate + * `high_school` - High School + * `noncredit` - Non-Credit + * `advanced` - Advanced + * `intermediate` - Intermediate + * `introductory` - Introductory + - in: query + name: limit schema: type: integer + description: Number of results to return per page - in: query name: offered_by schema: type: array items: - type: string enum: + - mitx + - ocw - bootcamps + - xpro - csail - - ctl - mitpe - - mitx - - ocw - - scc - see - - xpro - description: |- - The organization that offers a learning resource - - * `mitx` - MITx - * `ocw` - OCW - * `bootcamps` - Bootcamps - * `xpro` - xPRO - * `csail` - CSAIL - * `mitpe` - Professional Education - * `see` - Sloan Executive Education - * `scc` - Schwarzman College of Computing - * `ctl` - Center for Transportation & Logistics - explode: true - style: form - - name: offset - required: false - in: query - description: The initial index from which to return the results. + - scc + - ctl + type: string + description: |- + * `mitx` - MITx + * `ocw` - OCW + * `bootcamps` - Bootcamps + * `xpro` - xPRO + * `csail` - CSAIL + * `mitpe` - Professional Education + * `see` - Sloan Executive Education + * `scc` - Schwarzman College of Computing + * `ctl` - Center for Transportation & Logistics + description: "The organization that offers the learning resource \ + \ \n\n* `mitx` - MITx\n* `ocw` - OCW\n* `bootcamps` - Bootcamps\n* `xpro`\ + \ - xPRO\n* `csail` - CSAIL\n* `mitpe` - Professional Education\n* `see`\ + \ - Sloan Executive Education\n* `scc` - Schwarzman College of Computing\n\ + * `ctl` - Center for Transportation & Logistics" + - in: query + name: offset schema: type: integer + description: The initial index from which to return the results - in: query name: platform schema: type: array items: - type: string enum: - - bootcamps - - csail - - ctl - edx - - emeritus - - globalalumni - - mitpe - - mitxonline - ocw - oll - - podcast - - scc + - mitxonline + - bootcamps + - xpro + - csail + - mitpe - see - - simplilearn - - susskind + - scc + - ctl - whu - - xpro + - susskind + - globalalumni + - simplilearn + - emeritus + - podcast - youtube - description: |- - The platform on which learning resources are offered - - * `edx` - edX - * `ocw` - OCW - * `oll` - Open Learning Library - * `mitxonline` - MITx Online - * `bootcamps` - Bootcamps - * `xpro` - xPRO - * `csail` - CSAIL - * `mitpe` - Professional Education - * `see` - Sloan Executive Education - * `scc` - Schwarzman College of Computing - * `ctl` - Center for Transportation & Logistics - * `whu` - WHU - * `susskind` - Susskind - * `globalalumni` - Global Alumni - * `simplilearn` - Simplilearn - * `emeritus` - Emeritus - * `podcast` - Podcast - * `youtube` - YouTube - explode: true - style: form + type: string + description: |- + * `edx` - edX + * `ocw` - OCW + * `oll` - Open Learning Library + * `mitxonline` - MITx Online + * `bootcamps` - Bootcamps + * `xpro` - xPRO + * `csail` - CSAIL + * `mitpe` - Professional Education + * `see` - Sloan Executive Education + * `scc` - Schwarzman College of Computing + * `ctl` - Center for Transportation & Logistics + * `whu` - WHU + * `susskind` - Susskind + * `globalalumni` - Global Alumni + * `simplilearn` - Simplilearn + * `emeritus` - Emeritus + * `podcast` - Podcast + * `youtube` - YouTube + description: "The platform on which the learning resource is offered \ + \ \n\n* `edx` - edX\n* `ocw` - OCW\n* `oll` - Open Learning Library\n\ + * `mitxonline` - MITx Online\n* `bootcamps` - Bootcamps\n* `xpro` - xPRO\n\ + * `csail` - CSAIL\n* `mitpe` - Professional Education\n* `see` - Sloan Executive\ + \ Education\n* `scc` - Schwarzman College of Computing\n* `ctl` - Center\ + \ for Transportation & Logistics\n* `whu` - WHU\n* `susskind` - Susskind\n\ + * `globalalumni` - Global Alumni\n* `simplilearn` - Simplilearn\n* `emeritus`\ + \ - Emeritus\n* `podcast` - Podcast\n* `youtube` - YouTube" - in: query name: professional schema: type: boolean + nullable: true - in: query - name: readable_id + name: q schema: - type: array - items: - type: string - description: Multiple values may be separated by commas. - explode: false - style: form + type: string + minLength: 1 + description: The search text - in: query name: resource_type schema: type: array items: - type: string enum: - course + - program - learning_path - podcast - podcast_episode - - program - video - video_playlist - description: |- - The type of learning resource - - * `course` - Course - * `program` - Program - * `learning_path` - Learning Path - * `podcast` - Podcast - * `podcast_episode` - Podcast Episode - * `video` - Video - * `video_playlist` - Video Playlist - explode: true - style: form + type: string + description: |- + * `course` - course + * `program` - program + * `learning_path` - learning path + * `podcast` - podcast + * `podcast_episode` - podcast episode + * `video` - video + * `video_playlist` - video playlist + description: "The type of learning resource \n\n* `course` - course\n\ + * `program` - program\n* `learning_path` - learning path\n* `podcast` -\ + \ podcast\n* `podcast_episode` - podcast episode\n* `video` - video\n* `video_playlist`\ + \ - video playlist" - in: query name: sortby schema: - type: string enum: - - -created_on + - id - -id - - -last_modified - - -mitcoursenumber + - readable_id - -readable_id - - -start_date - - -views - - created_on - - id - last_modified - - mitcoursenumber - - readable_id + - -last_modified + - new - start_date + - -start_date + - mitcoursenumber + - -mitcoursenumber - views + - -views + - upcoming + type: string + minLength: 1 description: |- - Sort By + If the parameter starts with '-' the sort is in descending order * `id` - Object ID ascending * `-id` - Object ID descending @@ -2089,61 +2043,102 @@ paths: * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending - * `created_on` - Creation Date ascending - * `-created_on` - CreationDate descending + * `new` - Newest resources first * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending + * `upcoming` - Next start date ascending - in: query name: topic schema: type: array items: type: string - description: Multiple values may be separated by commas. - explode: false - style: form + minLength: 1 + description: The topic name. To see a list of options go to api/v1/topics/ tags: - - learning_resources + - learning_resources_search responses: '200': content: application/json: schema: - $ref: '#/components/schemas/PaginatedLearningResourceList' + $ref: '#/components/schemas/LearningResourceSearchResponse' description: '' - /api/v1/learning_resources/{id}/: + /api/v1/learning_resources_user_subscription/: get: - operationId: learning_resources_retrieve - description: Retrieve a single learning resource. - summary: Retrieve + operationId: learning_resources_user_subscription_list + description: View for listing percolate query subscriptions for a user + tags: + - learning_resources_user_subscription + responses: + '200': + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/PercolateQuery' + description: '' + /api/v1/learning_resources_user_subscription/{id}/unsubscribe/: + delete: + operationId: learning_resources_user_subscription_unsubscribe_destroy + description: |- + Unsubscribe a user from a query + + Args: + pk (integer): The id of the query + + Returns: + PercolateQuerySerializer: The percolate query + summary: Unsubscribe user from query parameters: - in: path name: id schema: type: integer - description: A unique integer value identifying this learning resource. required: true tags: - - learning_resources + - learning_resources_user_subscription + responses: + '204': + description: No response body + /api/v1/learning_resources_user_subscription/subscribe/: + post: + operationId: learning_resources_user_subscription_subscribe_create + description: Subscribe a user to query + summary: Subscribe user to query + tags: + - learning_resources_user_subscription + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/LearningResourcesSearchRequestRequest' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/LearningResourcesSearchRequestRequest' + multipart/form-data: + schema: + $ref: '#/components/schemas/LearningResourcesSearchRequestRequest' responses: '200': content: application/json: schema: - $ref: '#/components/schemas/LearningResource' + $ref: '#/components/schemas/PercolateQuery' description: '' - /api/v1/learning_resources/{learning_resource_id}/contentfiles/: + /api/v1/learningpaths/: get: - operationId: learning_resources_contentfiles_list - description: Show content files for a learning resource - summary: Learning Resource Content File List + operationId: learningpaths_list + description: Get a paginated list of learning paths + summary: List parameters: - in: query - name: content_feature_type + name: course_feature schema: type: array items: @@ -2151,66 +2146,198 @@ paths: description: Multiple values may be separated by commas. explode: false style: form - - in: path - name: learning_resource_id - schema: - type: integer - description: id of the parent learning resource - required: true - - name: limit - required: false - in: query - description: Number of results to return per page. - schema: - type: integer - in: query - name: offered_by + name: department schema: type: array items: type: string enum: - - bootcamps - - csail - - ctl - - mitpe - - mitx - - ocw - - scc - - see - - xpro + - '1' + - '10' + - '11' + - '12' + - '14' + - '15' + - '16' + - '17' + - '18' + - '2' + - '20' + - 21A + - 21G + - 21H + - 21L + - 21M + - '22' + - '24' + - '3' + - '4' + - '5' + - '6' + - '7' + - '8' + - '9' + - CC + - CMS-W + - EC + - ES + - ESD + - HST + - IDS + - MAS + - PE + - RES + - STS + - WGS description: |- - The organization that offers a learning resource the content file belongs to + The department that offers learning resources - * `mitx` - MITx - * `ocw` - OCW - * `bootcamps` - Bootcamps - * `xpro` - xPRO - * `csail` - CSAIL - * `mitpe` - Professional Education - * `see` - Sloan Executive Education - * `scc` - Schwarzman College of Computing - * `ctl` - Center for Transportation & Logistics + * `1` - Civil and Environmental Engineering + * `2` - Mechanical Engineering + * `3` - Materials Science and Engineering + * `4` - Architecture + * `5` - Chemistry + * `6` - Electrical Engineering and Computer Science + * `7` - Biology + * `8` - Physics + * `9` - Brain and Cognitive Sciences + * `10` - Chemical Engineering + * `11` - Urban Studies and Planning + * `12` - Earth, Atmospheric, and Planetary Sciences + * `14` - Economics + * `15` - Sloan School of Management + * `16` - Aeronautics and Astronautics + * `17` - Political Science + * `18` - Mathematics + * `20` - Biological Engineering + * `21A` - Anthropology + * `21G` - Global Studies and Languages + * `21H` - History + * `21L` - Literature + * `21M` - Music and Theater Arts + * `22` - Nuclear Science and Engineering + * `24` - Linguistics and Philosophy + * `CC` - Concourse + * `CMS-W` - Comparative Media Studies/Writing + * `EC` - Edgerton Center + * `ES` - Experimental Study Group + * `ESD` - Engineering Systems Division + * `HST` - Health Sciences and Technology + * `IDS` - Institute for Data, Systems, and Society + * `MAS` - Media Arts and Sciences + * `PE` - Athletics, Physical Education and Recreation + * `RES` - Supplemental Resources + * `STS` - Science, Technology, and Society + * `WGS` - Women's and Gender Studies explode: true style: form - - name: offset - required: false - in: query - description: The initial index from which to return the results. + - in: query + name: free schema: - type: integer + type: boolean + description: The course/program is offered for free - in: query - name: platform + name: learning_format schema: type: array items: - type: string + type: array + items: + type: string + maxLength: 24 enum: - - bootcamps - - csail - - ctl - - edx - - emeritus + - hybrid + - in_person + - online + description: |- + The learning format of course/program resources + + * `online` - Online + * `hybrid` - Hybrid + * `in_person` - In person + explode: true + style: form + - in: query + name: level + schema: + type: array + items: + type: string + enum: + - advanced + - graduate + - high_school + - intermediate + - introductory + - noncredit + - undergraduate + description: |- + The academic level of the resources + + * `undergraduate` - Undergraduate + * `graduate` - Graduate + * `high_school` - High School + * `noncredit` - Non-Credit + * `advanced` - Advanced + * `intermediate` - Intermediate + * `introductory` - Introductory + explode: true + style: form + - name: limit + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - in: query + name: offered_by + schema: + type: array + items: + type: string + enum: + - bootcamps + - csail + - ctl + - mitpe + - mitx + - ocw + - scc + - see + - xpro + description: |- + The organization that offers a learning resource + + * `mitx` - MITx + * `ocw` - OCW + * `bootcamps` - Bootcamps + * `xpro` - xPRO + * `csail` - CSAIL + * `mitpe` - Professional Education + * `see` - Sloan Executive Education + * `scc` - Schwarzman College of Computing + * `ctl` - Center for Transportation & Logistics + explode: true + style: form + - name: offset + required: false + in: query + description: The initial index from which to return the results. + schema: + type: integer + - in: query + name: platform + schema: + type: array + items: + type: string + enum: + - bootcamps + - csail + - ctl + - edx + - emeritus - globalalumni - mitpe - mitxonline @@ -2225,7 +2352,7 @@ paths: - xpro - youtube description: |- - The platform on which learning resources the content file belongs to is offered + The platform on which learning resources are offered * `edx` - edX * `ocw` - OCW @@ -2248,62 +2375,194 @@ paths: explode: true style: form - in: query - name: resource_id + name: professional + schema: + type: boolean + - in: query + name: readable_id schema: type: array items: - type: number + type: string description: Multiple values may be separated by commas. explode: false style: form - in: query - name: run_id + name: resource_type schema: type: array items: - type: number + type: string + enum: + - course + - learning_path + - podcast + - podcast_episode + - program + - video + - video_playlist + description: |- + The type of learning resource + + * `course` - Course + * `program` - Program + * `learning_path` - Learning Path + * `podcast` - Podcast + * `podcast_episode` - Podcast Episode + * `video` - Video + * `video_playlist` - Video Playlist + explode: true + style: form + - in: query + name: sortby + schema: + type: string + enum: + - -id + - -last_modified + - -mitcoursenumber + - -readable_id + - -start_date + - -views + - id + - last_modified + - mitcoursenumber + - new + - readable_id + - start_date + - upcoming + - views + description: |- + Sort By + + * `id` - Object ID ascending + * `-id` - Object ID descending + * `readable_id` - Readable ID ascending + * `-readable_id` - Readable ID descending + * `last_modified` - Last Modified Date ascending + * `-last_modified` - Last Modified Date descending + * `new` - Newest resources first + * `start_date` - Start Date ascending + * `-start_date` - Start Date descending + * `mitcoursenumber` - MIT course number ascending + * `-mitcoursenumber` - MIT course number descending + * `views` - Popularity ascending + * `-views` - Popularity descending + * `upcoming` - Next start date ascending + - in: query + name: topic + schema: + type: array + items: + type: string description: Multiple values may be separated by commas. explode: false style: form tags: - - learning_resources + - learningpaths responses: '200': content: application/json: schema: - $ref: '#/components/schemas/PaginatedContentFileList' + $ref: '#/components/schemas/PaginatedLearningPathResourceList' description: '' - /api/v1/learning_resources/{learning_resource_id}/contentfiles/{id}/: + post: + operationId: learningpaths_create + description: Create a learning path + summary: Create + tags: + - learningpaths + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/LearningPathResourceRequest' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/LearningPathResourceRequest' + multipart/form-data: + schema: + $ref: '#/components/schemas/LearningPathResourceRequest' + required: true + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/LearningPathResource' + description: '' + /api/v1/learningpaths/{id}/: get: - operationId: learning_resources_contentfiles_retrieve - description: Show content files for a learning resource - summary: Learning Resource Content File Retrieve + operationId: learningpaths_retrieve + description: Retrive a single learning path + summary: Retrieve parameters: - in: path name: id schema: type: integer - description: A unique integer value identifying this contentfile. + description: A unique integer value identifying this learning resource. required: true + tags: + - learningpaths + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/LearningPathResource' + description: '' + patch: + operationId: learningpaths_partial_update + description: Update individual fields of a learning path + summary: Update + parameters: - in: path - name: learning_resource_id + name: id schema: type: integer - description: id of the parent learning resource + description: A unique integer value identifying this learning resource. required: true tags: - - learning_resources + - learningpaths + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PatchedLearningPathResourceRequest' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/PatchedLearningPathResourceRequest' + multipart/form-data: + schema: + $ref: '#/components/schemas/PatchedLearningPathResourceRequest' responses: '200': content: application/json: schema: - $ref: '#/components/schemas/ContentFile' + $ref: '#/components/schemas/LearningPathResource' description: '' - /api/v1/learning_resources/{learning_resource_id}/items/: + delete: + operationId: learningpaths_destroy + description: Remove a learning path + summary: Destroy + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this learning resource. + required: true + tags: + - learningpaths + responses: + '204': + description: No response body + /api/v1/learningpaths/{learning_resource_id}/items/: get: - operationId: learning_resources_items_list + operationId: learningpaths_items_list description: Get a list of related learning resources for a learning resource. summary: Nested Learning Resource List parameters: @@ -2311,7 +2570,7 @@ paths: name: learning_resource_id schema: type: integer - description: id of the parent learning resource + description: The learning resource id of the learning path required: true - name: limit required: false @@ -2332,17 +2591,49 @@ paths: schema: type: string tags: - - learning_resources + - learningpaths responses: '200': content: application/json: schema: - $ref: '#/components/schemas/PaginatedLearningResourceRelationshipList' + $ref: '#/components/schemas/PaginatedLearningPathRelationshipList' description: '' - /api/v1/learning_resources/{learning_resource_id}/items/{id}/: + post: + operationId: learningpaths_items_create + description: Viewset for LearningPath related resources + summary: Learning Path Resource Relationship Add + parameters: + - in: path + name: learning_resource_id + schema: + type: integer + description: The learning resource id of the learning path + required: true + tags: + - learningpaths + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/LearningPathRelationshipRequest' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/LearningPathRelationshipRequest' + multipart/form-data: + schema: + $ref: '#/components/schemas/LearningPathRelationshipRequest' + required: true + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/LearningPathRelationship' + description: '' + /api/v1/learningpaths/{learning_resource_id}/items/{id}/: get: - operationId: learning_resources_items_retrieve + operationId: learningpaths_items_retrieve description: Get a singe related learning resource for a learning resource. summary: Nested Learning Resource Retrieve parameters: @@ -2356,22 +2647,177 @@ paths: name: learning_resource_id schema: type: integer - description: id of the parent learning resource + description: The learning resource id of the learning path required: true tags: - - learning_resources + - learningpaths responses: '200': content: application/json: schema: - $ref: '#/components/schemas/LearningResourceRelationship' + $ref: '#/components/schemas/LearningPathRelationship' + description: '' + patch: + operationId: learningpaths_items_partial_update + description: Viewset for LearningPath related resources + summary: Learning Path Resource Relationship Update + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this learning resource relationship. + required: true + - in: path + name: learning_resource_id + schema: + type: integer + description: The learning resource id of the learning path + required: true + tags: + - learningpaths + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PatchedLearningPathRelationshipRequest' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/PatchedLearningPathRelationshipRequest' + multipart/form-data: + schema: + $ref: '#/components/schemas/PatchedLearningPathRelationshipRequest' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/LearningPathRelationship' + description: '' + delete: + operationId: learningpaths_items_destroy + description: Viewset for LearningPath related resources + summary: Learning Path Resource Relationship Remove + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this learning resource relationship. + required: true + - in: path + name: learning_resource_id + schema: + type: integer + description: The learning resource id of the learning path + required: true + tags: + - learningpaths + responses: + '204': + description: No response body + /api/v1/offerors/: + get: + operationId: offerors_list + description: MIT organizations that offer learning resources + summary: List + parameters: + - name: limit + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - name: offset + required: false + in: query + description: The initial index from which to return the results. + schema: + type: integer + tags: + - offerors + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedLearningResourceOfferorList' + description: '' + /api/v1/offerors/{code}/: + get: + operationId: offerors_retrieve + description: MIT organizations that offer learning resources + summary: Retrieve + parameters: + - in: path + name: code + schema: + type: string + description: A unique value identifying this learning resource offeror. + required: true + tags: + - offerors + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/LearningResourceOfferor' + description: '' + /api/v1/platforms/: + get: + operationId: platforms_list + description: Platforms on which learning resources are hosted + summary: List + parameters: + - name: limit + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - name: offset + required: false + in: query + description: The initial index from which to return the results. + schema: + type: integer + tags: + - platforms + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedLearningResourcePlatformList' + description: '' + /api/v1/platforms/{code}/: + get: + operationId: platforms_retrieve + description: Platforms on which learning resources are hosted + summary: Retrieve + parameters: + - in: path + name: code + schema: + type: string + description: A unique value identifying this learning resource platform. + required: true + tags: + - platforms + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/LearningResourcePlatform' description: '' - /api/v1/learning_resources/new/: + /api/v1/podcast_episodes/: get: - operationId: learning_resources_new_list - description: Get a paginated list of popular Learning Resources. - summary: List New + operationId: podcast_episodes_list + description: Get a paginated list of podcast episodes + summary: List parameters: - in: query name: course_feature @@ -2654,19 +3100,19 @@ paths: schema: type: string enum: - - -created_on - -id - -last_modified - -mitcoursenumber - -readable_id - -start_date - -views - - created_on - id - last_modified - mitcoursenumber + - new - readable_id - start_date + - upcoming - views description: |- Sort By @@ -2677,14 +3123,14 @@ paths: * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending - * `created_on` - Creation Date ascending - * `-created_on` - CreationDate descending + * `new` - Newest resources first * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending + * `upcoming` - Next start date ascending - in: query name: topic schema: @@ -2695,33 +3141,40 @@ paths: explode: false style: form tags: - - learning_resources + - podcast_episodes responses: '200': content: application/json: schema: - $ref: '#/components/schemas/PaginatedLearningResourceList' + $ref: '#/components/schemas/PaginatedPodcastEpisodeResourceList' description: '' - /api/v1/learning_resources/popular/: + /api/v1/podcast_episodes/{id}/: get: - operationId: learning_resources_popular_retrieve - description: Retrieve a list of popular resources - summary: List Popular + operationId: podcast_episodes_retrieve + description: Retrieve a single podcast episode + summary: Retrieve + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this learning resource. + required: true tags: - - learning_resources + - podcast_episodes responses: '200': content: application/json: schema: - $ref: '#/components/schemas/LearningResource' + $ref: '#/components/schemas/PodcastEpisodeResource' description: '' - /api/v1/learning_resources/upcoming/: + /api/v1/podcasts/: get: - operationId: learning_resources_upcoming_list - description: Get a paginated list of upcoming Learning Resources. - summary: List Upcoming + operationId: podcasts_list + description: Get a paginated list of podcasts + summary: List parameters: - in: query name: course_feature @@ -3004,19 +3457,19 @@ paths: schema: type: string enum: - - -created_on - -id - -last_modified - -mitcoursenumber - -readable_id - -start_date - -views - - created_on - id - last_modified - mitcoursenumber + - new - readable_id - start_date + - upcoming - views description: |- Sort By @@ -3027,14 +3480,14 @@ paths: * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending - * `created_on` - Creation Date ascending - * `-created_on` - CreationDate descending + * `new` - Newest resources first * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending + * `upcoming` - Next start date ascending - in: query name: topic schema: @@ -3045,80 +3498,144 @@ paths: explode: false style: form tags: - - learning_resources + - podcasts responses: '200': content: application/json: schema: - $ref: '#/components/schemas/PaginatedLearningResourceList' + $ref: '#/components/schemas/PaginatedPodcastResourceList' description: '' - /api/v1/learning_resources_search/: + /api/v1/podcasts/{id}/: get: - operationId: learning_resources_search_retrieve - description: Search for learning resources - summary: Search + operationId: podcasts_retrieve + description: Retrieve a single podcast + summary: Retrieve parameters: - - in: query - name: aggregations + - in: path + name: id schema: - type: array - items: - enum: - - resource_type - - certification - - offered_by - - platform - - topic - - department - - level - - course_feature - - professional - - free - - learning_format - type: string - description: |- - * `resource_type` - resource_type - * `certification` - certification - * `offered_by` - offered_by - * `platform` - platform - * `topic` - topic - * `department` - department - * `level` - level - * `course_feature` - course_feature - * `professional` - professional - * `free` - free - * `learning_format` - learning_format - description: Show resource counts by category - - in: query - name: certification + type: integer + description: A unique integer value identifying this learning resource. + required: true + tags: + - podcasts + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PodcastResource' + description: '' + /api/v1/podcasts/{learning_resource_id}/items/: + get: + operationId: podcasts_items_list + description: Get a list of related learning resources for a learning resource. + summary: Nested Learning Resource List + parameters: + - in: path + name: learning_resource_id schema: - type: boolean - nullable: true - description: True if the learning resource offers a certificate + type: integer + description: id of the parent learning resource + required: true + - name: limit + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - name: offset + required: false + in: query + description: The initial index from which to return the results. + schema: + type: integer + - name: sortby + required: false + in: query + description: Which field to use when ordering the results. + schema: + type: string + tags: + - podcasts + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedLearningResourceRelationshipList' + description: '' + /api/v1/podcasts/{learning_resource_id}/items/{id}/: + get: + operationId: podcasts_items_retrieve + description: Get a singe related learning resource for a learning resource. + summary: Nested Learning Resource Retrieve + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this learning resource relationship. + required: true + - in: path + name: learning_resource_id + schema: + type: integer + description: id of the parent learning resource + required: true + tags: + - podcasts + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/LearningResourceRelationship' + description: '' + /api/v1/program_letters/{id}/: + get: + operationId: program_letters_retrieve + description: Retrieve a single program letter. + summary: Retrieve + parameters: + - in: path + name: id + schema: + type: string + required: true + tags: + - program_letters + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/ProgramLetter' + description: '' + /api/v1/programs/: + get: + operationId: programs_list + description: Get a paginated list of programs + summary: List + parameters: - in: query name: course_feature schema: type: array items: type: string - minLength: 1 - description: The course feature. Possible options are at api/v1/course_features/ + description: Multiple values may be separated by commas. + explode: false + style: form - in: query name: department schema: type: array items: + type: string enum: - '1' - - '2' - - '3' - - '4' - - '5' - - '6' - - '7' - - '8' - - '9' - '10' - '11' - '12' @@ -3127,6 +3644,7 @@ paths: - '16' - '17' - '18' + - '2' - '20' - 21A - 21G @@ -3135,6 +3653,13 @@ paths: - 21M - '22' - '24' + - '3' + - '4' + - '5' + - '6' + - '7' + - '8' + - '9' - CC - CMS-W - EC @@ -3147,267 +3672,250 @@ paths: - RES - STS - WGS - type: string - description: |- - * `1` - Civil and Environmental Engineering - * `2` - Mechanical Engineering - * `3` - Materials Science and Engineering - * `4` - Architecture - * `5` - Chemistry - * `6` - Electrical Engineering and Computer Science - * `7` - Biology - * `8` - Physics - * `9` - Brain and Cognitive Sciences - * `10` - Chemical Engineering - * `11` - Urban Studies and Planning - * `12` - Earth, Atmospheric, and Planetary Sciences - * `14` - Economics - * `15` - Sloan School of Management - * `16` - Aeronautics and Astronautics - * `17` - Political Science - * `18` - Mathematics - * `20` - Biological Engineering - * `21A` - Anthropology - * `21G` - Global Studies and Languages - * `21H` - History - * `21L` - Literature - * `21M` - Music and Theater Arts - * `22` - Nuclear Science and Engineering - * `24` - Linguistics and Philosophy - * `CC` - Concourse - * `CMS-W` - Comparative Media Studies/Writing - * `EC` - Edgerton Center - * `ES` - Experimental Study Group - * `ESD` - Engineering Systems Division - * `HST` - Health Sciences and Technology - * `IDS` - Institute for Data, Systems, and Society - * `MAS` - Media Arts and Sciences - * `PE` - Athletics, Physical Education and Recreation - * `RES` - Supplemental Resources - * `STS` - Science, Technology, and Society - * `WGS` - Women's and Gender Studies - description: "The department that offers the learning resource \ - \ \n\n* `1` - Civil and Environmental Engineering\n* `2` - Mechanical Engineering\n\ - * `3` - Materials Science and Engineering\n* `4` - Architecture\n* `5` -\ - \ Chemistry\n* `6` - Electrical Engineering and Computer Science\n* `7`\ - \ - Biology\n* `8` - Physics\n* `9` - Brain and Cognitive Sciences\n* `10`\ - \ - Chemical Engineering\n* `11` - Urban Studies and Planning\n* `12` -\ - \ Earth, Atmospheric, and Planetary Sciences\n* `14` - Economics\n* `15`\ - \ - Sloan School of Management\n* `16` - Aeronautics and Astronautics\n\ - * `17` - Political Science\n* `18` - Mathematics\n* `20` - Biological Engineering\n\ - * `21A` - Anthropology\n* `21G` - Global Studies and Languages\n* `21H`\ - \ - History\n* `21L` - Literature\n* `21M` - Music and Theater Arts\n* `22`\ - \ - Nuclear Science and Engineering\n* `24` - Linguistics and Philosophy\n\ - * `CC` - Concourse\n* `CMS-W` - Comparative Media Studies/Writing\n* `EC`\ - \ - Edgerton Center\n* `ES` - Experimental Study Group\n* `ESD` - Engineering\ - \ Systems Division\n* `HST` - Health Sciences and Technology\n* `IDS` -\ - \ Institute for Data, Systems, and Society\n* `MAS` - Media Arts and Sciences\n\ - * `PE` - Athletics, Physical Education and Recreation\n* `RES` - Supplemental\ - \ Resources\n* `STS` - Science, Technology, and Society\n* `WGS` - Women's\ - \ and Gender Studies" + description: |- + The department that offers learning resources + + * `1` - Civil and Environmental Engineering + * `2` - Mechanical Engineering + * `3` - Materials Science and Engineering + * `4` - Architecture + * `5` - Chemistry + * `6` - Electrical Engineering and Computer Science + * `7` - Biology + * `8` - Physics + * `9` - Brain and Cognitive Sciences + * `10` - Chemical Engineering + * `11` - Urban Studies and Planning + * `12` - Earth, Atmospheric, and Planetary Sciences + * `14` - Economics + * `15` - Sloan School of Management + * `16` - Aeronautics and Astronautics + * `17` - Political Science + * `18` - Mathematics + * `20` - Biological Engineering + * `21A` - Anthropology + * `21G` - Global Studies and Languages + * `21H` - History + * `21L` - Literature + * `21M` - Music and Theater Arts + * `22` - Nuclear Science and Engineering + * `24` - Linguistics and Philosophy + * `CC` - Concourse + * `CMS-W` - Comparative Media Studies/Writing + * `EC` - Edgerton Center + * `ES` - Experimental Study Group + * `ESD` - Engineering Systems Division + * `HST` - Health Sciences and Technology + * `IDS` - Institute for Data, Systems, and Society + * `MAS` - Media Arts and Sciences + * `PE` - Athletics, Physical Education and Recreation + * `RES` - Supplemental Resources + * `STS` - Science, Technology, and Society + * `WGS` - Women's and Gender Studies + explode: true + style: form - in: query name: free schema: type: boolean - nullable: true - - in: query - name: id - schema: - type: array - items: - type: integer - description: The id value for the learning resource + description: The course/program is offered for free - in: query name: learning_format schema: type: array items: + type: array + items: + type: string + maxLength: 24 enum: - - online - hybrid - in_person - type: string - description: |- - * `online` - Online - * `hybrid` - Hybrid - * `in_person` - In person - description: "The format(s) in which the learning resource is offered \ - \ \n\n* `online` - Online\n* `hybrid` - Hybrid\n* `in_person` -\ - \ In person" + - online + description: |- + The learning format of course/program resources + + * `online` - Online + * `hybrid` - Hybrid + * `in_person` - In person + explode: true + style: form - in: query name: level schema: type: array items: + type: string enum: - - undergraduate + - advanced - graduate - high_school - - noncredit - - advanced - intermediate - introductory - type: string - description: |- - * `undergraduate` - Undergraduate - * `graduate` - Graduate - * `high_school` - High School - * `noncredit` - Non-Credit - * `advanced` - Advanced - * `intermediate` - Intermediate - * `introductory` - Introductory - - in: query - name: limit + - noncredit + - undergraduate + description: |- + The academic level of the resources + + * `undergraduate` - Undergraduate + * `graduate` - Graduate + * `high_school` - High School + * `noncredit` - Non-Credit + * `advanced` - Advanced + * `intermediate` - Intermediate + * `introductory` - Introductory + explode: true + style: form + - name: limit + required: false + in: query + description: Number of results to return per page. schema: type: integer - description: Number of results to return per page - in: query name: offered_by schema: type: array items: + type: string enum: - - mitx - - ocw - bootcamps - - xpro - csail + - ctl - mitpe - - see + - mitx + - ocw - scc - - ctl - type: string - description: |- - * `mitx` - MITx - * `ocw` - OCW - * `bootcamps` - Bootcamps - * `xpro` - xPRO - * `csail` - CSAIL - * `mitpe` - Professional Education - * `see` - Sloan Executive Education - * `scc` - Schwarzman College of Computing - * `ctl` - Center for Transportation & Logistics - description: "The organization that offers the learning resource \ - \ \n\n* `mitx` - MITx\n* `ocw` - OCW\n* `bootcamps` - Bootcamps\n* `xpro`\ - \ - xPRO\n* `csail` - CSAIL\n* `mitpe` - Professional Education\n* `see`\ - \ - Sloan Executive Education\n* `scc` - Schwarzman College of Computing\n\ - * `ctl` - Center for Transportation & Logistics" - - in: query - name: offset + - see + - xpro + description: |- + The organization that offers a learning resource + + * `mitx` - MITx + * `ocw` - OCW + * `bootcamps` - Bootcamps + * `xpro` - xPRO + * `csail` - CSAIL + * `mitpe` - Professional Education + * `see` - Sloan Executive Education + * `scc` - Schwarzman College of Computing + * `ctl` - Center for Transportation & Logistics + explode: true + style: form + - name: offset + required: false + in: query + description: The initial index from which to return the results. schema: type: integer - description: The initial index from which to return the results - in: query name: platform schema: type: array items: + type: string enum: - - edx - - ocw - - oll - - mitxonline - bootcamps - - xpro - csail - - mitpe - - see - - scc - ctl - - whu - - susskind - - globalalumni - - simplilearn + - edx - emeritus + - globalalumni + - mitpe + - mitxonline + - ocw + - oll - podcast + - scc + - see + - simplilearn + - susskind + - whu + - xpro - youtube - type: string - description: |- - * `edx` - edX - * `ocw` - OCW - * `oll` - Open Learning Library - * `mitxonline` - MITx Online - * `bootcamps` - Bootcamps - * `xpro` - xPRO - * `csail` - CSAIL - * `mitpe` - Professional Education - * `see` - Sloan Executive Education - * `scc` - Schwarzman College of Computing - * `ctl` - Center for Transportation & Logistics - * `whu` - WHU - * `susskind` - Susskind - * `globalalumni` - Global Alumni - * `simplilearn` - Simplilearn - * `emeritus` - Emeritus - * `podcast` - Podcast - * `youtube` - YouTube - description: "The platform on which the learning resource is offered \ - \ \n\n* `edx` - edX\n* `ocw` - OCW\n* `oll` - Open Learning Library\n\ - * `mitxonline` - MITx Online\n* `bootcamps` - Bootcamps\n* `xpro` - xPRO\n\ - * `csail` - CSAIL\n* `mitpe` - Professional Education\n* `see` - Sloan Executive\ - \ Education\n* `scc` - Schwarzman College of Computing\n* `ctl` - Center\ - \ for Transportation & Logistics\n* `whu` - WHU\n* `susskind` - Susskind\n\ - * `globalalumni` - Global Alumni\n* `simplilearn` - Simplilearn\n* `emeritus`\ - \ - Emeritus\n* `podcast` - Podcast\n* `youtube` - YouTube" + description: |- + The platform on which learning resources are offered + + * `edx` - edX + * `ocw` - OCW + * `oll` - Open Learning Library + * `mitxonline` - MITx Online + * `bootcamps` - Bootcamps + * `xpro` - xPRO + * `csail` - CSAIL + * `mitpe` - Professional Education + * `see` - Sloan Executive Education + * `scc` - Schwarzman College of Computing + * `ctl` - Center for Transportation & Logistics + * `whu` - WHU + * `susskind` - Susskind + * `globalalumni` - Global Alumni + * `simplilearn` - Simplilearn + * `emeritus` - Emeritus + * `podcast` - Podcast + * `youtube` - YouTube + explode: true + style: form - in: query name: professional schema: type: boolean - nullable: true - in: query - name: q + name: readable_id schema: - type: string - minLength: 1 - description: The search text + type: array + items: + type: string + description: Multiple values may be separated by commas. + explode: false + style: form - in: query name: resource_type schema: type: array items: + type: string enum: - course - - program - learning_path - podcast - podcast_episode + - program - video - video_playlist - type: string - description: |- - * `course` - course - * `program` - program - * `learning_path` - learning path - * `podcast` - podcast - * `podcast_episode` - podcast episode - * `video` - video - * `video_playlist` - video playlist - description: "The type of learning resource \n\n* `course` - course\n\ - * `program` - program\n* `learning_path` - learning path\n* `podcast` -\ - \ podcast\n* `podcast_episode` - podcast episode\n* `video` - video\n* `video_playlist`\ - \ - video playlist" + description: |- + The type of learning resource + + * `course` - Course + * `program` - Program + * `learning_path` - Learning Path + * `podcast` - Podcast + * `podcast_episode` - Podcast Episode + * `video` - Video + * `video_playlist` - Video Playlist + explode: true + style: form - in: query name: sortby schema: + type: string enum: - - id - -id - - readable_id - - -readable_id - - last_modified - -last_modified - - created_on - - -created_on - - start_date + - -mitcoursenumber + - -readable_id - -start_date + - -views + - id + - last_modified - mitcoursenumber - - -mitcoursenumber + - new + - readable_id + - start_date + - upcoming - views - - -views - type: string - minLength: 1 description: |- - If the parameter starts with '-' the sort is in descending order + Sort By * `id` - Object ID ascending * `-id` - Object ID descending @@ -3415,4443 +3923,425 @@ paths: * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending - * `created_on` - Creation Date ascending - * `-created_on` - CreationDate descending + * `new` - Newest resources first * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending + * `upcoming` - Next start date ascending - in: query name: topic schema: type: array items: type: string - minLength: 1 - description: The topic name. To see a list of options go to api/v1/topics/ + description: Multiple values may be separated by commas. + explode: false + style: form tags: - - learning_resources_search + - programs responses: '200': content: application/json: schema: - $ref: '#/components/schemas/LearningResourceSearchResponse' + $ref: '#/components/schemas/PaginatedProgramResourceList' description: '' - /api/v1/learning_resources_user_subscription/: + /api/v1/programs/{id}/: get: - operationId: learning_resources_user_subscription_list - description: View for listing percolate query subscriptions for a user - tags: - - learning_resources_user_subscription - responses: + operationId: programs_retrieve + description: Retrieve a single program + summary: Retrieve + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this learning resource. + required: true + tags: + - programs + responses: '200': content: application/json: schema: - type: array - items: - $ref: '#/components/schemas/PercolateQuery' + $ref: '#/components/schemas/ProgramResource' description: '' - /api/v1/learning_resources_user_subscription/{id}/unsubscribe/: - delete: - operationId: learning_resources_user_subscription_unsubscribe_destroy - description: |- - Unsubscribe a user from a query - - Args: - pk (integer): The id of the query - - Returns: - PercolateQuerySerializer: The percolate query - summary: Unsubscribe user from query + /api/v1/schools/: + get: + operationId: schools_list + description: MIT schools + summary: List + parameters: + - name: limit + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - name: offset + required: false + in: query + description: The initial index from which to return the results. + schema: + type: integer + tags: + - schools + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedLearningResourceSchoolList' + description: '' + /api/v1/schools/{id}/: + get: + operationId: schools_retrieve + description: MIT schools + summary: Retrieve parameters: - in: path name: id schema: type: integer + description: A unique integer value identifying this learning resource school. required: true tags: - - learning_resources_user_subscription + - schools responses: - '204': - description: No response body - /api/v1/learning_resources_user_subscription/subscribe/: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/LearningResourceSchool' + description: '' + /api/v1/topics/: + get: + operationId: topics_list + description: Topics covered by learning resources + summary: List + parameters: + - name: limit + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - name: offset + required: false + in: query + description: The initial index from which to return the results. + schema: + type: integer + tags: + - topics + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedLearningResourceTopicList' + description: '' + /api/v1/topics/{id}/: + get: + operationId: topics_retrieve + description: Topics covered by learning resources + summary: Retrieve + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this learning resource topic. + required: true + tags: + - topics + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/LearningResourceTopic' + description: '' + /api/v1/userlists/: + get: + operationId: userlists_list + description: Viewset for UserLists + summary: List + parameters: + - name: limit + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - name: offset + required: false + in: query + description: The initial index from which to return the results. + schema: + type: integer + tags: + - userlists + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedUserListList' + description: '' post: - operationId: learning_resources_user_subscription_subscribe_create - description: Subscribe a user to query - summary: Subscribe user to query + operationId: userlists_create + description: Viewset for UserLists + summary: Create tags: - - learning_resources_user_subscription + - userlists requestBody: content: application/json: schema: - $ref: '#/components/schemas/LearningResourcesSearchRequestRequest' + $ref: '#/components/schemas/UserListRequest' application/x-www-form-urlencoded: schema: - $ref: '#/components/schemas/LearningResourcesSearchRequestRequest' + $ref: '#/components/schemas/UserListRequest' multipart/form-data: schema: - $ref: '#/components/schemas/LearningResourcesSearchRequestRequest' + $ref: '#/components/schemas/UserListRequest' + required: true responses: - '200': + '201': content: application/json: schema: - $ref: '#/components/schemas/PercolateQuery' + $ref: '#/components/schemas/UserList' description: '' - /api/v1/learningpaths/: + /api/v1/userlists/{id}/: get: - operationId: learningpaths_list - description: Get a paginated list of learning paths - summary: List + operationId: userlists_retrieve + description: Viewset for UserLists + summary: Retrieve parameters: - - in: query - name: course_feature + - in: path + name: id schema: - type: array - items: - type: string - description: Multiple values may be separated by commas. - explode: false - style: form - - in: query - name: department + type: integer + description: A unique integer value identifying this user list. + required: true + tags: + - userlists + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/UserList' + description: '' + patch: + operationId: userlists_partial_update + description: Viewset for UserLists + summary: Update + parameters: + - in: path + name: id schema: - type: array - items: - type: string - enum: - - '1' - - '10' - - '11' - - '12' - - '14' - - '15' - - '16' - - '17' - - '18' - - '2' - - '20' - - 21A - - 21G - - 21H - - 21L - - 21M - - '22' - - '24' - - '3' - - '4' - - '5' - - '6' - - '7' - - '8' - - '9' - - CC - - CMS-W - - EC - - ES - - ESD - - HST - - IDS - - MAS - - PE - - RES - - STS - - WGS - description: |- - The department that offers learning resources - - * `1` - Civil and Environmental Engineering - * `2` - Mechanical Engineering - * `3` - Materials Science and Engineering - * `4` - Architecture - * `5` - Chemistry - * `6` - Electrical Engineering and Computer Science - * `7` - Biology - * `8` - Physics - * `9` - Brain and Cognitive Sciences - * `10` - Chemical Engineering - * `11` - Urban Studies and Planning - * `12` - Earth, Atmospheric, and Planetary Sciences - * `14` - Economics - * `15` - Sloan School of Management - * `16` - Aeronautics and Astronautics - * `17` - Political Science - * `18` - Mathematics - * `20` - Biological Engineering - * `21A` - Anthropology - * `21G` - Global Studies and Languages - * `21H` - History - * `21L` - Literature - * `21M` - Music and Theater Arts - * `22` - Nuclear Science and Engineering - * `24` - Linguistics and Philosophy - * `CC` - Concourse - * `CMS-W` - Comparative Media Studies/Writing - * `EC` - Edgerton Center - * `ES` - Experimental Study Group - * `ESD` - Engineering Systems Division - * `HST` - Health Sciences and Technology - * `IDS` - Institute for Data, Systems, and Society - * `MAS` - Media Arts and Sciences - * `PE` - Athletics, Physical Education and Recreation - * `RES` - Supplemental Resources - * `STS` - Science, Technology, and Society - * `WGS` - Women's and Gender Studies - explode: true - style: form - - in: query - name: free - schema: - type: boolean - description: The course/program is offered for free - - in: query - name: learning_format - schema: - type: array - items: - type: array - items: - type: string - maxLength: 24 - enum: - - hybrid - - in_person - - online - description: |- - The learning format of course/program resources - - * `online` - Online - * `hybrid` - Hybrid - * `in_person` - In person - explode: true - style: form - - in: query - name: level - schema: - type: array - items: - type: string - enum: - - advanced - - graduate - - high_school - - intermediate - - introductory - - noncredit - - undergraduate - description: |- - The academic level of the resources - - * `undergraduate` - Undergraduate - * `graduate` - Graduate - * `high_school` - High School - * `noncredit` - Non-Credit - * `advanced` - Advanced - * `intermediate` - Intermediate - * `introductory` - Introductory - explode: true - style: form - - name: limit - required: false - in: query - description: Number of results to return per page. - schema: - type: integer - - in: query - name: offered_by - schema: - type: array - items: - type: string - enum: - - bootcamps - - csail - - ctl - - mitpe - - mitx - - ocw - - scc - - see - - xpro - description: |- - The organization that offers a learning resource - - * `mitx` - MITx - * `ocw` - OCW - * `bootcamps` - Bootcamps - * `xpro` - xPRO - * `csail` - CSAIL - * `mitpe` - Professional Education - * `see` - Sloan Executive Education - * `scc` - Schwarzman College of Computing - * `ctl` - Center for Transportation & Logistics - explode: true - style: form - - name: offset - required: false - in: query - description: The initial index from which to return the results. - schema: - type: integer - - in: query - name: platform - schema: - type: array - items: - type: string - enum: - - bootcamps - - csail - - ctl - - edx - - emeritus - - globalalumni - - mitpe - - mitxonline - - ocw - - oll - - podcast - - scc - - see - - simplilearn - - susskind - - whu - - xpro - - youtube - description: |- - The platform on which learning resources are offered - - * `edx` - edX - * `ocw` - OCW - * `oll` - Open Learning Library - * `mitxonline` - MITx Online - * `bootcamps` - Bootcamps - * `xpro` - xPRO - * `csail` - CSAIL - * `mitpe` - Professional Education - * `see` - Sloan Executive Education - * `scc` - Schwarzman College of Computing - * `ctl` - Center for Transportation & Logistics - * `whu` - WHU - * `susskind` - Susskind - * `globalalumni` - Global Alumni - * `simplilearn` - Simplilearn - * `emeritus` - Emeritus - * `podcast` - Podcast - * `youtube` - YouTube - explode: true - style: form - - in: query - name: professional - schema: - type: boolean - - in: query - name: readable_id - schema: - type: array - items: - type: string - description: Multiple values may be separated by commas. - explode: false - style: form - - in: query - name: resource_type - schema: - type: array - items: - type: string - enum: - - course - - learning_path - - podcast - - podcast_episode - - program - - video - - video_playlist - description: |- - The type of learning resource - - * `course` - Course - * `program` - Program - * `learning_path` - Learning Path - * `podcast` - Podcast - * `podcast_episode` - Podcast Episode - * `video` - Video - * `video_playlist` - Video Playlist - explode: true - style: form - - in: query - name: sortby - schema: - type: string - enum: - - -created_on - - -id - - -last_modified - - -mitcoursenumber - - -readable_id - - -start_date - - -views - - created_on - - id - - last_modified - - mitcoursenumber - - readable_id - - start_date - - views - description: |- - Sort By - - * `id` - Object ID ascending - * `-id` - Object ID descending - * `readable_id` - Readable ID ascending - * `-readable_id` - Readable ID descending - * `last_modified` - Last Modified Date ascending - * `-last_modified` - Last Modified Date descending - * `created_on` - Creation Date ascending - * `-created_on` - CreationDate descending - * `start_date` - Start Date ascending - * `-start_date` - Start Date descending - * `mitcoursenumber` - MIT course number ascending - * `-mitcoursenumber` - MIT course number descending - * `views` - Popularity ascending - * `-views` - Popularity descending - - in: query - name: topic - schema: - type: array - items: - type: string - description: Multiple values may be separated by commas. - explode: false - style: form - tags: - - learningpaths - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/PaginatedLearningPathResourceList' - description: '' - post: - operationId: learningpaths_create - description: Create a learning path - summary: Create - tags: - - learningpaths - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/LearningPathResourceRequest' - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/LearningPathResourceRequest' - multipart/form-data: - schema: - $ref: '#/components/schemas/LearningPathResourceRequest' - required: true - responses: - '201': - content: - application/json: - schema: - $ref: '#/components/schemas/LearningPathResource' - description: '' - /api/v1/learningpaths/{id}/: - get: - operationId: learningpaths_retrieve - description: Retrive a single learning path - summary: Retrieve - parameters: - - in: path - name: id - schema: - type: integer - description: A unique integer value identifying this learning resource. - required: true - tags: - - learningpaths - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/LearningPathResource' - description: '' - patch: - operationId: learningpaths_partial_update - description: Update individual fields of a learning path - summary: Update - parameters: - - in: path - name: id - schema: - type: integer - description: A unique integer value identifying this learning resource. - required: true - tags: - - learningpaths - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/PatchedLearningPathResourceRequest' - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/PatchedLearningPathResourceRequest' - multipart/form-data: - schema: - $ref: '#/components/schemas/PatchedLearningPathResourceRequest' - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/LearningPathResource' - description: '' - delete: - operationId: learningpaths_destroy - description: Remove a learning path - summary: Destroy - parameters: - - in: path - name: id - schema: - type: integer - description: A unique integer value identifying this learning resource. - required: true - tags: - - learningpaths - responses: - '204': - description: No response body - /api/v1/learningpaths/{learning_resource_id}/items/: - get: - operationId: learningpaths_items_list - description: Get a list of related learning resources for a learning resource. - summary: Nested Learning Resource List - parameters: - - in: path - name: learning_resource_id - schema: - type: integer - description: The learning resource id of the learning path - required: true - - name: limit - required: false - in: query - description: Number of results to return per page. - schema: - type: integer - - name: offset - required: false - in: query - description: The initial index from which to return the results. - schema: - type: integer - - name: sortby - required: false - in: query - description: Which field to use when ordering the results. - schema: - type: string - tags: - - learningpaths - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/PaginatedLearningPathRelationshipList' - description: '' - post: - operationId: learningpaths_items_create - description: Viewset for LearningPath related resources - summary: Learning Path Resource Relationship Add - parameters: - - in: path - name: learning_resource_id - schema: - type: integer - description: The learning resource id of the learning path - required: true - tags: - - learningpaths - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/LearningPathRelationshipRequest' - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/LearningPathRelationshipRequest' - multipart/form-data: - schema: - $ref: '#/components/schemas/LearningPathRelationshipRequest' - required: true - responses: - '201': - content: - application/json: - schema: - $ref: '#/components/schemas/LearningPathRelationship' - description: '' - /api/v1/learningpaths/{learning_resource_id}/items/{id}/: - get: - operationId: learningpaths_items_retrieve - description: Get a singe related learning resource for a learning resource. - summary: Nested Learning Resource Retrieve - parameters: - - in: path - name: id - schema: - type: integer - description: A unique integer value identifying this learning resource relationship. - required: true - - in: path - name: learning_resource_id - schema: - type: integer - description: The learning resource id of the learning path - required: true - tags: - - learningpaths - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/LearningPathRelationship' - description: '' - patch: - operationId: learningpaths_items_partial_update - description: Viewset for LearningPath related resources - summary: Learning Path Resource Relationship Update - parameters: - - in: path - name: id - schema: - type: integer - description: A unique integer value identifying this learning resource relationship. - required: true - - in: path - name: learning_resource_id - schema: - type: integer - description: The learning resource id of the learning path - required: true - tags: - - learningpaths - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/PatchedLearningPathRelationshipRequest' - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/PatchedLearningPathRelationshipRequest' - multipart/form-data: - schema: - $ref: '#/components/schemas/PatchedLearningPathRelationshipRequest' - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/LearningPathRelationship' - description: '' - delete: - operationId: learningpaths_items_destroy - description: Viewset for LearningPath related resources - summary: Learning Path Resource Relationship Remove - parameters: - - in: path - name: id - schema: - type: integer - description: A unique integer value identifying this learning resource relationship. - required: true - - in: path - name: learning_resource_id - schema: - type: integer - description: The learning resource id of the learning path - required: true - tags: - - learningpaths - responses: - '204': - description: No response body - /api/v1/offerors/: - get: - operationId: offerors_list - description: MIT organizations that offer learning resources - summary: List - parameters: - - name: limit - required: false - in: query - description: Number of results to return per page. - schema: - type: integer - - name: offset - required: false - in: query - description: The initial index from which to return the results. - schema: - type: integer - tags: - - offerors - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/PaginatedLearningResourceOfferorList' - description: '' - /api/v1/offerors/{code}/: - get: - operationId: offerors_retrieve - description: MIT organizations that offer learning resources - summary: Retrieve - parameters: - - in: path - name: code - schema: - type: string - description: A unique value identifying this learning resource offeror. - required: true - tags: - - offerors - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/LearningResourceOfferor' - description: '' - /api/v1/platforms/: - get: - operationId: platforms_list - description: Platforms on which learning resources are hosted - summary: List - parameters: - - name: limit - required: false - in: query - description: Number of results to return per page. - schema: - type: integer - - name: offset - required: false - in: query - description: The initial index from which to return the results. - schema: - type: integer - tags: - - platforms - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/PaginatedLearningResourcePlatformList' - description: '' - /api/v1/platforms/{code}/: - get: - operationId: platforms_retrieve - description: Platforms on which learning resources are hosted - summary: Retrieve - parameters: - - in: path - name: code - schema: - type: string - description: A unique value identifying this learning resource platform. - required: true - tags: - - platforms - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/LearningResourcePlatform' - description: '' - /api/v1/podcast_episodes/: - get: - operationId: podcast_episodes_list - description: Get a paginated list of podcast episodes - summary: List - parameters: - - in: query - name: course_feature - schema: - type: array - items: - type: string - description: Multiple values may be separated by commas. - explode: false - style: form - - in: query - name: department - schema: - type: array - items: - type: string - enum: - - '1' - - '10' - - '11' - - '12' - - '14' - - '15' - - '16' - - '17' - - '18' - - '2' - - '20' - - 21A - - 21G - - 21H - - 21L - - 21M - - '22' - - '24' - - '3' - - '4' - - '5' - - '6' - - '7' - - '8' - - '9' - - CC - - CMS-W - - EC - - ES - - ESD - - HST - - IDS - - MAS - - PE - - RES - - STS - - WGS - description: |- - The department that offers learning resources - - * `1` - Civil and Environmental Engineering - * `2` - Mechanical Engineering - * `3` - Materials Science and Engineering - * `4` - Architecture - * `5` - Chemistry - * `6` - Electrical Engineering and Computer Science - * `7` - Biology - * `8` - Physics - * `9` - Brain and Cognitive Sciences - * `10` - Chemical Engineering - * `11` - Urban Studies and Planning - * `12` - Earth, Atmospheric, and Planetary Sciences - * `14` - Economics - * `15` - Sloan School of Management - * `16` - Aeronautics and Astronautics - * `17` - Political Science - * `18` - Mathematics - * `20` - Biological Engineering - * `21A` - Anthropology - * `21G` - Global Studies and Languages - * `21H` - History - * `21L` - Literature - * `21M` - Music and Theater Arts - * `22` - Nuclear Science and Engineering - * `24` - Linguistics and Philosophy - * `CC` - Concourse - * `CMS-W` - Comparative Media Studies/Writing - * `EC` - Edgerton Center - * `ES` - Experimental Study Group - * `ESD` - Engineering Systems Division - * `HST` - Health Sciences and Technology - * `IDS` - Institute for Data, Systems, and Society - * `MAS` - Media Arts and Sciences - * `PE` - Athletics, Physical Education and Recreation - * `RES` - Supplemental Resources - * `STS` - Science, Technology, and Society - * `WGS` - Women's and Gender Studies - explode: true - style: form - - in: query - name: free - schema: - type: boolean - description: The course/program is offered for free - - in: query - name: learning_format - schema: - type: array - items: - type: array - items: - type: string - maxLength: 24 - enum: - - hybrid - - in_person - - online - description: |- - The learning format of course/program resources - - * `online` - Online - * `hybrid` - Hybrid - * `in_person` - In person - explode: true - style: form - - in: query - name: level - schema: - type: array - items: - type: string - enum: - - advanced - - graduate - - high_school - - intermediate - - introductory - - noncredit - - undergraduate - description: |- - The academic level of the resources - - * `undergraduate` - Undergraduate - * `graduate` - Graduate - * `high_school` - High School - * `noncredit` - Non-Credit - * `advanced` - Advanced - * `intermediate` - Intermediate - * `introductory` - Introductory - explode: true - style: form - - name: limit - required: false - in: query - description: Number of results to return per page. - schema: - type: integer - - in: query - name: offered_by - schema: - type: array - items: - type: string - enum: - - bootcamps - - csail - - ctl - - mitpe - - mitx - - ocw - - scc - - see - - xpro - description: |- - The organization that offers a learning resource - - * `mitx` - MITx - * `ocw` - OCW - * `bootcamps` - Bootcamps - * `xpro` - xPRO - * `csail` - CSAIL - * `mitpe` - Professional Education - * `see` - Sloan Executive Education - * `scc` - Schwarzman College of Computing - * `ctl` - Center for Transportation & Logistics - explode: true - style: form - - name: offset - required: false - in: query - description: The initial index from which to return the results. - schema: - type: integer - - in: query - name: platform - schema: - type: array - items: - type: string - enum: - - bootcamps - - csail - - ctl - - edx - - emeritus - - globalalumni - - mitpe - - mitxonline - - ocw - - oll - - podcast - - scc - - see - - simplilearn - - susskind - - whu - - xpro - - youtube - description: |- - The platform on which learning resources are offered - - * `edx` - edX - * `ocw` - OCW - * `oll` - Open Learning Library - * `mitxonline` - MITx Online - * `bootcamps` - Bootcamps - * `xpro` - xPRO - * `csail` - CSAIL - * `mitpe` - Professional Education - * `see` - Sloan Executive Education - * `scc` - Schwarzman College of Computing - * `ctl` - Center for Transportation & Logistics - * `whu` - WHU - * `susskind` - Susskind - * `globalalumni` - Global Alumni - * `simplilearn` - Simplilearn - * `emeritus` - Emeritus - * `podcast` - Podcast - * `youtube` - YouTube - explode: true - style: form - - in: query - name: professional - schema: - type: boolean - - in: query - name: readable_id - schema: - type: array - items: - type: string - description: Multiple values may be separated by commas. - explode: false - style: form - - in: query - name: resource_type - schema: - type: array - items: - type: string - enum: - - course - - learning_path - - podcast - - podcast_episode - - program - - video - - video_playlist - description: |- - The type of learning resource - - * `course` - Course - * `program` - Program - * `learning_path` - Learning Path - * `podcast` - Podcast - * `podcast_episode` - Podcast Episode - * `video` - Video - * `video_playlist` - Video Playlist - explode: true - style: form - - in: query - name: sortby - schema: - type: string - enum: - - -created_on - - -id - - -last_modified - - -mitcoursenumber - - -readable_id - - -start_date - - -views - - created_on - - id - - last_modified - - mitcoursenumber - - readable_id - - start_date - - views - description: |- - Sort By - - * `id` - Object ID ascending - * `-id` - Object ID descending - * `readable_id` - Readable ID ascending - * `-readable_id` - Readable ID descending - * `last_modified` - Last Modified Date ascending - * `-last_modified` - Last Modified Date descending - * `created_on` - Creation Date ascending - * `-created_on` - CreationDate descending - * `start_date` - Start Date ascending - * `-start_date` - Start Date descending - * `mitcoursenumber` - MIT course number ascending - * `-mitcoursenumber` - MIT course number descending - * `views` - Popularity ascending - * `-views` - Popularity descending - - in: query - name: topic - schema: - type: array - items: - type: string - description: Multiple values may be separated by commas. - explode: false - style: form - tags: - - podcast_episodes - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/PaginatedPodcastEpisodeResourceList' - description: '' - /api/v1/podcast_episodes/{id}/: - get: - operationId: podcast_episodes_retrieve - description: Retrieve a single podcast episode - summary: Retrieve - parameters: - - in: path - name: id - schema: - type: integer - description: A unique integer value identifying this learning resource. - required: true - tags: - - podcast_episodes - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/PodcastEpisodeResource' - description: '' - /api/v1/podcasts/: - get: - operationId: podcasts_list - description: Get a paginated list of podcasts - summary: List - parameters: - - in: query - name: course_feature - schema: - type: array - items: - type: string - description: Multiple values may be separated by commas. - explode: false - style: form - - in: query - name: department - schema: - type: array - items: - type: string - enum: - - '1' - - '10' - - '11' - - '12' - - '14' - - '15' - - '16' - - '17' - - '18' - - '2' - - '20' - - 21A - - 21G - - 21H - - 21L - - 21M - - '22' - - '24' - - '3' - - '4' - - '5' - - '6' - - '7' - - '8' - - '9' - - CC - - CMS-W - - EC - - ES - - ESD - - HST - - IDS - - MAS - - PE - - RES - - STS - - WGS - description: |- - The department that offers learning resources - - * `1` - Civil and Environmental Engineering - * `2` - Mechanical Engineering - * `3` - Materials Science and Engineering - * `4` - Architecture - * `5` - Chemistry - * `6` - Electrical Engineering and Computer Science - * `7` - Biology - * `8` - Physics - * `9` - Brain and Cognitive Sciences - * `10` - Chemical Engineering - * `11` - Urban Studies and Planning - * `12` - Earth, Atmospheric, and Planetary Sciences - * `14` - Economics - * `15` - Sloan School of Management - * `16` - Aeronautics and Astronautics - * `17` - Political Science - * `18` - Mathematics - * `20` - Biological Engineering - * `21A` - Anthropology - * `21G` - Global Studies and Languages - * `21H` - History - * `21L` - Literature - * `21M` - Music and Theater Arts - * `22` - Nuclear Science and Engineering - * `24` - Linguistics and Philosophy - * `CC` - Concourse - * `CMS-W` - Comparative Media Studies/Writing - * `EC` - Edgerton Center - * `ES` - Experimental Study Group - * `ESD` - Engineering Systems Division - * `HST` - Health Sciences and Technology - * `IDS` - Institute for Data, Systems, and Society - * `MAS` - Media Arts and Sciences - * `PE` - Athletics, Physical Education and Recreation - * `RES` - Supplemental Resources - * `STS` - Science, Technology, and Society - * `WGS` - Women's and Gender Studies - explode: true - style: form - - in: query - name: free - schema: - type: boolean - description: The course/program is offered for free - - in: query - name: learning_format - schema: - type: array - items: - type: array - items: - type: string - maxLength: 24 - enum: - - hybrid - - in_person - - online - description: |- - The learning format of course/program resources - - * `online` - Online - * `hybrid` - Hybrid - * `in_person` - In person - explode: true - style: form - - in: query - name: level - schema: - type: array - items: - type: string - enum: - - advanced - - graduate - - high_school - - intermediate - - introductory - - noncredit - - undergraduate - description: |- - The academic level of the resources - - * `undergraduate` - Undergraduate - * `graduate` - Graduate - * `high_school` - High School - * `noncredit` - Non-Credit - * `advanced` - Advanced - * `intermediate` - Intermediate - * `introductory` - Introductory - explode: true - style: form - - name: limit - required: false - in: query - description: Number of results to return per page. - schema: - type: integer - - in: query - name: offered_by - schema: - type: array - items: - type: string - enum: - - bootcamps - - csail - - ctl - - mitpe - - mitx - - ocw - - scc - - see - - xpro - description: |- - The organization that offers a learning resource - - * `mitx` - MITx - * `ocw` - OCW - * `bootcamps` - Bootcamps - * `xpro` - xPRO - * `csail` - CSAIL - * `mitpe` - Professional Education - * `see` - Sloan Executive Education - * `scc` - Schwarzman College of Computing - * `ctl` - Center for Transportation & Logistics - explode: true - style: form - - name: offset - required: false - in: query - description: The initial index from which to return the results. - schema: - type: integer - - in: query - name: platform - schema: - type: array - items: - type: string - enum: - - bootcamps - - csail - - ctl - - edx - - emeritus - - globalalumni - - mitpe - - mitxonline - - ocw - - oll - - podcast - - scc - - see - - simplilearn - - susskind - - whu - - xpro - - youtube - description: |- - The platform on which learning resources are offered - - * `edx` - edX - * `ocw` - OCW - * `oll` - Open Learning Library - * `mitxonline` - MITx Online - * `bootcamps` - Bootcamps - * `xpro` - xPRO - * `csail` - CSAIL - * `mitpe` - Professional Education - * `see` - Sloan Executive Education - * `scc` - Schwarzman College of Computing - * `ctl` - Center for Transportation & Logistics - * `whu` - WHU - * `susskind` - Susskind - * `globalalumni` - Global Alumni - * `simplilearn` - Simplilearn - * `emeritus` - Emeritus - * `podcast` - Podcast - * `youtube` - YouTube - explode: true - style: form - - in: query - name: professional - schema: - type: boolean - - in: query - name: readable_id - schema: - type: array - items: - type: string - description: Multiple values may be separated by commas. - explode: false - style: form - - in: query - name: resource_type - schema: - type: array - items: - type: string - enum: - - course - - learning_path - - podcast - - podcast_episode - - program - - video - - video_playlist - description: |- - The type of learning resource - - * `course` - Course - * `program` - Program - * `learning_path` - Learning Path - * `podcast` - Podcast - * `podcast_episode` - Podcast Episode - * `video` - Video - * `video_playlist` - Video Playlist - explode: true - style: form - - in: query - name: sortby - schema: - type: string - enum: - - -created_on - - -id - - -last_modified - - -mitcoursenumber - - -readable_id - - -start_date - - -views - - created_on - - id - - last_modified - - mitcoursenumber - - readable_id - - start_date - - views - description: |- - Sort By - - * `id` - Object ID ascending - * `-id` - Object ID descending - * `readable_id` - Readable ID ascending - * `-readable_id` - Readable ID descending - * `last_modified` - Last Modified Date ascending - * `-last_modified` - Last Modified Date descending - * `created_on` - Creation Date ascending - * `-created_on` - CreationDate descending - * `start_date` - Start Date ascending - * `-start_date` - Start Date descending - * `mitcoursenumber` - MIT course number ascending - * `-mitcoursenumber` - MIT course number descending - * `views` - Popularity ascending - * `-views` - Popularity descending - - in: query - name: topic - schema: - type: array - items: - type: string - description: Multiple values may be separated by commas. - explode: false - style: form - tags: - - podcasts - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/PaginatedPodcastResourceList' - description: '' - /api/v1/podcasts/{id}/: - get: - operationId: podcasts_retrieve - description: Retrieve a single podcast - summary: Retrieve - parameters: - - in: path - name: id - schema: - type: integer - description: A unique integer value identifying this learning resource. - required: true - tags: - - podcasts - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/PodcastResource' - description: '' - /api/v1/podcasts/{learning_resource_id}/items/: - get: - operationId: podcasts_items_list - description: Get a list of related learning resources for a learning resource. - summary: Nested Learning Resource List - parameters: - - in: path - name: learning_resource_id - schema: - type: integer - description: id of the parent learning resource - required: true - - name: limit - required: false - in: query - description: Number of results to return per page. - schema: - type: integer - - name: offset - required: false - in: query - description: The initial index from which to return the results. - schema: - type: integer - - name: sortby - required: false - in: query - description: Which field to use when ordering the results. - schema: - type: string - tags: - - podcasts - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/PaginatedLearningResourceRelationshipList' - description: '' - /api/v1/podcasts/{learning_resource_id}/items/{id}/: - get: - operationId: podcasts_items_retrieve - description: Get a singe related learning resource for a learning resource. - summary: Nested Learning Resource Retrieve - parameters: - - in: path - name: id - schema: - type: integer - description: A unique integer value identifying this learning resource relationship. - required: true - - in: path - name: learning_resource_id - schema: - type: integer - description: id of the parent learning resource - required: true - tags: - - podcasts - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/LearningResourceRelationship' - description: '' - /api/v1/program_letters/{id}/: - get: - operationId: program_letters_retrieve - description: Retrieve a single program letter. - summary: Retrieve - parameters: - - in: path - name: id - schema: - type: string - required: true - tags: - - program_letters - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/ProgramLetter' - description: '' - /api/v1/programs/: - get: - operationId: programs_list - description: Get a paginated list of programs - summary: List - parameters: - - in: query - name: course_feature - schema: - type: array - items: - type: string - description: Multiple values may be separated by commas. - explode: false - style: form - - in: query - name: department - schema: - type: array - items: - type: string - enum: - - '1' - - '10' - - '11' - - '12' - - '14' - - '15' - - '16' - - '17' - - '18' - - '2' - - '20' - - 21A - - 21G - - 21H - - 21L - - 21M - - '22' - - '24' - - '3' - - '4' - - '5' - - '6' - - '7' - - '8' - - '9' - - CC - - CMS-W - - EC - - ES - - ESD - - HST - - IDS - - MAS - - PE - - RES - - STS - - WGS - description: |- - The department that offers learning resources - - * `1` - Civil and Environmental Engineering - * `2` - Mechanical Engineering - * `3` - Materials Science and Engineering - * `4` - Architecture - * `5` - Chemistry - * `6` - Electrical Engineering and Computer Science - * `7` - Biology - * `8` - Physics - * `9` - Brain and Cognitive Sciences - * `10` - Chemical Engineering - * `11` - Urban Studies and Planning - * `12` - Earth, Atmospheric, and Planetary Sciences - * `14` - Economics - * `15` - Sloan School of Management - * `16` - Aeronautics and Astronautics - * `17` - Political Science - * `18` - Mathematics - * `20` - Biological Engineering - * `21A` - Anthropology - * `21G` - Global Studies and Languages - * `21H` - History - * `21L` - Literature - * `21M` - Music and Theater Arts - * `22` - Nuclear Science and Engineering - * `24` - Linguistics and Philosophy - * `CC` - Concourse - * `CMS-W` - Comparative Media Studies/Writing - * `EC` - Edgerton Center - * `ES` - Experimental Study Group - * `ESD` - Engineering Systems Division - * `HST` - Health Sciences and Technology - * `IDS` - Institute for Data, Systems, and Society - * `MAS` - Media Arts and Sciences - * `PE` - Athletics, Physical Education and Recreation - * `RES` - Supplemental Resources - * `STS` - Science, Technology, and Society - * `WGS` - Women's and Gender Studies - explode: true - style: form - - in: query - name: free - schema: - type: boolean - description: The course/program is offered for free - - in: query - name: learning_format - schema: - type: array - items: - type: array - items: - type: string - maxLength: 24 - enum: - - hybrid - - in_person - - online - description: |- - The learning format of course/program resources - - * `online` - Online - * `hybrid` - Hybrid - * `in_person` - In person - explode: true - style: form - - in: query - name: level - schema: - type: array - items: - type: string - enum: - - advanced - - graduate - - high_school - - intermediate - - introductory - - noncredit - - undergraduate - description: |- - The academic level of the resources - - * `undergraduate` - Undergraduate - * `graduate` - Graduate - * `high_school` - High School - * `noncredit` - Non-Credit - * `advanced` - Advanced - * `intermediate` - Intermediate - * `introductory` - Introductory - explode: true - style: form - - name: limit - required: false - in: query - description: Number of results to return per page. - schema: - type: integer - - in: query - name: offered_by - schema: - type: array - items: - type: string - enum: - - bootcamps - - csail - - ctl - - mitpe - - mitx - - ocw - - scc - - see - - xpro - description: |- - The organization that offers a learning resource - - * `mitx` - MITx - * `ocw` - OCW - * `bootcamps` - Bootcamps - * `xpro` - xPRO - * `csail` - CSAIL - * `mitpe` - Professional Education - * `see` - Sloan Executive Education - * `scc` - Schwarzman College of Computing - * `ctl` - Center for Transportation & Logistics - explode: true - style: form - - name: offset - required: false - in: query - description: The initial index from which to return the results. - schema: - type: integer - - in: query - name: platform - schema: - type: array - items: - type: string - enum: - - bootcamps - - csail - - ctl - - edx - - emeritus - - globalalumni - - mitpe - - mitxonline - - ocw - - oll - - podcast - - scc - - see - - simplilearn - - susskind - - whu - - xpro - - youtube - description: |- - The platform on which learning resources are offered - - * `edx` - edX - * `ocw` - OCW - * `oll` - Open Learning Library - * `mitxonline` - MITx Online - * `bootcamps` - Bootcamps - * `xpro` - xPRO - * `csail` - CSAIL - * `mitpe` - Professional Education - * `see` - Sloan Executive Education - * `scc` - Schwarzman College of Computing - * `ctl` - Center for Transportation & Logistics - * `whu` - WHU - * `susskind` - Susskind - * `globalalumni` - Global Alumni - * `simplilearn` - Simplilearn - * `emeritus` - Emeritus - * `podcast` - Podcast - * `youtube` - YouTube - explode: true - style: form - - in: query - name: professional - schema: - type: boolean - - in: query - name: readable_id - schema: - type: array - items: - type: string - description: Multiple values may be separated by commas. - explode: false - style: form - - in: query - name: resource_type - schema: - type: array - items: - type: string - enum: - - course - - learning_path - - podcast - - podcast_episode - - program - - video - - video_playlist - description: |- - The type of learning resource - - * `course` - Course - * `program` - Program - * `learning_path` - Learning Path - * `podcast` - Podcast - * `podcast_episode` - Podcast Episode - * `video` - Video - * `video_playlist` - Video Playlist - explode: true - style: form - - in: query - name: sortby - schema: - type: string - enum: - - -created_on - - -id - - -last_modified - - -mitcoursenumber - - -readable_id - - -start_date - - -views - - created_on - - id - - last_modified - - mitcoursenumber - - readable_id - - start_date - - views - description: |- - Sort By - - * `id` - Object ID ascending - * `-id` - Object ID descending - * `readable_id` - Readable ID ascending - * `-readable_id` - Readable ID descending - * `last_modified` - Last Modified Date ascending - * `-last_modified` - Last Modified Date descending - * `created_on` - Creation Date ascending - * `-created_on` - CreationDate descending - * `start_date` - Start Date ascending - * `-start_date` - Start Date descending - * `mitcoursenumber` - MIT course number ascending - * `-mitcoursenumber` - MIT course number descending - * `views` - Popularity ascending - * `-views` - Popularity descending - - in: query - name: topic - schema: - type: array - items: - type: string - description: Multiple values may be separated by commas. - explode: false - style: form - tags: - - programs - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/PaginatedProgramResourceList' - description: '' - /api/v1/programs/{id}/: - get: - operationId: programs_retrieve - description: Retrieve a single program - summary: Retrieve - parameters: - - in: path - name: id - schema: - type: integer - description: A unique integer value identifying this learning resource. - required: true - tags: - - programs - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/ProgramResource' - description: '' - /api/v1/programs/new/: - get: - operationId: programs_new_list - description: Get a paginated list of popular Programs. - summary: List New - parameters: - - in: query - name: course_feature - schema: - type: array - items: - type: string - description: Multiple values may be separated by commas. - explode: false - style: form - - in: query - name: department - schema: - type: array - items: - type: string - enum: - - '1' - - '10' - - '11' - - '12' - - '14' - - '15' - - '16' - - '17' - - '18' - - '2' - - '20' - - 21A - - 21G - - 21H - - 21L - - 21M - - '22' - - '24' - - '3' - - '4' - - '5' - - '6' - - '7' - - '8' - - '9' - - CC - - CMS-W - - EC - - ES - - ESD - - HST - - IDS - - MAS - - PE - - RES - - STS - - WGS - description: |- - The department that offers learning resources - - * `1` - Civil and Environmental Engineering - * `2` - Mechanical Engineering - * `3` - Materials Science and Engineering - * `4` - Architecture - * `5` - Chemistry - * `6` - Electrical Engineering and Computer Science - * `7` - Biology - * `8` - Physics - * `9` - Brain and Cognitive Sciences - * `10` - Chemical Engineering - * `11` - Urban Studies and Planning - * `12` - Earth, Atmospheric, and Planetary Sciences - * `14` - Economics - * `15` - Sloan School of Management - * `16` - Aeronautics and Astronautics - * `17` - Political Science - * `18` - Mathematics - * `20` - Biological Engineering - * `21A` - Anthropology - * `21G` - Global Studies and Languages - * `21H` - History - * `21L` - Literature - * `21M` - Music and Theater Arts - * `22` - Nuclear Science and Engineering - * `24` - Linguistics and Philosophy - * `CC` - Concourse - * `CMS-W` - Comparative Media Studies/Writing - * `EC` - Edgerton Center - * `ES` - Experimental Study Group - * `ESD` - Engineering Systems Division - * `HST` - Health Sciences and Technology - * `IDS` - Institute for Data, Systems, and Society - * `MAS` - Media Arts and Sciences - * `PE` - Athletics, Physical Education and Recreation - * `RES` - Supplemental Resources - * `STS` - Science, Technology, and Society - * `WGS` - Women's and Gender Studies - explode: true - style: form - - in: query - name: free - schema: - type: boolean - description: The course/program is offered for free - - in: query - name: learning_format - schema: - type: array - items: - type: array - items: - type: string - maxLength: 24 - enum: - - hybrid - - in_person - - online - description: |- - The learning format of course/program resources - - * `online` - Online - * `hybrid` - Hybrid - * `in_person` - In person - explode: true - style: form - - in: query - name: level - schema: - type: array - items: - type: string - enum: - - advanced - - graduate - - high_school - - intermediate - - introductory - - noncredit - - undergraduate - description: |- - The academic level of the resources - - * `undergraduate` - Undergraduate - * `graduate` - Graduate - * `high_school` - High School - * `noncredit` - Non-Credit - * `advanced` - Advanced - * `intermediate` - Intermediate - * `introductory` - Introductory - explode: true - style: form - - name: limit - required: false - in: query - description: Number of results to return per page. - schema: - type: integer - - in: query - name: offered_by - schema: - type: array - items: - type: string - enum: - - bootcamps - - csail - - ctl - - mitpe - - mitx - - ocw - - scc - - see - - xpro - description: |- - The organization that offers a learning resource - - * `mitx` - MITx - * `ocw` - OCW - * `bootcamps` - Bootcamps - * `xpro` - xPRO - * `csail` - CSAIL - * `mitpe` - Professional Education - * `see` - Sloan Executive Education - * `scc` - Schwarzman College of Computing - * `ctl` - Center for Transportation & Logistics - explode: true - style: form - - name: offset - required: false - in: query - description: The initial index from which to return the results. - schema: - type: integer - - in: query - name: platform - schema: - type: array - items: - type: string - enum: - - bootcamps - - csail - - ctl - - edx - - emeritus - - globalalumni - - mitpe - - mitxonline - - ocw - - oll - - podcast - - scc - - see - - simplilearn - - susskind - - whu - - xpro - - youtube - description: |- - The platform on which learning resources are offered - - * `edx` - edX - * `ocw` - OCW - * `oll` - Open Learning Library - * `mitxonline` - MITx Online - * `bootcamps` - Bootcamps - * `xpro` - xPRO - * `csail` - CSAIL - * `mitpe` - Professional Education - * `see` - Sloan Executive Education - * `scc` - Schwarzman College of Computing - * `ctl` - Center for Transportation & Logistics - * `whu` - WHU - * `susskind` - Susskind - * `globalalumni` - Global Alumni - * `simplilearn` - Simplilearn - * `emeritus` - Emeritus - * `podcast` - Podcast - * `youtube` - YouTube - explode: true - style: form - - in: query - name: professional - schema: - type: boolean - - in: query - name: readable_id - schema: - type: array - items: - type: string - description: Multiple values may be separated by commas. - explode: false - style: form - - in: query - name: resource_type - schema: - type: array - items: - type: string - enum: - - course - - learning_path - - podcast - - podcast_episode - - program - - video - - video_playlist - description: |- - The type of learning resource - - * `course` - Course - * `program` - Program - * `learning_path` - Learning Path - * `podcast` - Podcast - * `podcast_episode` - Podcast Episode - * `video` - Video - * `video_playlist` - Video Playlist - explode: true - style: form - - in: query - name: sortby - schema: - type: string - enum: - - -created_on - - -id - - -last_modified - - -mitcoursenumber - - -readable_id - - -start_date - - -views - - created_on - - id - - last_modified - - mitcoursenumber - - readable_id - - start_date - - views - description: |- - Sort By - - * `id` - Object ID ascending - * `-id` - Object ID descending - * `readable_id` - Readable ID ascending - * `-readable_id` - Readable ID descending - * `last_modified` - Last Modified Date ascending - * `-last_modified` - Last Modified Date descending - * `created_on` - Creation Date ascending - * `-created_on` - CreationDate descending - * `start_date` - Start Date ascending - * `-start_date` - Start Date descending - * `mitcoursenumber` - MIT course number ascending - * `-mitcoursenumber` - MIT course number descending - * `views` - Popularity ascending - * `-views` - Popularity descending - - in: query - name: topic - schema: - type: array - items: - type: string - description: Multiple values may be separated by commas. - explode: false - style: form - tags: - - programs - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/PaginatedProgramResourceList' - description: '' - /api/v1/programs/popular/: - get: - operationId: programs_popular_retrieve - description: Retrieve a list of popular resources - summary: List Popular - tags: - - programs - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/ProgramResource' - description: '' - /api/v1/programs/upcoming/: - get: - operationId: programs_upcoming_list - description: Get a paginated list of upcoming Programs. - summary: List Upcoming - parameters: - - in: query - name: course_feature - schema: - type: array - items: - type: string - description: Multiple values may be separated by commas. - explode: false - style: form - - in: query - name: department - schema: - type: array - items: - type: string - enum: - - '1' - - '10' - - '11' - - '12' - - '14' - - '15' - - '16' - - '17' - - '18' - - '2' - - '20' - - 21A - - 21G - - 21H - - 21L - - 21M - - '22' - - '24' - - '3' - - '4' - - '5' - - '6' - - '7' - - '8' - - '9' - - CC - - CMS-W - - EC - - ES - - ESD - - HST - - IDS - - MAS - - PE - - RES - - STS - - WGS - description: |- - The department that offers learning resources - - * `1` - Civil and Environmental Engineering - * `2` - Mechanical Engineering - * `3` - Materials Science and Engineering - * `4` - Architecture - * `5` - Chemistry - * `6` - Electrical Engineering and Computer Science - * `7` - Biology - * `8` - Physics - * `9` - Brain and Cognitive Sciences - * `10` - Chemical Engineering - * `11` - Urban Studies and Planning - * `12` - Earth, Atmospheric, and Planetary Sciences - * `14` - Economics - * `15` - Sloan School of Management - * `16` - Aeronautics and Astronautics - * `17` - Political Science - * `18` - Mathematics - * `20` - Biological Engineering - * `21A` - Anthropology - * `21G` - Global Studies and Languages - * `21H` - History - * `21L` - Literature - * `21M` - Music and Theater Arts - * `22` - Nuclear Science and Engineering - * `24` - Linguistics and Philosophy - * `CC` - Concourse - * `CMS-W` - Comparative Media Studies/Writing - * `EC` - Edgerton Center - * `ES` - Experimental Study Group - * `ESD` - Engineering Systems Division - * `HST` - Health Sciences and Technology - * `IDS` - Institute for Data, Systems, and Society - * `MAS` - Media Arts and Sciences - * `PE` - Athletics, Physical Education and Recreation - * `RES` - Supplemental Resources - * `STS` - Science, Technology, and Society - * `WGS` - Women's and Gender Studies - explode: true - style: form - - in: query - name: free - schema: - type: boolean - description: The course/program is offered for free - - in: query - name: learning_format - schema: - type: array - items: - type: array - items: - type: string - maxLength: 24 - enum: - - hybrid - - in_person - - online - description: |- - The learning format of course/program resources - - * `online` - Online - * `hybrid` - Hybrid - * `in_person` - In person - explode: true - style: form - - in: query - name: level - schema: - type: array - items: - type: string - enum: - - advanced - - graduate - - high_school - - intermediate - - introductory - - noncredit - - undergraduate - description: |- - The academic level of the resources - - * `undergraduate` - Undergraduate - * `graduate` - Graduate - * `high_school` - High School - * `noncredit` - Non-Credit - * `advanced` - Advanced - * `intermediate` - Intermediate - * `introductory` - Introductory - explode: true - style: form - - name: limit - required: false - in: query - description: Number of results to return per page. - schema: - type: integer - - in: query - name: offered_by - schema: - type: array - items: - type: string - enum: - - bootcamps - - csail - - ctl - - mitpe - - mitx - - ocw - - scc - - see - - xpro - description: |- - The organization that offers a learning resource - - * `mitx` - MITx - * `ocw` - OCW - * `bootcamps` - Bootcamps - * `xpro` - xPRO - * `csail` - CSAIL - * `mitpe` - Professional Education - * `see` - Sloan Executive Education - * `scc` - Schwarzman College of Computing - * `ctl` - Center for Transportation & Logistics - explode: true - style: form - - name: offset - required: false - in: query - description: The initial index from which to return the results. - schema: - type: integer - - in: query - name: platform - schema: - type: array - items: - type: string - enum: - - bootcamps - - csail - - ctl - - edx - - emeritus - - globalalumni - - mitpe - - mitxonline - - ocw - - oll - - podcast - - scc - - see - - simplilearn - - susskind - - whu - - xpro - - youtube - description: |- - The platform on which learning resources are offered - - * `edx` - edX - * `ocw` - OCW - * `oll` - Open Learning Library - * `mitxonline` - MITx Online - * `bootcamps` - Bootcamps - * `xpro` - xPRO - * `csail` - CSAIL - * `mitpe` - Professional Education - * `see` - Sloan Executive Education - * `scc` - Schwarzman College of Computing - * `ctl` - Center for Transportation & Logistics - * `whu` - WHU - * `susskind` - Susskind - * `globalalumni` - Global Alumni - * `simplilearn` - Simplilearn - * `emeritus` - Emeritus - * `podcast` - Podcast - * `youtube` - YouTube - explode: true - style: form - - in: query - name: professional - schema: - type: boolean - - in: query - name: readable_id - schema: - type: array - items: - type: string - description: Multiple values may be separated by commas. - explode: false - style: form - - in: query - name: resource_type - schema: - type: array - items: - type: string - enum: - - course - - learning_path - - podcast - - podcast_episode - - program - - video - - video_playlist - description: |- - The type of learning resource - - * `course` - Course - * `program` - Program - * `learning_path` - Learning Path - * `podcast` - Podcast - * `podcast_episode` - Podcast Episode - * `video` - Video - * `video_playlist` - Video Playlist - explode: true - style: form - - in: query - name: sortby - schema: - type: string - enum: - - -created_on - - -id - - -last_modified - - -mitcoursenumber - - -readable_id - - -start_date - - -views - - created_on - - id - - last_modified - - mitcoursenumber - - readable_id - - start_date - - views - description: |- - Sort By - - * `id` - Object ID ascending - * `-id` - Object ID descending - * `readable_id` - Readable ID ascending - * `-readable_id` - Readable ID descending - * `last_modified` - Last Modified Date ascending - * `-last_modified` - Last Modified Date descending - * `created_on` - Creation Date ascending - * `-created_on` - CreationDate descending - * `start_date` - Start Date ascending - * `-start_date` - Start Date descending - * `mitcoursenumber` - MIT course number ascending - * `-mitcoursenumber` - MIT course number descending - * `views` - Popularity ascending - * `-views` - Popularity descending - - in: query - name: topic - schema: - type: array - items: - type: string - description: Multiple values may be separated by commas. - explode: false - style: form - tags: - - programs - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/PaginatedProgramResourceList' - description: '' - /api/v1/schools/: - get: - operationId: schools_list - description: MIT schools - summary: List - parameters: - - name: limit - required: false - in: query - description: Number of results to return per page. - schema: - type: integer - - name: offset - required: false - in: query - description: The initial index from which to return the results. - schema: - type: integer - tags: - - schools - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/PaginatedLearningResourceSchoolList' - description: '' - /api/v1/schools/{id}/: - get: - operationId: schools_retrieve - description: MIT schools - summary: Retrieve - parameters: - - in: path - name: id - schema: - type: integer - description: A unique integer value identifying this learning resource school. - required: true - tags: - - schools - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/LearningResourceSchool' - description: '' - /api/v1/topics/: - get: - operationId: topics_list - description: Topics covered by learning resources - summary: List - parameters: - - name: limit - required: false - in: query - description: Number of results to return per page. - schema: - type: integer - - name: offset - required: false - in: query - description: The initial index from which to return the results. - schema: - type: integer - tags: - - topics - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/PaginatedLearningResourceTopicList' - description: '' - /api/v1/topics/{id}/: - get: - operationId: topics_retrieve - description: Topics covered by learning resources - summary: Retrieve - parameters: - - in: path - name: id - schema: - type: integer - description: A unique integer value identifying this learning resource topic. - required: true - tags: - - topics - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/LearningResourceTopic' - description: '' - /api/v1/userlists/: - get: - operationId: userlists_list - description: Viewset for UserLists - summary: List - parameters: - - name: limit - required: false - in: query - description: Number of results to return per page. - schema: - type: integer - - name: offset - required: false - in: query - description: The initial index from which to return the results. - schema: - type: integer - tags: - - userlists - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/PaginatedUserListList' - description: '' - post: - operationId: userlists_create - description: Viewset for UserLists - summary: Create - tags: - - userlists - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/UserListRequest' - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/UserListRequest' - multipart/form-data: - schema: - $ref: '#/components/schemas/UserListRequest' - required: true - responses: - '201': - content: - application/json: - schema: - $ref: '#/components/schemas/UserList' - description: '' - /api/v1/userlists/{id}/: - get: - operationId: userlists_retrieve - description: Viewset for UserLists - summary: Retrieve - parameters: - - in: path - name: id - schema: - type: integer - description: A unique integer value identifying this user list. - required: true - tags: - - userlists - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/UserList' - description: '' - patch: - operationId: userlists_partial_update - description: Viewset for UserLists - summary: Update - parameters: - - in: path - name: id - schema: - type: integer - description: A unique integer value identifying this user list. - required: true - tags: - - userlists - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/PatchedUserListRequest' - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/PatchedUserListRequest' - multipart/form-data: - schema: - $ref: '#/components/schemas/PatchedUserListRequest' - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/UserList' - description: '' - delete: - operationId: userlists_destroy - description: Viewset for UserLists - summary: Destroy - parameters: - - in: path - name: id - schema: - type: integer - description: A unique integer value identifying this user list. - required: true - tags: - - userlists - responses: - '204': - description: No response body - /api/v1/userlists/{userlist_id}/items/: - get: - operationId: userlists_items_list - description: Viewset for UserListRelationships - summary: User List Resources List - parameters: - - name: limit - required: false - in: query - description: Number of results to return per page. - schema: - type: integer - - name: offset - required: false - in: query - description: The initial index from which to return the results. - schema: - type: integer - - in: path - name: userlist_id - schema: - type: integer - description: id of the parent user list - required: true - tags: - - userlists - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/PaginatedUserListRelationshipList' - description: '' - post: - operationId: userlists_items_create - description: Viewset for UserListRelationships - summary: User List Resource Relationship Add - parameters: - - in: path - name: userlist_id - schema: - type: integer - description: id of the parent user list - required: true - tags: - - userlists - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/UserListRelationshipRequest' - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/UserListRelationshipRequest' - multipart/form-data: - schema: - $ref: '#/components/schemas/UserListRelationshipRequest' - required: true - responses: - '201': - content: - application/json: - schema: - $ref: '#/components/schemas/UserListRelationship' - description: '' - /api/v1/userlists/{userlist_id}/items/{id}/: - get: - operationId: userlists_items_retrieve - description: Viewset for UserListRelationships - summary: User List Resources Retrieve - parameters: - - in: path - name: id - schema: - type: integer - description: A unique integer value identifying this user list relationship. - required: true - - in: path - name: userlist_id - schema: - type: integer - description: id of the parent user list - required: true - tags: - - userlists - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/UserListRelationship' - description: '' - patch: - operationId: userlists_items_partial_update - description: Viewset for UserListRelationships - summary: User List Resource Relationship Update - parameters: - - in: path - name: id - schema: - type: integer - description: A unique integer value identifying this user list relationship. - required: true - - in: path - name: userlist_id - schema: - type: integer - description: id of the parent user list - required: true - tags: - - userlists - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/PatchedUserListRelationshipRequest' - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/PatchedUserListRelationshipRequest' - multipart/form-data: - schema: - $ref: '#/components/schemas/PatchedUserListRelationshipRequest' - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/UserListRelationship' - description: '' - delete: - operationId: userlists_items_destroy - description: Viewset for UserListRelationships - summary: User List Resource Relationship Remove - parameters: - - in: path - name: id - schema: - type: integer - description: A unique integer value identifying this user list relationship. - required: true - - in: path - name: userlist_id - schema: - type: integer - description: id of the parent user list - required: true - tags: - - userlists - responses: - '204': - description: No response body - /api/v1/video_playlists/: - get: - operationId: video_playlists_list - description: Get a paginated list of video playlists - summary: List - parameters: - - in: query - name: course_feature - schema: - type: array - items: - type: string - description: Multiple values may be separated by commas. - explode: false - style: form - - in: query - name: department - schema: - type: array - items: - type: string - enum: - - '1' - - '10' - - '11' - - '12' - - '14' - - '15' - - '16' - - '17' - - '18' - - '2' - - '20' - - 21A - - 21G - - 21H - - 21L - - 21M - - '22' - - '24' - - '3' - - '4' - - '5' - - '6' - - '7' - - '8' - - '9' - - CC - - CMS-W - - EC - - ES - - ESD - - HST - - IDS - - MAS - - PE - - RES - - STS - - WGS - description: |- - The department that offers learning resources - - * `1` - Civil and Environmental Engineering - * `2` - Mechanical Engineering - * `3` - Materials Science and Engineering - * `4` - Architecture - * `5` - Chemistry - * `6` - Electrical Engineering and Computer Science - * `7` - Biology - * `8` - Physics - * `9` - Brain and Cognitive Sciences - * `10` - Chemical Engineering - * `11` - Urban Studies and Planning - * `12` - Earth, Atmospheric, and Planetary Sciences - * `14` - Economics - * `15` - Sloan School of Management - * `16` - Aeronautics and Astronautics - * `17` - Political Science - * `18` - Mathematics - * `20` - Biological Engineering - * `21A` - Anthropology - * `21G` - Global Studies and Languages - * `21H` - History - * `21L` - Literature - * `21M` - Music and Theater Arts - * `22` - Nuclear Science and Engineering - * `24` - Linguistics and Philosophy - * `CC` - Concourse - * `CMS-W` - Comparative Media Studies/Writing - * `EC` - Edgerton Center - * `ES` - Experimental Study Group - * `ESD` - Engineering Systems Division - * `HST` - Health Sciences and Technology - * `IDS` - Institute for Data, Systems, and Society - * `MAS` - Media Arts and Sciences - * `PE` - Athletics, Physical Education and Recreation - * `RES` - Supplemental Resources - * `STS` - Science, Technology, and Society - * `WGS` - Women's and Gender Studies - explode: true - style: form - - in: query - name: free - schema: - type: boolean - description: The course/program is offered for free - - in: query - name: learning_format - schema: - type: array - items: - type: array - items: - type: string - maxLength: 24 - enum: - - hybrid - - in_person - - online - description: |- - The learning format of course/program resources - - * `online` - Online - * `hybrid` - Hybrid - * `in_person` - In person - explode: true - style: form - - in: query - name: level - schema: - type: array - items: - type: string - enum: - - advanced - - graduate - - high_school - - intermediate - - introductory - - noncredit - - undergraduate - description: |- - The academic level of the resources - - * `undergraduate` - Undergraduate - * `graduate` - Graduate - * `high_school` - High School - * `noncredit` - Non-Credit - * `advanced` - Advanced - * `intermediate` - Intermediate - * `introductory` - Introductory - explode: true - style: form - - name: limit - required: false - in: query - description: Number of results to return per page. - schema: - type: integer - - in: query - name: offered_by - schema: - type: array - items: - type: string - enum: - - bootcamps - - csail - - ctl - - mitpe - - mitx - - ocw - - scc - - see - - xpro - description: |- - The organization that offers a learning resource - - * `mitx` - MITx - * `ocw` - OCW - * `bootcamps` - Bootcamps - * `xpro` - xPRO - * `csail` - CSAIL - * `mitpe` - Professional Education - * `see` - Sloan Executive Education - * `scc` - Schwarzman College of Computing - * `ctl` - Center for Transportation & Logistics - explode: true - style: form - - name: offset - required: false - in: query - description: The initial index from which to return the results. - schema: - type: integer - - in: query - name: platform - schema: - type: array - items: - type: string - enum: - - bootcamps - - csail - - ctl - - edx - - emeritus - - globalalumni - - mitpe - - mitxonline - - ocw - - oll - - podcast - - scc - - see - - simplilearn - - susskind - - whu - - xpro - - youtube - description: |- - The platform on which learning resources are offered - - * `edx` - edX - * `ocw` - OCW - * `oll` - Open Learning Library - * `mitxonline` - MITx Online - * `bootcamps` - Bootcamps - * `xpro` - xPRO - * `csail` - CSAIL - * `mitpe` - Professional Education - * `see` - Sloan Executive Education - * `scc` - Schwarzman College of Computing - * `ctl` - Center for Transportation & Logistics - * `whu` - WHU - * `susskind` - Susskind - * `globalalumni` - Global Alumni - * `simplilearn` - Simplilearn - * `emeritus` - Emeritus - * `podcast` - Podcast - * `youtube` - YouTube - explode: true - style: form - - in: query - name: professional - schema: - type: boolean - - in: query - name: readable_id - schema: - type: array - items: - type: string - description: Multiple values may be separated by commas. - explode: false - style: form - - in: query - name: resource_type - schema: - type: array - items: - type: string - enum: - - course - - learning_path - - podcast - - podcast_episode - - program - - video - - video_playlist - description: |- - The type of learning resource - - * `course` - Course - * `program` - Program - * `learning_path` - Learning Path - * `podcast` - Podcast - * `podcast_episode` - Podcast Episode - * `video` - Video - * `video_playlist` - Video Playlist - explode: true - style: form - - in: query - name: sortby - schema: - type: string - enum: - - -created_on - - -id - - -last_modified - - -mitcoursenumber - - -readable_id - - -start_date - - -views - - created_on - - id - - last_modified - - mitcoursenumber - - readable_id - - start_date - - views - description: |- - Sort By - - * `id` - Object ID ascending - * `-id` - Object ID descending - * `readable_id` - Readable ID ascending - * `-readable_id` - Readable ID descending - * `last_modified` - Last Modified Date ascending - * `-last_modified` - Last Modified Date descending - * `created_on` - Creation Date ascending - * `-created_on` - CreationDate descending - * `start_date` - Start Date ascending - * `-start_date` - Start Date descending - * `mitcoursenumber` - MIT course number ascending - * `-mitcoursenumber` - MIT course number descending - * `views` - Popularity ascending - * `-views` - Popularity descending - - in: query - name: topic - schema: - type: array - items: - type: string - description: Multiple values may be separated by commas. - explode: false - style: form - tags: - - video_playlists - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/PaginatedVideoPlaylistResourceList' - description: '' - /api/v1/video_playlists/{id}/: - get: - operationId: video_playlists_retrieve - description: Retrieve a single video playlist - summary: Retrieve - parameters: - - in: path - name: id - schema: - type: integer - description: A unique integer value identifying this learning resource. - required: true - tags: - - video_playlists - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/VideoPlaylistResource' - description: '' - /api/v1/video_playlists/{learning_resource_id}/items/: - get: - operationId: video_playlists_items_list - description: Get a list of related learning resources for a learning resource. - summary: Nested Learning Resource List - parameters: - - in: path - name: learning_resource_id - schema: - type: integer - description: id of the parent learning resource - required: true - - name: limit - required: false - in: query - description: Number of results to return per page. - schema: - type: integer - - name: offset - required: false - in: query - description: The initial index from which to return the results. - schema: - type: integer - - name: sortby - required: false - in: query - description: Which field to use when ordering the results. - schema: - type: string - tags: - - video_playlists - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/PaginatedLearningResourceRelationshipList' - description: '' - /api/v1/video_playlists/{learning_resource_id}/items/{id}/: - get: - operationId: video_playlists_items_retrieve - description: Get a singe related learning resource for a learning resource. - summary: Nested Learning Resource Retrieve - parameters: - - in: path - name: id - schema: - type: integer - description: A unique integer value identifying this learning resource relationship. - required: true - - in: path - name: learning_resource_id - schema: - type: integer - description: id of the parent learning resource - required: true - tags: - - video_playlists - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/LearningResourceRelationship' - description: '' - /api/v1/video_playlists/new/: - get: - operationId: video_playlists_new_list - description: Get a paginated list of newly released Video Playlists. - summary: List New - parameters: - - in: query - name: course_feature - schema: - type: array - items: - type: string - description: Multiple values may be separated by commas. - explode: false - style: form - - in: query - name: department - schema: - type: array - items: - type: string - enum: - - '1' - - '10' - - '11' - - '12' - - '14' - - '15' - - '16' - - '17' - - '18' - - '2' - - '20' - - 21A - - 21G - - 21H - - 21L - - 21M - - '22' - - '24' - - '3' - - '4' - - '5' - - '6' - - '7' - - '8' - - '9' - - CC - - CMS-W - - EC - - ES - - ESD - - HST - - IDS - - MAS - - PE - - RES - - STS - - WGS - description: |- - The department that offers learning resources - - * `1` - Civil and Environmental Engineering - * `2` - Mechanical Engineering - * `3` - Materials Science and Engineering - * `4` - Architecture - * `5` - Chemistry - * `6` - Electrical Engineering and Computer Science - * `7` - Biology - * `8` - Physics - * `9` - Brain and Cognitive Sciences - * `10` - Chemical Engineering - * `11` - Urban Studies and Planning - * `12` - Earth, Atmospheric, and Planetary Sciences - * `14` - Economics - * `15` - Sloan School of Management - * `16` - Aeronautics and Astronautics - * `17` - Political Science - * `18` - Mathematics - * `20` - Biological Engineering - * `21A` - Anthropology - * `21G` - Global Studies and Languages - * `21H` - History - * `21L` - Literature - * `21M` - Music and Theater Arts - * `22` - Nuclear Science and Engineering - * `24` - Linguistics and Philosophy - * `CC` - Concourse - * `CMS-W` - Comparative Media Studies/Writing - * `EC` - Edgerton Center - * `ES` - Experimental Study Group - * `ESD` - Engineering Systems Division - * `HST` - Health Sciences and Technology - * `IDS` - Institute for Data, Systems, and Society - * `MAS` - Media Arts and Sciences - * `PE` - Athletics, Physical Education and Recreation - * `RES` - Supplemental Resources - * `STS` - Science, Technology, and Society - * `WGS` - Women's and Gender Studies - explode: true - style: form - - in: query - name: free - schema: - type: boolean - description: The course/program is offered for free - - in: query - name: learning_format - schema: - type: array - items: - type: array - items: - type: string - maxLength: 24 - enum: - - hybrid - - in_person - - online - description: |- - The learning format of course/program resources - - * `online` - Online - * `hybrid` - Hybrid - * `in_person` - In person - explode: true - style: form - - in: query - name: level - schema: - type: array - items: - type: string - enum: - - advanced - - graduate - - high_school - - intermediate - - introductory - - noncredit - - undergraduate - description: |- - The academic level of the resources - - * `undergraduate` - Undergraduate - * `graduate` - Graduate - * `high_school` - High School - * `noncredit` - Non-Credit - * `advanced` - Advanced - * `intermediate` - Intermediate - * `introductory` - Introductory - explode: true - style: form - - name: limit - required: false - in: query - description: Number of results to return per page. - schema: - type: integer - - in: query - name: offered_by - schema: - type: array - items: - type: string - enum: - - bootcamps - - csail - - ctl - - mitpe - - mitx - - ocw - - scc - - see - - xpro - description: |- - The organization that offers a learning resource - - * `mitx` - MITx - * `ocw` - OCW - * `bootcamps` - Bootcamps - * `xpro` - xPRO - * `csail` - CSAIL - * `mitpe` - Professional Education - * `see` - Sloan Executive Education - * `scc` - Schwarzman College of Computing - * `ctl` - Center for Transportation & Logistics - explode: true - style: form - - name: offset - required: false - in: query - description: The initial index from which to return the results. - schema: - type: integer - - in: query - name: platform - schema: - type: array - items: - type: string - enum: - - bootcamps - - csail - - ctl - - edx - - emeritus - - globalalumni - - mitpe - - mitxonline - - ocw - - oll - - podcast - - scc - - see - - simplilearn - - susskind - - whu - - xpro - - youtube - description: |- - The platform on which learning resources are offered - - * `edx` - edX - * `ocw` - OCW - * `oll` - Open Learning Library - * `mitxonline` - MITx Online - * `bootcamps` - Bootcamps - * `xpro` - xPRO - * `csail` - CSAIL - * `mitpe` - Professional Education - * `see` - Sloan Executive Education - * `scc` - Schwarzman College of Computing - * `ctl` - Center for Transportation & Logistics - * `whu` - WHU - * `susskind` - Susskind - * `globalalumni` - Global Alumni - * `simplilearn` - Simplilearn - * `emeritus` - Emeritus - * `podcast` - Podcast - * `youtube` - YouTube - explode: true - style: form - - in: query - name: professional - schema: - type: boolean - - in: query - name: readable_id - schema: - type: array - items: - type: string - description: Multiple values may be separated by commas. - explode: false - style: form - - in: query - name: resource_type - schema: - type: array - items: - type: string - enum: - - course - - learning_path - - podcast - - podcast_episode - - program - - video - - video_playlist - description: |- - The type of learning resource - - * `course` - Course - * `program` - Program - * `learning_path` - Learning Path - * `podcast` - Podcast - * `podcast_episode` - Podcast Episode - * `video` - Video - * `video_playlist` - Video Playlist - explode: true - style: form - - in: query - name: sortby - schema: - type: string - enum: - - -created_on - - -id - - -last_modified - - -mitcoursenumber - - -readable_id - - -start_date - - -views - - created_on - - id - - last_modified - - mitcoursenumber - - readable_id - - start_date - - views - description: |- - Sort By - - * `id` - Object ID ascending - * `-id` - Object ID descending - * `readable_id` - Readable ID ascending - * `-readable_id` - Readable ID descending - * `last_modified` - Last Modified Date ascending - * `-last_modified` - Last Modified Date descending - * `created_on` - Creation Date ascending - * `-created_on` - CreationDate descending - * `start_date` - Start Date ascending - * `-start_date` - Start Date descending - * `mitcoursenumber` - MIT course number ascending - * `-mitcoursenumber` - MIT course number descending - * `views` - Popularity ascending - * `-views` - Popularity descending - - in: query - name: topic - schema: - type: array - items: - type: string - description: Multiple values may be separated by commas. - explode: false - style: form - tags: - - video_playlists - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/PaginatedVideoPlaylistResourceList' - description: '' - /api/v1/video_playlists/upcoming/: - get: - operationId: video_playlists_upcoming_list - description: Get a paginated list of upcoming Video Playlists. - summary: List Upcoming - parameters: - - in: query - name: course_feature - schema: - type: array - items: - type: string - description: Multiple values may be separated by commas. - explode: false - style: form - - in: query - name: department - schema: - type: array - items: - type: string - enum: - - '1' - - '10' - - '11' - - '12' - - '14' - - '15' - - '16' - - '17' - - '18' - - '2' - - '20' - - 21A - - 21G - - 21H - - 21L - - 21M - - '22' - - '24' - - '3' - - '4' - - '5' - - '6' - - '7' - - '8' - - '9' - - CC - - CMS-W - - EC - - ES - - ESD - - HST - - IDS - - MAS - - PE - - RES - - STS - - WGS - description: |- - The department that offers learning resources - - * `1` - Civil and Environmental Engineering - * `2` - Mechanical Engineering - * `3` - Materials Science and Engineering - * `4` - Architecture - * `5` - Chemistry - * `6` - Electrical Engineering and Computer Science - * `7` - Biology - * `8` - Physics - * `9` - Brain and Cognitive Sciences - * `10` - Chemical Engineering - * `11` - Urban Studies and Planning - * `12` - Earth, Atmospheric, and Planetary Sciences - * `14` - Economics - * `15` - Sloan School of Management - * `16` - Aeronautics and Astronautics - * `17` - Political Science - * `18` - Mathematics - * `20` - Biological Engineering - * `21A` - Anthropology - * `21G` - Global Studies and Languages - * `21H` - History - * `21L` - Literature - * `21M` - Music and Theater Arts - * `22` - Nuclear Science and Engineering - * `24` - Linguistics and Philosophy - * `CC` - Concourse - * `CMS-W` - Comparative Media Studies/Writing - * `EC` - Edgerton Center - * `ES` - Experimental Study Group - * `ESD` - Engineering Systems Division - * `HST` - Health Sciences and Technology - * `IDS` - Institute for Data, Systems, and Society - * `MAS` - Media Arts and Sciences - * `PE` - Athletics, Physical Education and Recreation - * `RES` - Supplemental Resources - * `STS` - Science, Technology, and Society - * `WGS` - Women's and Gender Studies - explode: true - style: form - - in: query - name: free - schema: - type: boolean - description: The course/program is offered for free - - in: query - name: learning_format - schema: - type: array - items: - type: array - items: - type: string - maxLength: 24 - enum: - - hybrid - - in_person - - online - description: |- - The learning format of course/program resources - - * `online` - Online - * `hybrid` - Hybrid - * `in_person` - In person - explode: true - style: form - - in: query - name: level - schema: - type: array - items: - type: string - enum: - - advanced - - graduate - - high_school - - intermediate - - introductory - - noncredit - - undergraduate - description: |- - The academic level of the resources - - * `undergraduate` - Undergraduate - * `graduate` - Graduate - * `high_school` - High School - * `noncredit` - Non-Credit - * `advanced` - Advanced - * `intermediate` - Intermediate - * `introductory` - Introductory - explode: true - style: form - - name: limit - required: false - in: query - description: Number of results to return per page. - schema: - type: integer - - in: query - name: offered_by - schema: - type: array - items: - type: string - enum: - - bootcamps - - csail - - ctl - - mitpe - - mitx - - ocw - - scc - - see - - xpro - description: |- - The organization that offers a learning resource - - * `mitx` - MITx - * `ocw` - OCW - * `bootcamps` - Bootcamps - * `xpro` - xPRO - * `csail` - CSAIL - * `mitpe` - Professional Education - * `see` - Sloan Executive Education - * `scc` - Schwarzman College of Computing - * `ctl` - Center for Transportation & Logistics - explode: true - style: form - - name: offset - required: false - in: query - description: The initial index from which to return the results. - schema: - type: integer - - in: query - name: platform - schema: - type: array - items: - type: string - enum: - - bootcamps - - csail - - ctl - - edx - - emeritus - - globalalumni - - mitpe - - mitxonline - - ocw - - oll - - podcast - - scc - - see - - simplilearn - - susskind - - whu - - xpro - - youtube - description: |- - The platform on which learning resources are offered - - * `edx` - edX - * `ocw` - OCW - * `oll` - Open Learning Library - * `mitxonline` - MITx Online - * `bootcamps` - Bootcamps - * `xpro` - xPRO - * `csail` - CSAIL - * `mitpe` - Professional Education - * `see` - Sloan Executive Education - * `scc` - Schwarzman College of Computing - * `ctl` - Center for Transportation & Logistics - * `whu` - WHU - * `susskind` - Susskind - * `globalalumni` - Global Alumni - * `simplilearn` - Simplilearn - * `emeritus` - Emeritus - * `podcast` - Podcast - * `youtube` - YouTube - explode: true - style: form - - in: query - name: professional - schema: - type: boolean - - in: query - name: readable_id - schema: - type: array - items: - type: string - description: Multiple values may be separated by commas. - explode: false - style: form - - in: query - name: resource_type - schema: - type: array - items: - type: string - enum: - - course - - learning_path - - podcast - - podcast_episode - - program - - video - - video_playlist - description: |- - The type of learning resource - - * `course` - Course - * `program` - Program - * `learning_path` - Learning Path - * `podcast` - Podcast - * `podcast_episode` - Podcast Episode - * `video` - Video - * `video_playlist` - Video Playlist - explode: true - style: form - - in: query - name: sortby - schema: - type: string - enum: - - -created_on - - -id - - -last_modified - - -mitcoursenumber - - -readable_id - - -start_date - - -views - - created_on - - id - - last_modified - - mitcoursenumber - - readable_id - - start_date - - views - description: |- - Sort By - - * `id` - Object ID ascending - * `-id` - Object ID descending - * `readable_id` - Readable ID ascending - * `-readable_id` - Readable ID descending - * `last_modified` - Last Modified Date ascending - * `-last_modified` - Last Modified Date descending - * `created_on` - Creation Date ascending - * `-created_on` - CreationDate descending - * `start_date` - Start Date ascending - * `-start_date` - Start Date descending - * `mitcoursenumber` - MIT course number ascending - * `-mitcoursenumber` - MIT course number descending - * `views` - Popularity ascending - * `-views` - Popularity descending - - in: query - name: topic - schema: - type: array - items: - type: string - description: Multiple values may be separated by commas. - explode: false - style: form - tags: - - video_playlists - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/PaginatedVideoPlaylistResourceList' - description: '' - /api/v1/videos/: - get: - operationId: videos_list - description: Get a paginated list of videos - summary: List - parameters: - - in: query - name: course_feature - schema: - type: array - items: - type: string - description: Multiple values may be separated by commas. - explode: false - style: form - - in: query - name: department - schema: - type: array - items: - type: string - enum: - - '1' - - '10' - - '11' - - '12' - - '14' - - '15' - - '16' - - '17' - - '18' - - '2' - - '20' - - 21A - - 21G - - 21H - - 21L - - 21M - - '22' - - '24' - - '3' - - '4' - - '5' - - '6' - - '7' - - '8' - - '9' - - CC - - CMS-W - - EC - - ES - - ESD - - HST - - IDS - - MAS - - PE - - RES - - STS - - WGS - description: |- - The department that offers learning resources - - * `1` - Civil and Environmental Engineering - * `2` - Mechanical Engineering - * `3` - Materials Science and Engineering - * `4` - Architecture - * `5` - Chemistry - * `6` - Electrical Engineering and Computer Science - * `7` - Biology - * `8` - Physics - * `9` - Brain and Cognitive Sciences - * `10` - Chemical Engineering - * `11` - Urban Studies and Planning - * `12` - Earth, Atmospheric, and Planetary Sciences - * `14` - Economics - * `15` - Sloan School of Management - * `16` - Aeronautics and Astronautics - * `17` - Political Science - * `18` - Mathematics - * `20` - Biological Engineering - * `21A` - Anthropology - * `21G` - Global Studies and Languages - * `21H` - History - * `21L` - Literature - * `21M` - Music and Theater Arts - * `22` - Nuclear Science and Engineering - * `24` - Linguistics and Philosophy - * `CC` - Concourse - * `CMS-W` - Comparative Media Studies/Writing - * `EC` - Edgerton Center - * `ES` - Experimental Study Group - * `ESD` - Engineering Systems Division - * `HST` - Health Sciences and Technology - * `IDS` - Institute for Data, Systems, and Society - * `MAS` - Media Arts and Sciences - * `PE` - Athletics, Physical Education and Recreation - * `RES` - Supplemental Resources - * `STS` - Science, Technology, and Society - * `WGS` - Women's and Gender Studies - explode: true - style: form - - in: query - name: free - schema: - type: boolean - description: The course/program is offered for free - - in: query - name: learning_format - schema: - type: array - items: - type: array - items: - type: string - maxLength: 24 - enum: - - hybrid - - in_person - - online - description: |- - The learning format of course/program resources - - * `online` - Online - * `hybrid` - Hybrid - * `in_person` - In person - explode: true - style: form - - in: query - name: level + type: integer + description: A unique integer value identifying this user list. + required: true + tags: + - userlists + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PatchedUserListRequest' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/PatchedUserListRequest' + multipart/form-data: + schema: + $ref: '#/components/schemas/PatchedUserListRequest' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/UserList' + description: '' + delete: + operationId: userlists_destroy + description: Viewset for UserLists + summary: Destroy + parameters: + - in: path + name: id schema: - type: array - items: - type: string - enum: - - advanced - - graduate - - high_school - - intermediate - - introductory - - noncredit - - undergraduate - description: |- - The academic level of the resources - - * `undergraduate` - Undergraduate - * `graduate` - Graduate - * `high_school` - High School - * `noncredit` - Non-Credit - * `advanced` - Advanced - * `intermediate` - Intermediate - * `introductory` - Introductory - explode: true - style: form + type: integer + description: A unique integer value identifying this user list. + required: true + tags: + - userlists + responses: + '204': + description: No response body + /api/v1/userlists/{userlist_id}/items/: + get: + operationId: userlists_items_list + description: Viewset for UserListRelationships + summary: User List Resources List + parameters: - name: limit required: false in: query description: Number of results to return per page. schema: type: integer - - in: query - name: offered_by - schema: - type: array - items: - type: string - enum: - - bootcamps - - csail - - ctl - - mitpe - - mitx - - ocw - - scc - - see - - xpro - description: |- - The organization that offers a learning resource - - * `mitx` - MITx - * `ocw` - OCW - * `bootcamps` - Bootcamps - * `xpro` - xPRO - * `csail` - CSAIL - * `mitpe` - Professional Education - * `see` - Sloan Executive Education - * `scc` - Schwarzman College of Computing - * `ctl` - Center for Transportation & Logistics - explode: true - style: form - name: offset required: false in: query description: The initial index from which to return the results. schema: type: integer - - in: query - name: platform - schema: - type: array - items: - type: string - enum: - - bootcamps - - csail - - ctl - - edx - - emeritus - - globalalumni - - mitpe - - mitxonline - - ocw - - oll - - podcast - - scc - - see - - simplilearn - - susskind - - whu - - xpro - - youtube - description: |- - The platform on which learning resources are offered - - * `edx` - edX - * `ocw` - OCW - * `oll` - Open Learning Library - * `mitxonline` - MITx Online - * `bootcamps` - Bootcamps - * `xpro` - xPRO - * `csail` - CSAIL - * `mitpe` - Professional Education - * `see` - Sloan Executive Education - * `scc` - Schwarzman College of Computing - * `ctl` - Center for Transportation & Logistics - * `whu` - WHU - * `susskind` - Susskind - * `globalalumni` - Global Alumni - * `simplilearn` - Simplilearn - * `emeritus` - Emeritus - * `podcast` - Podcast - * `youtube` - YouTube - explode: true - style: form - - in: query - name: professional - schema: - type: boolean - - in: query - name: readable_id - schema: - type: array - items: - type: string - description: Multiple values may be separated by commas. - explode: false - style: form - - in: query - name: resource_type + - in: path + name: userlist_id schema: - type: array - items: - type: string - enum: - - course - - learning_path - - podcast - - podcast_episode - - program - - video - - video_playlist - description: |- - The type of learning resource - - * `course` - Course - * `program` - Program - * `learning_path` - Learning Path - * `podcast` - Podcast - * `podcast_episode` - Podcast Episode - * `video` - Video - * `video_playlist` - Video Playlist - explode: true - style: form - - in: query - name: sortby + type: integer + description: id of the parent user list + required: true + tags: + - userlists + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedUserListRelationshipList' + description: '' + post: + operationId: userlists_items_create + description: Viewset for UserListRelationships + summary: User List Resource Relationship Add + parameters: + - in: path + name: userlist_id schema: - type: string - enum: - - -created_on - - -id - - -last_modified - - -mitcoursenumber - - -readable_id - - -start_date - - -views - - created_on - - id - - last_modified - - mitcoursenumber - - readable_id - - start_date - - views - description: |- - Sort By - - * `id` - Object ID ascending - * `-id` - Object ID descending - * `readable_id` - Readable ID ascending - * `-readable_id` - Readable ID descending - * `last_modified` - Last Modified Date ascending - * `-last_modified` - Last Modified Date descending - * `created_on` - Creation Date ascending - * `-created_on` - CreationDate descending - * `start_date` - Start Date ascending - * `-start_date` - Start Date descending - * `mitcoursenumber` - MIT course number ascending - * `-mitcoursenumber` - MIT course number descending - * `views` - Popularity ascending - * `-views` - Popularity descending - - in: query - name: topic + type: integer + description: id of the parent user list + required: true + tags: + - userlists + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/UserListRelationshipRequest' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/UserListRelationshipRequest' + multipart/form-data: + schema: + $ref: '#/components/schemas/UserListRelationshipRequest' + required: true + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/UserListRelationship' + description: '' + /api/v1/userlists/{userlist_id}/items/{id}/: + get: + operationId: userlists_items_retrieve + description: Viewset for UserListRelationships + summary: User List Resources Retrieve + parameters: + - in: path + name: id schema: - type: array - items: - type: string - description: Multiple values may be separated by commas. - explode: false - style: form + type: integer + description: A unique integer value identifying this user list relationship. + required: true + - in: path + name: userlist_id + schema: + type: integer + description: id of the parent user list + required: true tags: - - videos + - userlists responses: '200': content: application/json: schema: - $ref: '#/components/schemas/PaginatedVideoResourceList' + $ref: '#/components/schemas/UserListRelationship' description: '' - /api/v1/videos/{id}/: - get: - operationId: videos_retrieve - description: Retrieve a single video - summary: Retrieve + patch: + operationId: userlists_items_partial_update + description: Viewset for UserListRelationships + summary: User List Resource Relationship Update parameters: - in: path name: id schema: type: integer - description: A unique integer value identifying this learning resource. + description: A unique integer value identifying this user list relationship. + required: true + - in: path + name: userlist_id + schema: + type: integer + description: id of the parent user list required: true tags: - - videos + - userlists + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PatchedUserListRelationshipRequest' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/PatchedUserListRelationshipRequest' + multipart/form-data: + schema: + $ref: '#/components/schemas/PatchedUserListRelationshipRequest' responses: '200': content: application/json: schema: - $ref: '#/components/schemas/VideoResource' + $ref: '#/components/schemas/UserListRelationship' description: '' - /api/v1/videos/new/: + delete: + operationId: userlists_items_destroy + description: Viewset for UserListRelationships + summary: User List Resource Relationship Remove + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this user list relationship. + required: true + - in: path + name: userlist_id + schema: + type: integer + description: id of the parent user list + required: true + tags: + - userlists + responses: + '204': + description: No response body + /api/v1/video_playlists/: get: - operationId: videos_new_list - description: Get a paginated list of newly released Videos. - summary: List New + operationId: video_playlists_list + description: Get a paginated list of video playlists + summary: List parameters: - in: query name: course_feature @@ -8134,19 +4624,19 @@ paths: schema: type: string enum: - - -created_on - -id - -last_modified - -mitcoursenumber - -readable_id - -start_date - -views - - created_on - id - last_modified - mitcoursenumber + - new - readable_id - start_date + - upcoming - views description: |- Sort By @@ -8157,14 +4647,14 @@ paths: * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending - * `created_on` - Creation Date ascending - * `-created_on` - CreationDate descending + * `new` - Newest resources first * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending + * `upcoming` - Next start date ascending - in: query name: topic schema: @@ -8175,19 +4665,106 @@ paths: explode: false style: form tags: - - videos + - video_playlists responses: '200': content: application/json: schema: - $ref: '#/components/schemas/PaginatedVideoResourceList' + $ref: '#/components/schemas/PaginatedVideoPlaylistResourceList' + description: '' + /api/v1/video_playlists/{id}/: + get: + operationId: video_playlists_retrieve + description: Retrieve a single video playlist + summary: Retrieve + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this learning resource. + required: true + tags: + - video_playlists + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/VideoPlaylistResource' + description: '' + /api/v1/video_playlists/{learning_resource_id}/items/: + get: + operationId: video_playlists_items_list + description: Get a list of related learning resources for a learning resource. + summary: Nested Learning Resource List + parameters: + - in: path + name: learning_resource_id + schema: + type: integer + description: id of the parent learning resource + required: true + - name: limit + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - name: offset + required: false + in: query + description: The initial index from which to return the results. + schema: + type: integer + - name: sortby + required: false + in: query + description: Which field to use when ordering the results. + schema: + type: string + tags: + - video_playlists + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedLearningResourceRelationshipList' + description: '' + /api/v1/video_playlists/{learning_resource_id}/items/{id}/: + get: + operationId: video_playlists_items_retrieve + description: Get a singe related learning resource for a learning resource. + summary: Nested Learning Resource Retrieve + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this learning resource relationship. + required: true + - in: path + name: learning_resource_id + schema: + type: integer + description: id of the parent learning resource + required: true + tags: + - video_playlists + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/LearningResourceRelationship' description: '' - /api/v1/videos/upcoming/: + /api/v1/videos/: get: - operationId: videos_upcoming_list - description: Get a paginated list of upcoming Videos. - summary: List Upcoming + operationId: videos_list + description: Get a paginated list of videos + summary: List parameters: - in: query name: course_feature @@ -8470,19 +5047,19 @@ paths: schema: type: string enum: - - -created_on - -id - -last_modified - -mitcoursenumber - -readable_id - -start_date - -views - - created_on - id - last_modified - mitcoursenumber + - new - readable_id - start_date + - upcoming - views description: |- Sort By @@ -8493,14 +5070,14 @@ paths: * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending - * `created_on` - Creation Date ascending - * `-created_on` - CreationDate descending + * `new` - Newest resources first * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending + * `upcoming` - Next start date ascending - in: query name: topic schema: @@ -8519,6 +5096,27 @@ paths: schema: $ref: '#/components/schemas/PaginatedVideoResourceList' description: '' + /api/v1/videos/{id}/: + get: + operationId: videos_retrieve + description: Retrieve a single video + summary: Retrieve + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this learning resource. + required: true + tags: + - videos + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/VideoResource' + description: '' components: schemas: AggregationsEnum: @@ -8923,6 +5521,10 @@ components: professional: type: boolean readOnly: true + next_start_date: + type: string + format: date-time + nullable: true required: - certification - course @@ -8983,6 +5585,10 @@ components: nullable: true minLength: 1 maxLength: 2048 + next_start_date: + type: string + format: date-time + nullable: true required: - readable_id - title @@ -9258,6 +5864,10 @@ components: maxLength: 2048 professional: type: boolean + next_start_date: + type: string + format: date-time + nullable: true required: - certification - course_feature @@ -9315,6 +5925,10 @@ components: maxLength: 2048 professional: type: boolean + next_start_date: + type: string + format: date-time + nullable: true required: - title LearningPathResourceResourceTypeEnum: @@ -10003,14 +6617,14 @@ components: * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending - * `created_on` - Creation Date ascending - * `-created_on` - CreationDate descending + * `new` - Newest resources first * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending + * `upcoming` - Next start date ascending resource_type: type: array items: @@ -10691,6 +7305,10 @@ components: maxLength: 2048 professional: type: boolean + next_start_date: + type: string + format: date-time + nullable: true PatchedUserListRelationshipRequest: type: object description: Serializer for UserListRelationship model @@ -10978,6 +7596,10 @@ components: professional: type: boolean readOnly: true + next_start_date: + type: string + format: date-time + nullable: true required: - certification - course_feature @@ -11038,6 +7660,10 @@ components: nullable: true minLength: 1 maxLength: 2048 + next_start_date: + type: string + format: date-time + nullable: true required: - readable_id - title @@ -11195,6 +7821,10 @@ components: professional: type: boolean readOnly: true + next_start_date: + type: string + format: date-time + nullable: true required: - certification - course_feature @@ -11255,6 +7885,10 @@ components: nullable: true minLength: 1 maxLength: 2048 + next_start_date: + type: string + format: date-time + nullable: true required: - readable_id - title @@ -11554,6 +8188,10 @@ components: professional: type: boolean readOnly: true + next_start_date: + type: string + format: date-time + nullable: true required: - certification - course_feature @@ -11614,6 +8252,10 @@ components: nullable: true minLength: 1 maxLength: 2048 + next_start_date: + type: string + format: date-time + nullable: true required: - readable_id - title @@ -11659,14 +8301,14 @@ components: - -readable_id - last_modified - -last_modified - - created_on - - -created_on + - new - start_date - -start_date - mitcoursenumber - -mitcoursenumber - views - -views + - upcoming type: string description: |- * `id` - Object ID ascending @@ -11675,14 +8317,14 @@ components: * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending - * `created_on` - Creation Date ascending - * `-created_on` - CreationDate descending + * `new` - Newest resources first * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending + * `upcoming` - Next start date ascending SourceTypeEnum: enum: - search_subscription_type @@ -11972,6 +8614,10 @@ components: professional: type: boolean readOnly: true + next_start_date: + type: string + format: date-time + nullable: true required: - certification - course_feature @@ -12032,6 +8678,10 @@ components: nullable: true minLength: 1 maxLength: 2048 + next_start_date: + type: string + format: date-time + nullable: true required: - readable_id - title @@ -12179,6 +8829,10 @@ components: professional: type: boolean readOnly: true + next_start_date: + type: string + format: date-time + nullable: true required: - certification - course_feature @@ -12239,6 +8893,10 @@ components: nullable: true minLength: 1 maxLength: 2048 + next_start_date: + type: string + format: date-time + nullable: true required: - readable_id - title