initial commit
This commit is contained in:
commit
2e3553044c
7 changed files with 145 additions and 0 deletions
39
spaceapi.py
Normal file
39
spaceapi.py
Normal file
|
@ -0,0 +1,39 @@
|
|||
from dataclasses import dataclass, field
|
||||
from typing import List, Optional
|
||||
from datetime import datetime
|
||||
import time
|
||||
|
||||
@dataclass
|
||||
class Location:
|
||||
address: str
|
||||
lat: float
|
||||
lon: float
|
||||
|
||||
@dataclass
|
||||
class Contact:
|
||||
email: str
|
||||
irc: str
|
||||
ml: str
|
||||
matrix: str
|
||||
|
||||
@dataclass
|
||||
class State:
|
||||
open: bool
|
||||
lastchange: int = field(default_factory=lambda: int(time.time()))
|
||||
|
||||
@dataclass
|
||||
class LinkedSpace:
|
||||
endpoint: str
|
||||
website: str
|
||||
|
||||
@dataclass
|
||||
class SpaceAPI:
|
||||
api_compatibility: List[str]
|
||||
space: str
|
||||
logo: str
|
||||
url: str
|
||||
location: Location
|
||||
contact: Contact
|
||||
state: State
|
||||
projects: List[str]
|
||||
linked_spaces: List[LinkedSpace]
|
Loading…
Add table
Add a link
Reference in a new issue