mirror of
https://github.com/Itsig0/pocketmovie.git
synced 2026-01-22 08:24:38 +00:00
+ updated readme and no more .env files
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user