<commit_before># *****************************************************************************
# Copyright (c) 2014 IBM Corporation and other Contributors.
#
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Eclipse Public License v1.0
# which accompanies this distribution, and is available at
# http://www.eclipse.org/legal/epl-v10.html 
#
# Contributors:
#   <NAME> - Initial Contribution
# *****************************************************************************

import ibmiotf
import json
import requests
import iso8601
from datetime import datetime



class ApiClient():

	devicesUrl = 'https://internetofthings.ibmcloud.com/api/v0001/organizations/%s/devices'
	deviceUrl = 'https://internetofthings.ibmcloud.com/api/v0001/organizations/%s/devices/%s/%s'
	historianOrgUrl = 'https://internetofthings.ibmcloud.com/api/v0001/historian/%s'
	historianTypeUrl = 'https://internetofthings.ibmcloud.com/api/v0001/historian/%s/%s'
	historianDeviceUrl = 'https://internetofthings.ibmcloud.com/api/v0001/historian/%s/%s/%s'
	
	def __init__(self, options):
		self.__options = options

		if 'org' not in self.__options or self.__options['org'] == None:
			raise ibmiotf.ConfigurationException("Missing required property: org")
		if 'id' not in self.__options or self.__options['id'] == None: 
			raise ibmiotf.ConfigurationException("Missing required property: type")
		if 'auth-method' not in self.__options:
			raise ibmiotf.ConfigurationException("Missing required property: auth-method")<commit_msg>Update ReST APIs<commit_after># *****************************************************************************
# Copyright (c) 2014 IBM Corporation and other Contributors.
#
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Eclipse Public License v1.0
# which accompanies this distribution, and is available at
# http://www.eclipse.org/legal/epl-v10.html 
#
# Contributors:
#   <NAME> - Initial Contribution
# *****************************************************************************

import ibmiotf
import json
import requests
import iso8601
from datetime import datetime



class ApiClient():

	devicesUrl = 'https://%s.internetofthings.ibmcloud.com/api/v0001/devices'
	deviceUrl = 'https://%s.internetofthings.ibmcloud.com/api/v0001/devices/%s/%s'
	historianOrgUrl = 'https://%s.internetofthings.ibmcloud.com/api/v0001/historian'
	historianTypeUrl = 'https://%s.internetofthings.ibmcloud.com/api/v0001/historian/%s'
	historianDeviceUrl = 'https://%s.internetofthings.ibmcloud.com/api/v0001/historian/%s/%s'
	
	def __init__(self, options):
		self.__options = options

		if 'org' not in self.__options or self.__options['org'] == None:
			raise ibmiotf.ConfigurationException("Missing required property: org")
		if 'id' not in self.__options or self.__options['id'] == None: 
			raise ibmiotf.ConfigurationException("Missing required property: type")
		if 'auth-method' not in self.__options:
			raise ibmiotf.ConfigurationException("Missing required property: auth-method")
{'fraction_non_alphanumeric': 0.20496293909120206, 'fraction_numerical': 0.0206252014179826, 'mean_word_length': 5.646680942184155, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 10, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6230084', 'n_tokens_mistral': 988, 'n_tokens_neox': 866, 'n_words': 217}