
import requests
import json


hostserver = "http://localhost:5002"
params = ''
user = 'user'

def updateFileList():
  return requests.get(url = f'{hostserver}/files', params = params).json()['files']

def shareNewFile(file):
  requests.get(url = f'{hostserver}/addfile/{file}', params = params)

def stopSharing():
  requests.get(url = f'{hostserver}/stopsharing/{user}', params = params)


import requests
import json


hostserver = "http://localhost:5002"
params = ''
user = 'user'

def updateFileList():
  return requests.get(url = f'{hostserver}/files', params = params).json()['files']

def shareNewFile(file):
  requests.get(url = f'{hostserver}/addfile/{file}', params = params)

def stopSharing():
  requests.get(url = f'{hostserver}/stopsharing/{user}', params = params)
