diff options
author | 2012-02-03 14:45:32 +0100 | |
---|---|---|
committer | 2012-02-03 14:46:54 +0100 | |
commit | f01bc94a33d8644da65b5fa895c222e9ee057b50 (patch) | |
tree | 3bfc837901a54f97a30f1d24431d8322906de192 /github3/services/base.py | |
parent | Pypi environment by setuptools (diff) | |
download | python-github3-f01bc94a33d8644da65b5fa895c222e9ee057b50.tar.xz python-github3-f01bc94a33d8644da65b5fa895c222e9ee057b50.zip |
Fix imports to new environment
Absolute imports as PEP8 tells
Diffstat (limited to 'github3/services/base.py')
-rw-r--r-- | github3/services/base.py | 41 |
1 files changed, 0 insertions, 41 deletions
diff --git a/github3/services/base.py b/github3/services/base.py deleted file mode 100644 index c74aa2e..0000000 --- a/github3/services/base.py +++ /dev/null @@ -1,41 +0,0 @@ -#!/usr/bin/env python -# -*- encoding: utf-8 -*- - -from core.client import Client - -class Base(object): - - def __init__(self, **config): - self.client = Client(**config) - - def get_user(self): - return self.client.user - - def set_user(self, user): - self.client.user = user - - def get_repo(self): - return self.client.repo - - def set_repo(self, repo): - self.client.repo = repo - - def _get_result(self, resource, **kwargs): - return Result(self.client.get, resource, **kwargs) - -class Result(object): # move - - def __init__(self, method, resource, **kwargs): - self.method = method - self.resource= resource - self.args = kwargs - - def __repr__(self): - pass - - def process(self): - model = self.resource.get_model() - raw = self.method(self.resource, **self.args) - if model: - import json - return model.loads(json.loads(raw.content)) |