Difference between revisions of "RSS API"

From MoodleDocs
Line 23: Line 23:
  
 
===Creating an RSS feed===
 
===Creating an RSS feed===
 +
 +
<code>
 +
...
 +
</code>
  
 
===Caching an RSS feed===
 
===Caching an RSS feed===
  
 
===Retrieving a cached RSS feed===
 
===Retrieving a cached RSS feed===
 
==Database structure==
 
 
 
 
 
{| border="1" cellpadding="2" cellspacing="0"
 
|'''Field'''
 
|'''Type'''
 
|'''Info'''
 
|-
 
|id
 
|int(10)
 
|auto increment identifier
 
|-
 
|queuedeventid
 
|int(10)
 
|foreign key id corresponding to the id of the event_queues table
 
|-
 
|handlerid
 
|int(10)
 
|foreign key id corresponding to the id of the event_handlers table
 
|-
 
|status
 
|int(10)
 
|number of failed attempts to process this handler
 
|-
 
|errormessage
 
|text
 
|if an error happened last time we tried to process this event, record it here.
 
|-
 
|timemodified
 
|int(10)
 
|time stamp of the last attempt to run this from the queue
 
|}
 
 
==Standards for naming events==
 
 
==Events which exist==
 
 
 
===Other===
 
 
  
 
==See also==
 
==See also==

Revision as of 06:31, 16 January 2012

Overview

The RSS API is a core system in Moodle to allow you to create secure RSS feeds of data in your module.

These RSS feeds can then be syndicated by other websites or aggregated by a feed reader.

Any Moodle module can generate RSS feeds to allow secure access to it's data.

File Locations

The primary functions for the RSS API is located in lib/rsslib.php

Additional functions and usage examples can be found in the following files:

  • blog/rsslib.php
  • mod/data/rsslib.php
  • mod/forum/rsslib.php
  • mod/glossary/rsslib.php

Examples

Below you will find examples on how to use the RSS functions within your own modules.

Creating an RSS feed

...

Caching an RSS feed

Retrieving a cached RSS feed

See also