diff --git a/src/library-authoring/data/api.ts b/src/library-authoring/data/api.ts index 516649764d..0cfe3a6dea 100644 --- a/src/library-authoring/data/api.ts +++ b/src/library-authoring/data/api.ts @@ -35,17 +35,6 @@ export const getLibraryPasteClipboardUrl = (libraryId: string) => `${getApiBaseU */ export const getXBlockFieldsApiUrl = (usageKey: string) => `${getApiBaseUrl()}/api/xblock/v2/xblocks/${usageKey}/fields/`; -/** - * Get the URL that render the XBlock in the LMS. - */ -export const getXBlockRenderUrl = (usageKey: string) => `${getApiBaseUrl()}/api/xblock/v2/xblocks/${usageKey}/view/student_view/`; - -/** - * Get the URL for the xblock handler API. - * The string `handler_name` is a placeholder for the name of the handler. - */ -export const getXBlockHandlerUrlUrl = (usageKey: string) => `${getApiBaseUrl()}/api/xblock/v2/xblocks/${usageKey}/handler_url/handler_name/`; - export interface ContentLibrary { id: string; type: string; @@ -144,18 +133,6 @@ export interface UpdateXBlockFieldsRequest { }; } -export interface XBlockRenderResource { - data: string; - kind: 'url'; - mimetype: string; - placement: 'head' | 'foot'; -} - -export interface XBlockRenderResponse { - content: string; - resources: XBlockRenderResource[]; -} - /** * Fetch block types of a library */ @@ -273,19 +250,3 @@ export async function updateXBlockFields(usageKey:string, xblockData: UpdateXBlo const client = getAuthenticatedHttpClient(); await client.post(getXBlockFieldsApiUrl(usageKey), xblockData); } - -/** - * Get rendered xblock - */ -export async function getXBlockRender(usageKey: string): Promise { - const { data } = await getAuthenticatedHttpClient().get(getXBlockRenderUrl(usageKey)); - return camelCaseObject(data); -} - -/** - * Get the URL of the xblock handler. - */ -export const getXBlockHandlerUrl = async (usageKey: string): Promise => { - const { data } = await getAuthenticatedHttpClient().get(getXBlockHandlerUrlUrl(usageKey)); - return data.handler_url; -};