diff --git a/kibicara/platforms/twitter/__init__.py b/kibicara/platforms/twitter/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/kibicara/platforms/twitter/model.py b/kibicara/platforms/twitter/model.py new file mode 100644 index 0000000..772b16e --- /dev/null +++ b/kibicara/platforms/twitter/model.py @@ -0,0 +1,18 @@ +# Copyright (C) 2020 by Cathy Hu +# +# SPDX-License-Identifier: 0BSD + +from kibicara.model import Hood, Mapping +from ormantic import Integer, ForeignKey, Model, Text + + +class Twitter(Model): + id: Integer(primary_key=True) = None + hood: ForeignKey(Hood) + dms_since_id: Integer() + mentions_since_id: Integer() + access_token: Text() + access_token_secret: Text() + + class Mapping(Mapping): + table_name = 'twitterbots' diff --git a/kibicara/platforms/twitter/webapi.py b/kibicara/platforms/twitter/webapi.py new file mode 100644 index 0000000..40f6c13 --- /dev/null +++ b/kibicara/platforms/twitter/webapi.py @@ -0,0 +1,10 @@ +# Copyright (C) 2020 by Cathy Hu +# +# SPDX-License-Identifier: 0BSD + +from fastapi import APIRouter +from kibicara.platforms.twitter.bot import spawner +from kibicara.platforms.twitter.model import Twitter + + +router = APIRouter()