def __init__(self, config, plugin_config): Connector.__init__(self, config, plugin_config) FreshdeskConnector.__init__(self, config, plugin_config) view = config.get("view", '') if view == '': view = 'all_tickets' self.path = '/helpdesk/tickets/filter/' + view + '?format=json&wf_order=created_at&page='
def __init__(self, config): Connector.__init__(self, config) self.api_key = str(self.config.get("api_key")) self.latitude = str(self.config.get("latitude")) self.longitude = str(self.config.get("longitude")) self.from_date = str(self.config.get("from_date")) self.to_date = str(self.config.get("to_date")) self.cache_folder = str(self.config.get("cache_folder")) self.api_limit = int(self.config.get("api_limit", -1)) # Cache file path filename = "cache-forecastio-history-%s.json" % base64.urlsafe_b64encode(str(self.latitude) + '-' + str(self.longitude)) self.cache_file = os.path.join(self.cache_folder, filename) # Cache directory if not os.path.isdir(self.cache_folder): os.makedirs(self.cache_folder) # Create cache file if does not exist if not os.path.exists(self.cache_file): with open(self.cache_file, 'w') as f: json.dump({}, f) f.close() # The API returns the number of call made for today. We keep it to optionnaly limit the number of calls. # For te first call, we don't know the actual value but we assume it is 0. self.api_calls = 0
def __init__(self, config): Connector.__init__(self, config) self.CONFIG_API = { "API_BASE_URL": "https://api.pipedrive.com/v1/", "API_KEY": self.config.get("api_key"), "PAGINATION": 200, } self.RESULT_FORMAT = self.config.get("result_format")
def __init__(self, config): Connector.__init__(self, config) # pass the parameters to the base class # perform some more initialization self.login = self.config.get("login") self.password = self.config.get("password") self.domain = self.config.get("domain") self.from_date = self.config.get("from_date") self.to_date = self.config.get("to_date")
def __init__(self, config): Connector.__init__(self, config) self.CONFIG_API = { 'API_BASE_URL': 'https://api.pipedrive.com/v1/', 'API_KEY': self.config.get("api_key"), 'PAGINATION': 200 } self.RESULT_FORMAT = self.config.get("result_format")
def __init__(self, config): """ The configuration parameters set up by the user in the settings tab of the dataset are passed as a json object 'config' to the constructor """ Connector.__init__(self, config) # pass the parameters to the base class # Fetch configuration self.mirror = self.config["mirror"] self.book_id = self.config["book_id"]
def __init__(self, config): Connector.__init__(self, config) self.client_customer_ids = self.parse_client_customer_ids(config['client_customer_ids']) self.report_fields = self.parse_report_fields(config.get('report_fields', '')) self.cache_config = {key: config[key] for key in self.CACHE_KEYS} self.credentials = {key: config[key] for key in self.CREDENTIALS_KEYS} self.report_definition = {key: config[key] for key in self.REPORT_KEYS} self.report_definition['report_fields'] = self.report_fields
def __init__(self, config): """ The configuration parameters set up by the user in the settings tab of the dataset are passed as a json object 'config' to the constructor """ Connector.__init__(self, config) # pass the parameters to the base class self.cache_folder = self.config.get("cache_folder") self.test_mode = self.config["test_mode"] self.all_years = self.config["all_years"] print 'Running Patent Connector cache=%s test=%s all=%s' % (self.cache_folder, self.test_mode, self.all_years)
def __init__(self, config, plugin_config): Connector.__init__(self, config, plugin_config) print "==============================================================" print self.config print self.plugin_config self.ACCOUNT_ID = self.config.get("account_id", None) self.ACCESS_TOKEN = self.config.get("access_token", None) self.ACCOUNT_LIST = self.config.get("account_list", None) self.session = requests.Session() self.API = 'https://api.instagram.com/v1' self.IS_LIST = self.ACCOUNT_LIST is not None print self.IS_LIST
def __init__(self, config): Connector.__init__(self, config) if not self.config['api_url'].startswith('https://api.import.io/'): raise Exception('It looks like this URL is not an API URL. URLs to call the API (and get a json response) start with "api.import.io" .') print '[import.io connector] calling API...' response = requests.get(self.config['api_url']) print '[import.io connector] got response' try: self.json = response.json() except Exception as e: print e print 'response was:\n', response.text raise
def __init__(self, config): """ The configuration parameters set up by the user in the settings tab of the dataset are passed as a json object 'config' to the constructor """ Connector.__init__(self, config) # pass the parameters to the base class # perform some more initialization self.CONFIG_API = { 'API_BASE_URL': 'https://api.pipedrive.com/v1/', 'API_KEY': self.config.get("api_key"), 'PAGINATION': 200 } self.RESULT_FORMAT = self.config.get("result_format")
def __init__(self, config): """ The configuration parameters set up by the user in the settings tab of the dataset are passed as a json object 'config' to the constructor """ Connector.__init__(self, config) # pass the parameters to the base class # perform some more initialization credentials = json.loads(self.config.get("credentials")) self.client_email = credentials["client_email"] self.private_key = credentials["private_key"] self.doc_id = self.config.get("doc_id") self.tab_id = self.config.get("tab_id") self.result_format = self.config.get("result_format") self.list_unique_slugs = []
def __init__(self, config): """Make the only API call, which downloads the data""" Connector.__init__(self, config) if self.config['api_url'].startswith('https://api.import.io/'): self.api_version = 'api' elif self.config['api_url'].startswith('https://extraction.import.io/'): self.api_version = 'extraction' else: raise Exception( 'It looks like this URL is not an API URL. URLs to call the API (and get a json response) start with "https://api.import.io" .') print '[import.io connector] calling API...' response = requests.get(self.config['api_url']) print '[import.io connector] got response' try: self.json = response.json() except Exception as e: print e print 'response was:\n', response.text raise
def __init__(self, config): Connector.__init__(self, config) FreshdeskConnector.__init__(self, config) self.path = '/helpdesk/tickets/filter/all_tickets?format=json&wf_order=created_at&page='
def __init__(self, config, plugin_config): Connector.__init__(self, config, plugin_config) self.sparql_endpoint_url = self.config.get("sparql_endpoint_url", "") self.sparql_query = self.config.get("sparql_query", "")
def __init__(self, config): Connector.__init__(self, config) # pass the parameters to the base class
def __init__(self, config): Connector.__init__(self, config)
def __init__(self, config): Connector.__init__(self, config) self.endpoint = config["endpoint"] self.key = config["apiKey"]
def __init__(self, config, plugin_config): Connector.__init__( self, config, plugin_config) # pass the parameters to the base class self.t__ = census_resources.get_dict_ref()
def __init__(self, config, plugin_config): Connector.__init__(self, config, plugin_config) # pass the parameters to the base class self.endpoint = "https://api.clubhouse.io/api/beta" self.key = plugin_config["api_token"]
def __init__(self, config): Connector.__init__(self, config) FreshdeskConnector.__init__(self, config) self.view = config["view"] self.path = '/helpdesk/tickets/filter/' + str(self.view) + '?format=json&wf_order=created_at&page=' print self.path
def __init__(self, config): Connector.__init__(self, config) FreshdeskConnector.__init__(self, config) self.path = '/contacts.json?page='
def __init__(self, config): Connector.__init__(self, config) gh = github.Github(config["login"], config["password"]) self.repos = gh.get_repo(config["repos"])
def __init__(self, config, plugin_config): Connector.__init__(self, config, plugin_config)
def __init__(self, config): Connector.__init__(self, config) self.base_uri = "%s/v2/room/%s/history" %(self.config["api_endpoint"], self.config["room_name"])