TubeToYou (YoDo)
TubeToYou is an API server written in Go that provides functionality to retrieve information about YouTube videos and playlists, as well as the ability to download them.
The API documentation can be found in the api.yml
file (OpenAPI v3.0.2).
Dependencies
The server relies on the following dependencies:
github.com/google/uuid
v1.3.0
github.com/gorilla/mux
v1.8.0
github.com/kkdai/youtube/v2
v2.8.1
github.com/rs/zerolog
v1.29.1
Environment Variables
By default, the server will use the following environment variables:
LOG_FORMAT
(default: "pretty")
LOG_LEVEL
(default: 0)
YOUTUBE_DEBUG
(default: "false")
YOUTUBE_MAX_ROUTINES
(default: 10)
YOUTUBE_CHUNK_SIZE
(default: 10)
Feel free to modify these variables according to your needs.
Getting Started
Running Locally
To set up and run the TubeToYou API server locally, you will need Go 1.20.4 installed on your system. Follow these steps:
- Clone the repository:
git clone https://github.com/Jak3BD/TubeToYou.git
- Change to the project directory:
cd TubeToYou
- Install the required dependencies:
go mod download && go mod verify
- Build the server:
cd src && go build -v -o tubetoyou .
- Run the server:
./tubetoyou
Using Docker
Alternatively, you can run TubeToYou using Docker. A Dockerfile is provided for easy containerization. Follow these steps:
- Clone the repository:
git clone https://github.com/Jak3BD/TubeToYou.git
- Change to the project directory:
cd TubeToYou
- Build the Docker image:
docker build -t tubetoyou .
- Run the Docker container:
docker run -p 8080:8080 tubetoyou
The server will be accessible at http://localhost:8080
Development
During development, you can use the Air tool for hot-reloading.
An .air.toml
configuration file is included in the project.
API Documentation
Please refer to the api.yml
file for detailed documentation on the available API endpoints etc.
Contributing
Contributions to TubeToYou are welcome!
If you find any issues or have suggestions for improvement, please open an issue or submit a pull request.