Changeset - 8e9e5035f025
[Not reviewed]
default
0 1 0
Nathan Brink (binki) - 14 years ago 2012-02-07 20:20:24
ohnobinki@ohnopublishing.net
Update some of the school crawler API documentation.
1 file changed with 8 insertions and 3 deletions:
0 comments (0 inline, 0 general)
school.d/README.txt
Show inline comments
 
@@ -123,25 +123,30 @@ each of these files are listed below:
 

	
 
  The current crawler API has two steps. First,
 
  <school_id>_crawl_semester_list() is called to retrieve a list of
 
  crawlable semesters for the school. Then
 
  <school_id>_crawl_semester_get() is called once for each semester.
 

	
 
** <school_id>_crawl_semester_list(array $school, array &$semesters)
 
** <school_id>_crawl_semester_list(array $school, array &$semesters, &$school_crawl_log)
 
  - $school: The school handle for <school_id>.
 
  - $semesters: An array to wh
 
  - $semesters: An array to which Semester objects should be appended.
 
  - $school_crawl_log: A reference to the school_crawl_log handle used
 
    by some school.crawl.inc functions. To log warnings and errors,
 
    use school_crawl_logf().
 
  Returns 0 on success and nonzero on failure.
 

	
 
  This function should scrape the school's website and build a list of
 
  scrapable semesters. For each semester, it should instantiate a
 
  Semester object with metadata about that semester and then return an
 
  array of these Semester objects.
 

	
 
** <school_id>_crawl_semester(array $school, Semester $semester)
 
** <school_id>_crawl_semester(array $school, Semester $semester, &$school_crawl_log)
 
  - $school: The school handle for <school_id>
 
  - $semester: The semester object to which courses are added.
 
  - $school_crawl_log: The school_crawl_log handle required by some
 
    school.crawl.inc functions.
 
  Returns 0 on success and otherwise on failure.
 

	
 
  This function is to add courses (or course_slots) to the passed
 
  Semester object so that every available course for the given
 
  semester is catalogued by the Semester object. Upon successful
 
  return of this function (indicated by returning 0), the caller will
0 comments (0 inline, 0 general)