EDX Course API: Getting EDX course list

谁说胖子不能爱 提交于 2019-12-13 07:58:22

问题


I am making a project in python/flask. I want to get a list of all the courses of edx. But the API provides the list page by page. I can't figure out how to get the entire list. Any help is appreciated. Thanks!


回答1:


I assume you are using this endpoint https://courses.edx.org/api/courses/v1/courses/

As can be seen, there is a pagination block in the result:

"pagination": {
        "count": 3261,
        "previous": null,
        "num_pages": 327,
        "next": "https://courses.edx.org/api/courses/v1/courses/?page=2"
    },

The next field in this block will help you fetch the next page of the results. You cannot fetch all the courses in one go.



来源:https://stackoverflow.com/questions/42203038/edx-course-api-getting-edx-course-list

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!