aa
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -1,2 +1,3 @@
|
||||
|
||||
.codegpt
|
||||
.codegpt
|
||||
contacts.db
|
||||
|
||||
BIN
contacts.db
BIN
contacts.db
Binary file not shown.
6
main.py
6
main.py
@@ -1,6 +0,0 @@
|
||||
def main():
|
||||
print("Hello from whatsapp-api!")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
@@ -29,10 +29,6 @@ def createContactsDB():
|
||||
except sqlite3.OperationalError as e:
|
||||
print("Failed to create tables:", e)
|
||||
|
||||
async def fetch(client, url):
|
||||
response = await client.get(url)
|
||||
return response.json()
|
||||
|
||||
def getContactList():
|
||||
api = f'{url}/getContacts/{session}'
|
||||
with httpx.Client() as client:
|
||||
@@ -53,6 +49,10 @@ def init_db():
|
||||
except sqlite3.OperationalError as e:
|
||||
print("Failed to load table:", e)
|
||||
|
||||
async def fetch(client, url):
|
||||
response = await client.get(url)
|
||||
return response.json()
|
||||
|
||||
async def main():
|
||||
init_db()
|
||||
'''
|
||||
@@ -63,7 +63,5 @@ async def main():
|
||||
print(result)
|
||||
'''
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
asyncio.run(main())
|
||||
|
||||
asyncio.run(main())
|
||||
Reference in New Issue
Block a user