Skip to content

Commit 85a1587

Browse files
committed
Generated clients for mit-learn from rev: cc525a56e6bf4dc5b99f780b48447a03fb9e15af
1 parent 28dd921 commit 85a1587

5 files changed

Lines changed: 463 additions & 3 deletions

File tree

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2025.10.22
1+
2025.10.28

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "mit-learn-api-clients"
3-
version = "2025.10.22"
3+
version = "2025.10.28"
44
description = ""
55
authors = []
66
readme = "README.md"

src/typescript/mit-learn-api-axios/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@mitodl/mit-learn-api-axios",
3-
"version": "2025.10.22",
3+
"version": "2025.10.28",
44
"description": "Library for requesting data from mit-learn APIs",
55
"main": "dist/cjs/index.js",
66
"scripts": {

src/typescript/mit-learn-api-axios/src/v0/api.ts

Lines changed: 309 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3420,6 +3420,37 @@ export interface PaginatedFeedSourceList {
34203420
*/
34213421
'results': Array<FeedSource>;
34223422
}
3423+
/**
3424+
*
3425+
* @export
3426+
* @interface PaginatedVideoShortList
3427+
*/
3428+
export interface PaginatedVideoShortList {
3429+
/**
3430+
*
3431+
* @type {number}
3432+
* @memberof PaginatedVideoShortList
3433+
*/
3434+
'count': number;
3435+
/**
3436+
*
3437+
* @type {string}
3438+
* @memberof PaginatedVideoShortList
3439+
*/
3440+
'next'?: string | null;
3441+
/**
3442+
*
3443+
* @type {string}
3444+
* @memberof PaginatedVideoShortList
3445+
*/
3446+
'previous'?: string | null;
3447+
/**
3448+
*
3449+
* @type {Array<VideoShort>}
3450+
* @memberof PaginatedVideoShortList
3451+
*/
3452+
'results': Array<VideoShort>;
3453+
}
34233454
/**
34243455
* Similar to ChannelCreateSerializer, with read-only name
34253456
* @export
@@ -6504,6 +6535,73 @@ export const VideoResourceResourceTypeEnum = {
65046535
export type VideoResourceResourceTypeEnum = typeof VideoResourceResourceTypeEnum[keyof typeof VideoResourceResourceTypeEnum];
65056536

65066537

6538+
/**
6539+
* ModelSerializer for VideoShort model
6540+
* @export
6541+
* @interface VideoShort
6542+
*/
6543+
export interface VideoShort {
6544+
/**
6545+
*
6546+
* @type {string}
6547+
* @memberof VideoShort
6548+
*/
6549+
'youtube_id': string;
6550+
/**
6551+
*
6552+
* @type {string}
6553+
* @memberof VideoShort
6554+
*/
6555+
'title': string;
6556+
/**
6557+
*
6558+
* @type {string}
6559+
* @memberof VideoShort
6560+
*/
6561+
'description'?: string;
6562+
/**
6563+
*
6564+
* @type {string}
6565+
* @memberof VideoShort
6566+
*/
6567+
'published_at': string;
6568+
/**
6569+
*
6570+
* @type {string}
6571+
* @memberof VideoShort
6572+
*/
6573+
'thumbnail_url': string;
6574+
/**
6575+
*
6576+
* @type {number}
6577+
* @memberof VideoShort
6578+
*/
6579+
'thumbnail_height': number;
6580+
/**
6581+
*
6582+
* @type {number}
6583+
* @memberof VideoShort
6584+
*/
6585+
'thumbnail_width': number;
6586+
/**
6587+
*
6588+
* @type {string}
6589+
* @memberof VideoShort
6590+
*/
6591+
'video_url': string;
6592+
/**
6593+
*
6594+
* @type {string}
6595+
* @memberof VideoShort
6596+
*/
6597+
'created_on': string;
6598+
/**
6599+
*
6600+
* @type {string}
6601+
* @memberof VideoShort
6602+
*/
6603+
'updated_on': string;
6604+
}
65076605
/**
65086606
* WidgetInstance serializer
65096607
* @export
@@ -10569,6 +10667,217 @@ export const VectorLearningResourcesSearchRetrieveResourceTypeEnum = {
1056910667
export type VectorLearningResourcesSearchRetrieveResourceTypeEnum = typeof VectorLearningResourcesSearchRetrieveResourceTypeEnum[keyof typeof VectorLearningResourcesSearchRetrieveResourceTypeEnum];
1057010668

1057110669

10670+
/**
10671+
* VideoShortsApi - axios parameter creator
10672+
* @export
10673+
*/
10674+
export const VideoShortsApiAxiosParamCreator = function (configuration?: Configuration) {
10675+
return {
10676+
/**
10677+
* Get a paginated list of video shorts.
10678+
* @param {number} [limit] Number of results to return per page.
10679+
* @param {number} [offset] The initial index from which to return the results.
10680+
* @param {*} [options] Override http request option.
10681+
* @throws {RequiredError}
10682+
*/
10683+
videoShortsList: async (limit?: number, offset?: number, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
10684+
const localVarPath = `/api/v0/video_shorts/`;
10685+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
10686+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
10687+
let baseOptions;
10688+
if (configuration) {
10689+
baseOptions = configuration.baseOptions;
10690+
}
10691+
10692+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
10693+
const localVarHeaderParameter = {} as any;
10694+
const localVarQueryParameter = {} as any;
10695+
10696+
if (limit !== undefined) {
10697+
localVarQueryParameter['limit'] = limit;
10698+
}
10699+
10700+
if (offset !== undefined) {
10701+
localVarQueryParameter['offset'] = offset;
10702+
}
10703+
10704+
10705+
10706+
setSearchParams(localVarUrlObj, localVarQueryParameter);
10707+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
10708+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
10709+
10710+
return {
10711+
url: toPathString(localVarUrlObj),
10712+
options: localVarRequestOptions,
10713+
};
10714+
},
10715+
/**
10716+
* Retrieve a single video short.
10717+
* @param {string} youtube_id A unique value identifying this video short.
10718+
* @param {*} [options] Override http request option.
10719+
* @throws {RequiredError}
10720+
*/
10721+
videoShortsRetrieve: async (youtube_id: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
10722+
// verify required parameter 'youtube_id' is not null or undefined
10723+
assertParamExists('videoShortsRetrieve', 'youtube_id', youtube_id)
10724+
const localVarPath = `/api/v0/video_shorts/{youtube_id}/`
10725+
.replace(`{${"youtube_id"}}`, encodeURIComponent(String(youtube_id)));
10726+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
10727+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
10728+
let baseOptions;
10729+
if (configuration) {
10730+
baseOptions = configuration.baseOptions;
10731+
}
10732+
10733+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
10734+
const localVarHeaderParameter = {} as any;
10735+
const localVarQueryParameter = {} as any;
10736+
10737+
10738+
10739+
setSearchParams(localVarUrlObj, localVarQueryParameter);
10740+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
10741+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
10742+
10743+
return {
10744+
url: toPathString(localVarUrlObj),
10745+
options: localVarRequestOptions,
10746+
};
10747+
},
10748+
}
10749+
};
10750+
10751+
/**
10752+
* VideoShortsApi - functional programming interface
10753+
* @export
10754+
*/
10755+
export const VideoShortsApiFp = function(configuration?: Configuration) {
10756+
const localVarAxiosParamCreator = VideoShortsApiAxiosParamCreator(configuration)
10757+
return {
10758+
/**
10759+
* Get a paginated list of video shorts.
10760+
* @param {number} [limit] Number of results to return per page.
10761+
* @param {number} [offset] The initial index from which to return the results.
10762+
* @param {*} [options] Override http request option.
10763+
* @throws {RequiredError}
10764+
*/
10765+
async videoShortsList(limit?: number, offset?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<PaginatedVideoShortList>> {
10766+
const localVarAxiosArgs = await localVarAxiosParamCreator.videoShortsList(limit, offset, options);
10767+
const index = configuration?.serverIndex ?? 0;
10768+
const operationBasePath = operationServerMap['VideoShortsApi.videoShortsList']?.[index]?.url;
10769+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath);
10770+
},
10771+
/**
10772+
* Retrieve a single video short.
10773+
* @param {string} youtube_id A unique value identifying this video short.
10774+
* @param {*} [options] Override http request option.
10775+
* @throws {RequiredError}
10776+
*/
10777+
async videoShortsRetrieve(youtube_id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<VideoShort>> {
10778+
const localVarAxiosArgs = await localVarAxiosParamCreator.videoShortsRetrieve(youtube_id, options);
10779+
const index = configuration?.serverIndex ?? 0;
10780+
const operationBasePath = operationServerMap['VideoShortsApi.videoShortsRetrieve']?.[index]?.url;
10781+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath);
10782+
},
10783+
}
10784+
};
10785+
10786+
/**
10787+
* VideoShortsApi - factory interface
10788+
* @export
10789+
*/
10790+
export const VideoShortsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
10791+
const localVarFp = VideoShortsApiFp(configuration)
10792+
return {
10793+
/**
10794+
* Get a paginated list of video shorts.
10795+
* @param {VideoShortsApiVideoShortsListRequest} requestParameters Request parameters.
10796+
* @param {*} [options] Override http request option.
10797+
* @throws {RequiredError}
10798+
*/
10799+
videoShortsList(requestParameters: VideoShortsApiVideoShortsListRequest = {}, options?: RawAxiosRequestConfig): AxiosPromise<PaginatedVideoShortList> {
10800+
return localVarFp.videoShortsList(requestParameters.limit, requestParameters.offset, options).then((request) => request(axios, basePath));
10801+
},
10802+
/**
10803+
* Retrieve a single video short.
10804+
* @param {VideoShortsApiVideoShortsRetrieveRequest} requestParameters Request parameters.
10805+
* @param {*} [options] Override http request option.
10806+
* @throws {RequiredError}
10807+
*/
10808+
videoShortsRetrieve(requestParameters: VideoShortsApiVideoShortsRetrieveRequest, options?: RawAxiosRequestConfig): AxiosPromise<VideoShort> {
10809+
return localVarFp.videoShortsRetrieve(requestParameters.youtube_id, options).then((request) => request(axios, basePath));
10810+
},
10811+
};
10812+
};
10813+
10814+
/**
10815+
* Request parameters for videoShortsList operation in VideoShortsApi.
10816+
* @export
10817+
* @interface VideoShortsApiVideoShortsListRequest
10818+
*/
10819+
export interface VideoShortsApiVideoShortsListRequest {
10820+
/**
10821+
* Number of results to return per page.
10822+
* @type {number}
10823+
* @memberof VideoShortsApiVideoShortsList
10824+
*/
10825+
readonly limit?: number
10826+
10827+
/**
10828+
* The initial index from which to return the results.
10829+
* @type {number}
10830+
* @memberof VideoShortsApiVideoShortsList
10831+
*/
10832+
readonly offset?: number
10833+
}
10834+
10835+
/**
10836+
* Request parameters for videoShortsRetrieve operation in VideoShortsApi.
10837+
* @export
10838+
* @interface VideoShortsApiVideoShortsRetrieveRequest
10839+
*/
10840+
export interface VideoShortsApiVideoShortsRetrieveRequest {
10841+
/**
10842+
* A unique value identifying this video short.
10843+
* @type {string}
10844+
* @memberof VideoShortsApiVideoShortsRetrieve
10845+
*/
10846+
readonly youtube_id: string
10847+
}
10848+
10849+
/**
10850+
* VideoShortsApi - object-oriented interface
10851+
* @export
10852+
* @class VideoShortsApi
10853+
* @extends {BaseAPI}
10854+
*/
10855+
export class VideoShortsApi extends BaseAPI {
10856+
/**
10857+
* Get a paginated list of video shorts.
10858+
* @param {VideoShortsApiVideoShortsListRequest} requestParameters Request parameters.
10859+
* @param {*} [options] Override http request option.
10860+
* @throws {RequiredError}
10861+
* @memberof VideoShortsApi
10862+
*/
10863+
public videoShortsList(requestParameters: VideoShortsApiVideoShortsListRequest = {}, options?: RawAxiosRequestConfig) {
10864+
return VideoShortsApiFp(this.configuration).videoShortsList(requestParameters.limit, requestParameters.offset, options).then((request) => request(this.axios, this.basePath));
10865+
}
10866+
10867+
/**
10868+
* Retrieve a single video short.
10869+
* @param {VideoShortsApiVideoShortsRetrieveRequest} requestParameters Request parameters.
10870+
* @param {*} [options] Override http request option.
10871+
* @throws {RequiredError}
10872+
* @memberof VideoShortsApi
10873+
*/
10874+
public videoShortsRetrieve(requestParameters: VideoShortsApiVideoShortsRetrieveRequest, options?: RawAxiosRequestConfig) {
10875+
return VideoShortsApiFp(this.configuration).videoShortsRetrieve(requestParameters.youtube_id, options).then((request) => request(this.axios, this.basePath));
10876+
}
10877+
}
10878+
10879+
10880+
1057210881
/**
1057310882
* WebsitesApi - axios parameter creator
1057410883
* @export

0 commit comments

Comments
 (0)