added API call functions to views.py