Commit 8f4a9cb1 authored by Vegard Vesterheim's avatar Vegard Vesterheim
Browse files

Updated according to comments in MR !2

parent c0623f2c
......@@ -13,20 +13,12 @@ import collections.abc
import copy
import urllib.parse
# FIXME: why do I need this
sys.path.append(
os.path.abspath(os.path.join(os.path.dirname("__file__"), ".."))
)
from kindnavsync.navapi import NAVAPI, ObjectNotFound
# FIXME
# NAV_API_URL = "http://localhost/api/1"
NAV_API_URL = "https://uninavn.uninett.no/api/1"
NAV_API_URL = "https://uninav.uninett.no/api/1"
NAV_API_TIMEOUT = 10.0
# FIXME
# KIND_SERVICE_URL = 'http://localhost:7080/api/nettinstallasjoner.json'
KIND_SERVICE_URL = "https://kind.uninett.no/api/nettinstallasjoner.json"
DEFAULT_ORGANIZATION = "uninett"
......@@ -118,11 +110,8 @@ def merge_dict(d, updates):
def get_kind_data(room):
url = KIND_SERVICE_URL
if room:
url = KIND_SERVICE_URL + "?navn=" + urllib.parse.quote(room)
LOG.debug("Fetching data from: %s", url)
return requests.get(url).json()
LOG.debug("Fetching data from: %s", KIND_SERVICE_URL)
return requests.get(KIND_SERVICE_URL, params={'navn': room}).json()
def parse_args():
......
......@@ -16,6 +16,7 @@ setup(
'requests',
'simple_rest_client',
'slack_log_handler',
'deepdiff',
],
python_requires='>3.4.0',
classifiers=[
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment