{"id":1556,"date":"2012-08-20T23:42:29","date_gmt":"2012-08-21T03:42:29","guid":{"rendered":"http:\/\/mattclare.ca\/blog\/?p=1556"},"modified":"2012-08-20T23:42:29","modified_gmt":"2012-08-21T03:42:29","slug":"structured-schedule-and-course-calendar-data-for-brock-university","status":"publish","type":"post","link":"https:\/\/mattclare.ca\/blog\/2012\/08\/20\/structured-schedule-and-course-calendar-data-for-brock-university\/","title":{"rendered":"Structured Schedule and Course Calendar Data for Brock University"},"content":{"rendered":"<p><a href=\"http:\/\/mattclare.ca\/blog\/wp-content\/uploads\/2012\/08\/API-faculty-humanities.png\"><img loading=\"lazy\" src=\"http:\/\/mattclare.ca\/blog\/wp-content\/uploads\/2012\/08\/API-faculty-humanities-527x500.png\" alt=\"\" title=\"Example of API: faculty\/humanities\" width=\"527\" height=\"500\" class=\"aligncenter size-medium wp-image-1558\" srcset=\"https:\/\/mattclare.ca\/blog\/wp-content\/uploads\/2012\/08\/API-faculty-humanities-527x500.png 527w, https:\/\/mattclare.ca\/blog\/wp-content\/uploads\/2012\/08\/API-faculty-humanities.png 614w\" sizes=\"(max-width: 527px) 100vw, 527px\" \/><\/a><\/p>\n<p>As my <a href=\"http:\/\/mattclare.ca\/blog\/2012\/07\/30\/brock-university-important-dates-ical-feed\/\">last post about a Brock University Important Dates iCal Feed<\/a> indicated, I often find myself needing <a href=\"http:\/\/www.brocku.ca\/\">Brock University<\/a> information in a structured, digital format.  As I&#8217;m not one to improve public information and make it private, here&#8217;s the how I made this information more fun to play with.<\/p>\n<p>As we in the <a href=\"http:\/\/www.brocku.ca\/pedagogical-innovation\">Centre for Pedagogical Innovation<\/a> (formerly CTLET) at Brock University to update places like Contact North&#8217;s http:\/\/studyonline.ca and other reporting work, we often need this type of information, and to make it easier for a number of purpose to make use of the information as a web services.<\/p>\n<p>To that end I created http:\/\/cpi.brocku.ca\/services<\/p>\n<p>http:\/\/cpi.brocku.ca\/services is a collection of <a href=\"http:\/\/bitworking.org\/news\/How_to_create_a_REST_Protocol\">RESTful APIs<\/a> that return Brock University course calendar information in a number of formats: xml, html, csv and txt.  The request URLs are created in a way that respects <a href=\"http:\/\/microformats.org\/wiki\/rest\/urls\">microformats.org&#8217;s guidelines for URLs<\/a>.<\/p>\n<p>Along with a the course calendar information is a handy &#8220;function&#8221; I created called brock_year.  brock_year returns the current course calendar year by default, or the year that corresponds with a queried UNIX time value. This is useful because the course calendar issuing year does not always match the Gregorian calendar year. For example, duration 3 of Brock University calendar year 2012 occurs in January of Gregorian year 2013!  I&#8217;ve cut and pasted the PHP for that code a few times for me and others, now it&#8217;s a web services for all.<\/p>\n<p>Things will be updated as time permits and need arises.  Also I should note that the Brock University Registrar&#8217;s information is considered definitive, and is the most accurate and well maintained source for this information http:\/\/www.brocku.ca\/registrar\/guides-and-timetable .<\/p>\n<p>Hope this helps someone, or inspires someone else to expose data in a number of structured formats.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>As my last post about a Brock University Important Dates iCal Feed indicated, I often find myself needing Brock University information in a structured, digital format. As I&#8217;m not one to improve public information and make it private, here&#8217;s the how I made this information more fun to play with. As we in the Centre&hellip; <a class=\"continue\" href=\"https:\/\/mattclare.ca\/blog\/2012\/08\/20\/structured-schedule-and-course-calendar-data-for-brock-university\/\">Continue Reading<span> Structured Schedule and Course Calendar Data for Brock University<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1,18,3,52],"tags":[],"_links":{"self":[{"href":"https:\/\/mattclare.ca\/blog\/wp-json\/wp\/v2\/posts\/1556"}],"collection":[{"href":"https:\/\/mattclare.ca\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mattclare.ca\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mattclare.ca\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mattclare.ca\/blog\/wp-json\/wp\/v2\/comments?post=1556"}],"version-history":[{"count":4,"href":"https:\/\/mattclare.ca\/blog\/wp-json\/wp\/v2\/posts\/1556\/revisions"}],"predecessor-version":[{"id":1561,"href":"https:\/\/mattclare.ca\/blog\/wp-json\/wp\/v2\/posts\/1556\/revisions\/1561"}],"wp:attachment":[{"href":"https:\/\/mattclare.ca\/blog\/wp-json\/wp\/v2\/media?parent=1556"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mattclare.ca\/blog\/wp-json\/wp\/v2\/categories?post=1556"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mattclare.ca\/blog\/wp-json\/wp\/v2\/tags?post=1556"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}