YT Subscriber Tracker is a simple Node.js application designed to fetch and display YouTube subscribers. It provides endpoints to retrieve subscriber data in different formats.
- Retrieve all subscribers
- Retrieve subscribers' names and subscribed channels
- Retrieve a specific subscriber by ID
To get started with the project, follow these steps:
- Clone the repository:
git clone https://github.com/your-username/get-youtube-subscribers.git - Navigate to the project directory:
cd get-youtube-subscribers - Install dependencies:
npm install - Start the server:
npm start - The server will be running at
http://localhost:3000
Endpoint: GET http://localhost:3000/subscribers
Response: An array of subscribers (an Object)
Endpoint: GET http://localhost:3000/subscribers/names
Response: An array of subscribers (an Object with only two fields: name and subscribedChannel)
Endpoint: GET http://localhost:3000/subscribers/:id
Response: A subscriber (an object) with the given ID. Returns a status code 400 and an error message {message: error.message} if the ID does not match.
Contributions are welcome! Feel free to submit issues or pull requests.