organize
This commit is contained in:
parent
cd5b65b3cc
commit
c5de68d6b1
2
.gitignore
vendored
2
.gitignore
vendored
@ -4,4 +4,4 @@
|
||||
/dvenv
|
||||
copy.txt
|
||||
user_location.db
|
||||
|
||||
/utils/.env
|
||||
|
||||
@ -2,12 +2,12 @@ import os
|
||||
import discord
|
||||
import datetime
|
||||
from google_auth_oauthlib.flow import InstalledAppFlow
|
||||
from weather import OpenWeatherMapAPIClient
|
||||
from utils.weather import OpenWeatherMapAPIClient
|
||||
from googleapiclient.discovery import build
|
||||
from google.oauth2.credentials import Credentials
|
||||
from discord.ext import commands
|
||||
from dotenv import load_dotenv
|
||||
from database import UserLocation
|
||||
from utils.database import UserLocation
|
||||
from asyncio import to_thread
|
||||
|
||||
load_dotenv()
|
||||
|
||||
BIN
utils/__pycache__/database.cpython-313.pyc
Normal file
BIN
utils/__pycache__/database.cpython-313.pyc
Normal file
Binary file not shown.
BIN
utils/__pycache__/weather.cpython-313.pyc
Normal file
BIN
utils/__pycache__/weather.cpython-313.pyc
Normal file
Binary file not shown.
@ -1,10 +1,15 @@
|
||||
import requests
|
||||
import os
|
||||
from geopy.geocoders import Nominatim
|
||||
from dotenv import load_dotenv
|
||||
|
||||
load_dotenv()
|
||||
WEATHER_TOKEN = os.getenv("WEATHER_TOKEN")
|
||||
|
||||
class OpenWeatherMapAPIClient:
|
||||
def __init__(self, api_token, name):
|
||||
self.base_url = "https://api.openweathermap.org"
|
||||
self._api_token = "c6ee0c7c013f6d4bc9dc20982aecb6ec"
|
||||
self._api_token = WEATHER_TOKEN
|
||||
self.name = name
|
||||
|
||||
def get_geodata(self, location):
|
||||
Loading…
x
Reference in New Issue
Block a user