Stack2RSS 1.0
A simple web application that creates an RSS feed given an API route.
|
00001 <?php 00002 00003 /// \file revision_converter.php Contains the conversion class for revision objects. 00004 00005 // This class derives from Converter 00006 require_once 'converter.php'; 00007 00008 /// Provides conversion for revision objects 00009 class RevisionConverter extends Converter 00010 { 00011 protected function GetTitle($json_item) 00012 { 00013 return $json_item['comment']; 00014 } 00015 00016 protected function GetDescription($json_item) 00017 { 00018 return $json_item['body']; 00019 } 00020 00021 protected function GetLink($json_item) 00022 { 00023 return "http://{$_GET['site']}/revisions/{$json_item['revision_guid']}"; 00024 } 00025 00026 protected function GetDate($json_item) 00027 { 00028 return date(DATE_RSS, $json_item['creation_date']); 00029 } 00030 } 00031 00032 ?>