This commit is contained in:
2025-04-20 10:49:49 +02:00
parent 5d70fe1ba2
commit 3bd267d396
4 changed files with 7 additions and 14 deletions

3
.gitignore vendored
View File

@@ -1,2 +1,3 @@
.codegpt
.codegpt
contacts.db

Binary file not shown.

View File

@@ -1,6 +0,0 @@
def main():
print("Hello from whatsapp-api!")
if __name__ == "__main__":
main()

View File

@@ -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())