Switched to "httr" package and implemented all 3 API calls in basic form