[WIP] New Header Work (#33)
* update Studio header to include dropdown menus and internationalization * Added header improvements (#34) Added header improvements Squashing commits for header improvements added header improvements fixed typo moved api call to separate file added course lockup to mobile header, removed snapshot tests fixed css for mobile header simplified css styling updated testing updated css styling updated css simplified course lockup removed React fragments from lockup fixed mobile header styling Co-authored-by: alangsto <46360176+alangsto@users.noreply.github.com>
This commit is contained in:
22
src/data/services/LmsApiService.js
Normal file
22
src/data/services/LmsApiService.js
Normal file
@@ -0,0 +1,22 @@
|
||||
import { getAuthenticatedHttpClient } from '@edx/frontend-platform/auth';
|
||||
import { getConfig, ensureConfig } from '@edx/frontend-platform';
|
||||
|
||||
ensureConfig([
|
||||
'LMS_BASE_URL',
|
||||
], 'LMS API service');
|
||||
|
||||
const lmsBaseUrl = getConfig().LMS_BASE_URL;
|
||||
|
||||
class LmsApiService {
|
||||
static getCourseDetailsUrl(courseID) {
|
||||
return `${lmsBaseUrl}/api/courses/v1/courses/${courseID}`;
|
||||
}
|
||||
|
||||
static getCourseDetailsData(courseID) {
|
||||
const apiClient = getAuthenticatedHttpClient();
|
||||
const url = LmsApiService.getCourseDetailsUrl(courseID);
|
||||
return apiClient.get(url);
|
||||
}
|
||||
}
|
||||
|
||||
export default LmsApiService;
|
||||
Reference in New Issue
Block a user