summaryrefslogtreecommitdiff
path: root/ricky/pbpattern/params.py
diff options
context:
space:
mode:
authorpepperpepperpepper <pepper@scannerjammer.com>2015-12-06 17:31:00 -0800
committerpepperpepperpepper <pepper@scannerjammer.com>2015-12-06 17:31:00 -0800
commitf72d7dc6a5a926f56790151e3dde36eaf7978ba0 (patch)
tree1620560f424ffc558ac30ae1b6246d4b7df2eeac /ricky/pbpattern/params.py
parent8ebd9d7eb7b3289a722cdae6a4bdcdd4cd21ff86 (diff)
cleaned up names
Diffstat (limited to 'ricky/pbpattern/params.py')
-rw-r--r--ricky/pbpattern/params.py24
1 files changed, 24 insertions, 0 deletions
diff --git a/ricky/pbpattern/params.py b/ricky/pbpattern/params.py
new file mode 100644
index 0000000..ea789cd
--- /dev/null
+++ b/ricky/pbpattern/params.py
@@ -0,0 +1,24 @@
+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
+
+
+class Params(_Params):
+ def __init__(self):
+ self._params = (
+ Username(name="username", required=False),
+ PbageUrl(name="image_url", required=True),
+ Enum(
+ name="pattern_url",
+ required=True,
+ options=self._get_pattern_urls()
+ )
+ )
+
+ 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)]
+ )