API Reference

This document outlines the specific Google API endpoints invoked by the client-side JavaScript.

Google Drive API v3

files.list

Used universally across the site (Study Materials, Gallery, Newsletters) to retrieve the contents of a specific folder.

Parameters Used:

Implementation: Located in assets/js/components/YouTubeHandler.js as fetchFileName(folderId).


YouTube Data API v3

playlistItems.list

Used to fetch video details from curated study playlists.

Parameters Used:

Implementation: Located in assets/js/components/YouTubeHandler.js as fetchPlaylistVideos(playlistId).


Error Handling Standards

All fetch wrappers must implement a try...catch block. If an API fails (e.g., 403 Quota Exceeded, 404 Not Found), the application gracefully degrades by injecting an error state into the DOM rather than crashing the execution thread.