Skip to content

This project is a simple REST API for retrieving video information and download links. It serves as an educational representation of the proxy pattern in Golang.

Notifications You must be signed in to change notification settings

stas-bukovskiy/media-downloader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Video Information and Download Links API

This project is a simple REST API for retrieving video information and download links. It serves as an educational representation of the proxy pattern in Golang.

Prerequisites

  • Go 1.21 or later

Configuration

Create a .env file in the root directory of the project with the following content:

API_KEY=<your_api_key>
APP_PORT=<port_number>

Replace <your_api_key> with your actual API key and <port_number> with the port number you want to run the server on.

Running the Server

  1. Clone the repository:
git clone https://github.com/yourusername/yourrepository.git
  1. Navigate to the project directory:
cd yourrepository
  1. Install the required dependencies:
go mod tidy
  1. Load the environment variables:
source .env
  1. Start the server:
go run cmd/main.go

The server will start listening on the port specified in the .env file.

Infrastructure Diagram

The following diagram depicts the infrastructure of the application:

uml_diagram.png

Endpoints

  • /meta-info?url=<video_url>: Returns the meta information of the video specified by <video_url>.
  • /download-links?url=<video_url>: Returns the download links of the video specified by <video_url>. Replace <video_url> with the actual URL of the video you want to query.

About

This project is a simple REST API for retrieving video information and download links. It serves as an educational representation of the proxy pattern in Golang.

Topics

Resources

Stars

Watchers

Forks

Languages