After following the installation process below and starting project, the api shall be listening for requests at port 3000.
/
Home path, app shall respond with a simple json acknowledgement
/search/< query >
Insert query which you want your Data API v3 to send results for, which will be sorted by latest uploaded and return max responses of 2 ( hard coded, can change at ./controllers/searchController.js)
/find/< query >
Filter responses by video's title or description or both. Server expects them to be values of keys: "title" "description" in url query strings.
The < query > must have been searched for before in order to filter by title or description.
Visit Google Api Console, https://console.cloud.google.com/
Create a new project and enable the Yt Data API v3 at https://console.cloud.google.com/apis/api/youtube.googleapis.com
Create Credentials and secure the key to allow access to only the created api, and download credentials into your project folder.
Preferrably procure multiple keys as the project will automatically cycles through keys, as their request quotas get exhausted.
git clone https://github.com/<Your_Username>/YoutubeSearchApi.git
Copy and export the Mongo connection uri into a file at ./config/mongouri.js from your project.
Copy and export (as an array) the set of all api keys at ./config/apiKey.js from your project.
This requires your machine to have Docker runtime installed. If it isnt already install by refering these
(Windows) https://docs.docker.com/docker-for-windows/install/
(Linux) https://docs.docker.com/engine/install/ (Browse by distributions)
Further Install docker compose https://docs.docker.com/compose/install/
Create docker image and containers
docker-compose up --build
npm init -y
npm install i
npm run test
npm run start