diff options
| author | yo mama <pepper@scannerjammer.com> | 2015-03-11 02:51:58 -0700 |
|---|---|---|
| committer | yo mama <pepper@scannerjammer.com> | 2015-03-11 02:51:58 -0700 |
| commit | a5123bfab06f7fd8884b9b4f12f579dceec43aa1 (patch) | |
| tree | 5120729cadf48ce97caeb90c34b850308c9a9f21 /Pb_Api/ImGradient/__init__.py | |
| parent | d9651ca5fb6c655afbe88a014c8bb8a8f000a70d (diff) | |
finished OOP rewriteOOP
Diffstat (limited to 'Pb_Api/ImGradient/__init__.py')
| -rw-r--r-- | Pb_Api/ImGradient/__init__.py | 35 |
1 files changed, 9 insertions, 26 deletions
diff --git a/Pb_Api/ImGradient/__init__.py b/Pb_Api/ImGradient/__init__.py index 18c27c0..1f90bbe 100644 --- a/Pb_Api/ImGradient/__init__.py +++ b/Pb_Api/ImGradient/__init__.py @@ -1,30 +1,13 @@ #!/usr/bin/python2.7 -import urllib -import urllib2 -import simplejson as json -import random -import sys -from lib.utils import post_request, Pb_Api +from Pb_Api import Pb_Api +from Pb_Api.ImGradient.Params import ImGradient_Params +from config import IMGRADIENT_URL - -IMGRADIENT_URL = "http://asdf.us/im/api/imgradient" -#from Api.ImGradient.Api import * - -class ImGradientApi(Pb_Api): +class Pb_Api_ImGradient(Pb_Api): def __init__(self): self.url = IMGRADIENT_URL - self._required_keys = [ - "width", "height", - "color1", "color2", - "stripes", - "stripenumber", "stripeintensity", - "blurriness", - "contrast", - "brightness", "saturation", "hue", - "halftone", - "bevel", "percentbeveled", - "rotate", "flip", "flop", "tilt", - "filetype", - "gradienttype", - "username", - ] + def params_init(self): + new_params = ImGradient_Params() + #new_params = self.get_from_server() + new_params.api = self + return new_params |
