# Path: wapiti.py
# def get_url(url, params=None, raise_exc=True):
#     resp = FakeResponse()
#     try:
#         resp = fake_requests(url, params)
#     except Exception as e:
#         if raise_exc:
#             raise
#         else:
#             resp.error = e
#     return resp


from base import Input
from wapiti import get_url

class Wikitrust(Input):
    prefix = 'wt'
    def fetch(self):
        # TODO need rev_id

# Path: wapiti.py
# def get_url(url, params=None, raise_exc=True):
#     resp = FakeResponse()
#     try:
#         resp = fake_requests(url, params)
#     except Exception as e:
#         if raise_exc:
#             raise
#         else:
#             resp.error = e
#     return resp


# Path: inputs/wikitrust.py
from base import Input
from wapiti import get_url


class Wikitrust(Input):
    prefix = 'wt'
    def fetch(self):
        # TODO need rev_id

        return get_url('http://en.collaborativetrust.com/WikiTrust/RemoteAPI?method=quality&revid=' + str(self.page_id))