php - Course catalog of course era using rest api -


i using open api given course era. problem giving list of 100 courses,i checked on website there 1294 courses listed.then why giving 100 courses on request.

my code

<?php  $url = "https://api.coursera.org/api/courses.v1";  $result = file_get_contents($url);  print_r($result); ?> 

what should fetch whole course catalog , store in mysql db

from docs: https://building.coursera.org/app-platform/catalog/

to paginate through result set, use integer start , limit query parameters.

curl "https://api.coursera.org/api/courses.v1?start=300&limit=10" 

so use start , limit pagination


Comments

Popular posts from this blog

Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12:test (default-test) on project.Error occurred in starting fork -

windows - Debug iNetMgr.exe unhandle exception System.Management.Automation.CmdletInvocationException -

configurationsection - activeMq-5.13.3 setup configurations for wildfly 10.0.0 -