blukat29 / notifyhere

Notifications dashboard
MIT License
0 stars 0 forks source link

Long term design #2

Open blukat29 opened 10 years ago

blukat29 commented 10 years ago

As of 2014-08-14.

Modules

notifyhere/
    notifyhere/
        __init__.py
        settings.py
        urls.py
        wsgi.py
        secrets.py      --for DB info and domain name.
    dash/           -- the main application.
        __init__.py
        urls.py
        views.py
        api/
            __init__.py
            base.py
            tools.py
            slack.py    \
            github.py    | Service specific implementations.
                ...     /
            secrets.py      -- domain name, keys and secrets for OAuth.
blukat29 commented 10 years ago

Api Classes

All definitions are under submodule notifyhere.dash.api

LEGEND:

  Access    |  Static    |  Abstract
------------|------------|------------
+ public    | s static   | a abstract
. protected | . instance | . concrete
- private   |            |

base.ApiBase

+ . . name
+ . . is_auth
+ . . username
+ . . __init__(name)
+ s a icon_url()
+ . a oauth_link()
+ . a oauth_callback(params)
+ . a update()
+ . a logout()
+ . a pack()
+ . a unpack()
+ . . __str__()

slack.SlackApi(base.ApiBase) --oauth-2.0

- . . state
- . . token
- s . api_call(conn, job, args)

github.GithubApi(base.ApiBase) --oauth-2.0

- . . state
- . . token
- s . api_call(conn, job, args)

twitter.TwitterApi(base.ApiBase) --oauth-1.0a

- . . request_token
- . . oauth_verifier
- . . access_token
- . . access_token_secret
- s . sign_request(method, url, params)
- s . get_timestamp()
- . . api_call(conn, job, args)