+ updated readme and no more .env files

This commit is contained in:
Itsigo
2025-11-12 15:56:28 +01:00
parent b3193a10f9
commit 5467ddcbba
7 changed files with 65 additions and 18 deletions

View File

@@ -6,16 +6,17 @@ import (
"io"
"net/http"
"net/url"
"os"
_ "github.com/joho/godotenv/autoload"
)
var (
token = os.Getenv("TMDB_API_KEY")
apiurl = "https://api.themoviedb.org/3/"
token = ""
)
func Init(apitoken string) {
token = apitoken
}
func request(requrl string) (*http.Response, []byte) {
req, _ := http.NewRequest("GET", apiurl+requrl, nil)