diff options
Diffstat (limited to 'ricky/pbpattern')
| -rwxr-xr-x | ricky/pbpattern/__init__.py | 12 | ||||
| -rw-r--r-- | ricky/pbpattern/params.py | 25 |
2 files changed, 0 insertions, 37 deletions
diff --git a/ricky/pbpattern/__init__.py b/ricky/pbpattern/__init__.py deleted file mode 100755 index 78af181..0000000 --- a/ricky/pbpattern/__init__.py +++ /dev/null @@ -1,12 +0,0 @@ -from ricky.pb import Pb -from ricky.pbpattern.params import Params - - -class PbPattern(Pb): - def __init__(self): - pass - - def params_init(self): - new_params = Params() - new_params.api = self - return new_params diff --git a/ricky/pbpattern/params.py b/ricky/pbpattern/params.py deleted file mode 100644 index 8c3a885..0000000 --- a/ricky/pbpattern/params.py +++ /dev/null @@ -1,25 +0,0 @@ -from ricky.params import Params as _Params -from ricky.param.username import Username -from ricky.param.imageurl import PbageUrl -from ricky.param.enum import Enum -from ricky.config import PATTERN_URL_BASE, PBPATTERN_URL - - -class Params(_Params): - def __init__(self): - super(Params, self).__init__( - Username(name="username", required=False), - PbageUrl(name="image_url", required=True), - Enum( - name="pattern_url", - required=True, - options=self._get_pattern_urls() - ) - ) - self._url = PBPATTERN_URL - - def _get_pattern_urls(self): - return set( - ["%s/img/%s.png" % (PATTERN_URL_BASE, i) for i in xrange(0, 97)] + - ["%s/img/a%s.png" % (PATTERN_URL_BASE, i) for i in xrange(1, 42)] - ) |
