# Path: sofine/plugins/plugin_base.py
# class PluginBase(object):
#     def __init__(self):
#     def get_adds_keys(self):
#     def parse_args(self, argv):
#     def get_schema(self, args=None):
#     def get_namespaced_schema(self):


import urllib
import urllib2
import json
from sofine.plugins import plugin_base as plugin_base
        ],
        creator: [
            "NASA/Glenn Research Center"
        ],
        score: 2.617863
    }
"""
    return [['year', 'title', 'description', 'mediatype', 'publicdate', 'downloads', 'week',
             'month', 'identifier', 'format', 'collection', 'creator', 'score']]


def query_archive_dot_org(k):
    """
* `k` - `string`. The query term.

Helper that calls archive.org API with a query and returns JSON results set. 
Returns an array of JSON objects in the `['response']['docs']` value. 
"""    
    url = 'http://archive.org/advancedsearch.php?q={0}&output=json'.format(urllib.quote(k))
    ret = urllib2.urlopen(url)
    ret = ret.read()
    ret = json.loads(ret)
    if ret:
        ret = {'docs' : ret['response']['docs']}
    else:
        ret = {'docs' : []}

    return ret



# Path: sofine/plugins/plugin_base.py
# class PluginBase(object):
#     def __init__(self):
#     def get_adds_keys(self):
#     def parse_args(self, argv):
#     def get_schema(self, args=None):
#     def get_namespaced_schema(self):


# Path: sofine/plugins/example/archive_dot_org_search_results.py
import urllib
import urllib2
import json
from sofine.plugins import plugin_base as plugin_base

        ],
        creator: [
            "NASA/Glenn Research Center"
        ],
        score: 2.617863
    }
"""
    return [['year', 'title', 'description', 'mediatype', 'publicdate', 'downloads', 'week',
             'month', 'identifier', 'format', 'collection', 'creator', 'score']]


def query_archive_dot_org(k):
    """
* `k` - `string`. The query term.

Helper that calls archive.org API with a query and returns JSON results set. 
Returns an array of JSON objects in the `['response']['docs']` value. 
"""    
    url = 'http://archive.org/advancedsearch.php?q={0}&output=json'.format(urllib.quote(k))
    ret = urllib2.urlopen(url)
    ret = ret.read()
    ret = json.loads(ret)
    if ret:
        ret = {'docs' : ret['response']['docs']}
    else:
        ret = {'docs' : []}

    return ret



class ArchiveDotOrgSearchResults(plugin_base.PluginBase):