From f7a99afdca61f17ae30c8a73194498c7f6281ec7 Mon Sep 17 00:00:00 2001 From: nico Date: Tue, 4 Sep 2018 15:10:28 +0200 Subject: removed hardcoded variables + added env variable support to remove hardcoded elements from plugin code * updated readme to represent thse changes --- nextcloud_shares | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'nextcloud_shares') diff --git a/nextcloud_shares b/nextcloud_shares index b2e858e..cf75234 100644 --- a/nextcloud_shares +++ b/nextcloud_shares @@ -3,9 +3,10 @@ import re import requests import sys +import os -URL = 'https://URL.TO.YOUR.NEXTCLOUD.tld/ocs/v2.php/apps/serverinfo/api/v1/info' -auth = ('username', 'password or logintoken') +URL = os.environ['url'] +auth = (os.environ['username'], os.environ['password']) class NextcloudShares: -- cgit v1.2.3-54-g00ecf