
Security News
ESLint Adds Official Support for Linting HTML
ESLint now supports HTML linting with 48 new rules, expanding its language plugin system to cover more of the modern web development stack.
github.com/BHAVYAghub/Youtube-API
A Golang application which shows Youtube videos data of any search query. Database will be filled with new data calling youtube API every minute using a cron job.
docker compose up --build
go run main.go
command in project's root directory.Note:
localhost
is set to db
in MONGO_URI
config present in .env file due to container network.The following configs are to be set in .env file.
See .env file for example values.
Name | Description |
---|---|
MONGODB_URI | Describes the mongoDB connection URI. |
MONGODB_COLLECTION_NAME | Describes the mongoDB connection name. |
MONGODB_DATABASE_NAME | Describes the mongoDB database name. |
YT_API_KEY | Describes the API-keys to be used for calling YT endpoints. comma separated API keys. (next key will be used when one is exhausted) |
YT_QUERY_STRING | Describes the query string to be used to fetch YT records and save in DB. |
YT_API_BASE_URL | Describes the YT Api Base URL. |
YT_FETCH_RECORDS_AFTER | Describes the time after which the YT records are to be fetched and saved. |
YT_API_FETCH_INTERVAL | Describes the interval to call the scheduler to fetch youtube records in minutes. (default 1) |
PORT | Describes the port on which application will run. |
DISABLE_CRON | kill switch to disable the youTube data fetching scheduler. (default false) |
page
default as 1.limit
default as 5.METHOD | ENDPOINT | Description |
---|---|---|
GET | /youtube/findAll | Fetches the youtube records saved in DB, sorted in reverse chronological order of their publishing date-time. |
GET | /youtube/find | Fetches the youtube records saved in DB, sorted in reverse chronological order of their publishing date-time on the basis of search query param (fuzzy serach). |
Note:
Carefully set the YT_FETCH_RECORDS_AFTER
config as this might exhaust your quota.
Set the configs before running the application.
Api keys are considered as secret. For security purposes, API keys have not been logged anywhere.
FAQs
Unknown package
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
ESLint now supports HTML linting with 48 new rules, expanding its language plugin system to cover more of the modern web development stack.
Security News
CISA is discontinuing official RSS support for KEV and cybersecurity alerts, shifting updates to email and social media, disrupting automation workflows.
Security News
The MCP community is launching an official registry to standardize AI tool discovery and let agents dynamically find and install MCP servers.