API - Basic API calls

take a closer look at those 2 functions. They are almost identical. The only difference is that those calls have different access_level, function to execute with different parameters (get_courses and get_course_details)

try to optimize it and use some generic function for that. I have a feeling that this function will be reused across multiple entities and API functions.