📝 Docs about the socket.io-connection

This commit is contained in:
Mawoka
2022-03-12 18:35:43 +01:00
parent a089dbf6eb
commit d48ab734a5
6 changed files with 178 additions and 137 deletions
+40
View File
@@ -0,0 +1,40 @@
# Kahoot-Importer
With this package you can search kahoot-quizzes and get their data.
This library is also tested.
## Get
```python
from classquiz.kahoot_importer.get import get, _Response
from asyncio import run
# _Response ia a pydantic-object, so you have access to
# .dict() or .json(exclude={"kahoot"})
async def main():
kahoot_quiz: _Response = await get("GAME_ID")
print(kahoot_quiz.json(exclude={"kahoot"}))
run(main())
```
## Search
```python
from classquiz.kahoot_importer.search import search, _Response
from asyncio import run
# _Response ia a pydantic-object, so you have access to
# .dict() or .json(exclude={"kahoot"})
async def main():
kahoot_quizzes: _Response = await search("QUERY")
print(kahoot_quizzes.json())
run(main())
```
## Import-Quiz
This script is meant just to be used with classquiz, not alone.
---
*Kahoot! and the K! logo are trademarks of Kahoot! AS*
-1
View File
@@ -1,7 +1,6 @@
from pydantic import BaseModel
from uuid import UUID
from typing import List, Any, Optional
from enum import Enum
class _CoverMetadata(BaseModel):