diff --git a/CLI/student.py b/CLI/student.py index d0e6b23..285b001 100644 --- a/CLI/student.py +++ b/CLI/student.py @@ -32,8 +32,11 @@ def getStudent(ion_user, password): #makes a GET request to given url, returns dict def getDB(user, pwd, url): """ - Sends a GET request to the URL + Sends a GET request to url + :param user: username + :param pwd: password :param url: URL for request + :return: json request response """ r = requests.get(url=url, auth=(user, pwd)) print("GET:" + str(r.status_code)) @@ -42,9 +45,12 @@ def getDB(user, pwd, url): #makes a PATCH (updates instance) request to given url, returns dict def patchDB(user, pwd, data, url): """ - Sends a PATCH request to the URL - :param data: + Sends a PATCH request to url + :param user: username + :param pwd: password :param url: URL for request + :param data: data to request + :return: json request response """ r = requests.patch(url=url, data=data, auth=(user, pwd)) print("PATCH:" + str(r.status_code)) @@ -54,9 +60,12 @@ def patchDB(user, pwd, data, url): #makes a POST (makes new instance) request to given url, returns dict def postDB(user, pwd, data, url): """ - Sends a POST request to the URL - :param data: + Sends a POST request to url + :param user: username + :param pwd: password :param url: URL for request + :param data: data to request + :return: json request response """ r = requests.post(url=url, data=data, auth=(user, pwd)) print("POST:" + str(r.status_code)) @@ -66,10 +75,13 @@ def postDB(user, pwd, data, url): #makes a PUT (overwrites instance) request to given url, returns dict def putDB(user, pwd, data, url): """ - Sends a PUT request to the URL - :param data: + Sends a PUT request to url + :param user: username + :param pwd: password :param url: URL for request - """ + :param data: data to request + :return: json request response + """ r = requests.put(url=url, data=data, auth=(user, pwd)) print("PUT:" + str(r.status_code)) return r.json() @@ -78,8 +90,11 @@ def putDB(user, pwd, data, url): #makes a DELETE (delete instance) request to given url, returns dict def delDB(user, pwd, url): """ - Sends a DELETE request to the URL + Sends a DELETE request to url + :param user: username + :param pwd: password :param url: URL for request + :return: json request response """ r = requests.delete(url=url, auth=(user, pwd)) print("DELETE:" + str(r.status_code)) diff --git a/skoolos.py b/skoolos.py index 6f953e8..a5dfb83 100644 --- a/skoolos.py +++ b/skoolos.py @@ -505,7 +505,6 @@ def getDB(USER, PWD, url): :param USER: username :param PWD: password :param url: URL for request - :param data: data to request :return: json request response """ r = requests.get(url=url, auth=(USER, PWD)) @@ -547,7 +546,6 @@ def delDB(USER, PWD, url): :param USER: username :param PWD: password :param url: URL for request - :param data: data to request :return: json request response """ r = requests.delete(url=url, auth=(USER, PWD))