<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <title>Jaggery - Delicious Javascript</title>
    <meta name="description" content="">
    <meta name="author" content="">

    <!-- Le HTML5 shim, for IE6-8 support of HTML elements -->
    <!--[if lt IE 9]>
    <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->

    <!-- Le styles -->
    <link href="../css/bootstrap.css" rel="stylesheet">
    <style type="text/css">
        body {
            padding-top: 60px;
        }
    </style>
    <link href="../css/prettify.css" rel="stylesheet">
    <!-- Le fav and touch icons -->
    <link rel="shortcut icon" href="../images/favicon.ico">
    <link rel="apple-touch-icon" href="../images/apple-touch-icon.png">
    <link rel="apple-touch-icon" sizes="72x72"
          href="../images/apple-touch-icon-72x72.png">
    <link rel="apple-touch-icon" sizes="114x114"
          href="../images/apple-touch-icon-114x114.png">
</head>

<body>

<%
include('/includes/topnavi.jag');
%>

<div class="container-fluid" style="width: 960px; margin: auto;">
    <div class="row">
        <div class="span16">
            <div class="page-header">
                <h1>
                    Documentation
                    <small>API documentation for Jaggery.js</small>
                </h1>
            </div>
        </div>
    </div>

    <div class="row">
        <div class="span4">
            <div class="well">
                <%
                include('/includes/navi.jag');
                %>

            </div>

        </div>
        <div class="span12">
            <div class="content" id="email" name="email">
                <h3>Feed</h3>

                <pre class="prettyprint linenums">
&lt%
var blogURL = "http://madhukaudantha.blogspot.com/feeds/posts/default"; 
var feed= new Feed(blogURL);
 
print("Feed Title : " + feed.title + "&ltbr/&gt");
print("Feed author is : " + feed.authors[0] + "&ltbr/&gt");
 
print("First five entries are :&lt/br&gt");
var entries = feed.entries;
 
for(var i=0;i &lt 5; i++) {
	var entry = entries[i];
%&gt
	&lttr&gt
        &lttd&gt&lt%=entry.title%&gt&lt/br&gt&lt/td&gt
        &lt/tr&gt
&lt%
} 
%&gt
</pre>
                <%
                    var feedCode = '&lt%'				
    + '\n var blogURL = "http://madhukaudantha.blogspot.com/feeds/posts/default";'
    + '\n var feed = new Feed(blogURL);'
    + '\n print("Feed title : " + feed.title + "&lt;br/&gt");'
    + '\n print("Feed author is : " + feed.authors[0] + "&lt;br/&gt");'
    + '\n print("First five entries are : &lt;br/&gt");'
    + '\n var entries = feed.entries;'
    + '\n for(var i=0;i &lt 5; i++) {'
    + '\n var entry = entries[i];'
    + '\n %&gt'
    + '\n &lttr&gt'
    + '\n &lttd&gt&lt%=entry.title%&gt&lt/td&gt&lt;br/&gt'
    + '\n &lt/tr&gt'
    + '\n &lt%'
    + '\n }'
    + '\n %&gt';

                var codeSnip = encodeURIComponent(feedCode);
                var urlString = '../tryitframe.jag?code='+codeSnip;

                include('/includes/tryit_but.jag');
                %>

                <br>

                <div id="pageLinks">
<a class="navilink" href="#overview">Overview</a>
<a class="navilink" href="#members">Members</a>
<a class="navilink" href="#operations">Operations</a>
</div>

<section id="overview">
    <h4>Overview</h4>
    <!--p class="description">Feed API is capable of intelligently working with both Atom and RSS feeds.
    The underlying protocol implementation is kept transparent. However, some data might be lost due to this being an
    abstraction of both Atom and RSS feeds. The Feed host object is capable of persisting it's content to disk.</p-->
    <p class="description">The Feed API handles reading and writing Atom feeds</p>
    
</section>
<section id="members">
    <h4>Members</h4>
                <table class="clsStd member-table">

                    <tbody>

                    <tr>
                        <th>Member</th>
                         <th>Type</th>
                        <th>Description</th>
                    </tr>

                <tr>
                    <td>
                    <code>entries</code>
                    </td>
                    <td>Entry[]</td>
                    <td>
                    <pre class="prettyprint">feed.entries;</pre>
                    Returns the complete set of entries contained in this feed.
					<pre class="prettyprint">feed.entries = entryList;</pre>
                    setting an entry list for to feed.
                    </td>
                </tr>
 		<tr>
                    <td>
                    <code>author</code>
                    </td>
                    <td>String</td>
                    <td>
		    <pre class="prettyprint">feed.author</pre>
                    Returns the author of the feed.
					<pre class="prettyprint">feed.author = "author1";</pre>
                    Setting an author to the feed.
		    </td>
                </tr>
                <tr>
                    <td>
                    <code>authors</code>
                    </td>
                    <td>String [ ]</td>
                    <td>
		    <pre class="prettyprint">feed.authors[i]</pre>
                    Returns the i th author of the feed.
					<pre class="prettyprint">feed.authors = ["author1","author2"];</pre>
                    Setting an array of authors to the feed.
		    </td>
                </tr>
                <tr>
                    <td>
                    <code>category</code>
                    </td>
                    <td>String [ ]</td>
                    <td>
		     <pre class="prettyprint">feed.category[i]</pre>
                    Returns the i th category of the feed.
					<pre class="prettyprint">feed.category = ["cat1","cat2"];</pre>
                    Setting an array of categories to the feed.
		    </td>
                </tr>
                <tr>
                    <td>
                    <code>contributors</code>
                    </td>
                    <td>String [ ]</td>
                    <td>
		     <pre class="prettyprint">feed.contributors[i]</pre>
                    Returns the i th contributor of the feed.
					<pre class="prettyprint">feed.contributors = ["cont1","cont2"];</pre>
                    Setting an array of contributor to the feed.
		    </td>
                </tr>
                <tr>
                    <td>
                    <code>logo</code>
                    </td>
                    <td>String</td>
                    <td>
		     <pre class="prettyprint">feed.logo</pre>
                    Returns the logo of this feed.
					<pre class="prettyprint">feed.logo = "http://abc.blogspot.com/Blogger-logo.png";
		    </td>
                </tr>
                <tr>
                    <td>
                    <code>icon</code>
                    </td>
                    <td>String</td>
                    <td>
		    <pre class="prettyprint">feed.icon</pre>
                    Returns the icon URL of this feed.
					<pre class="prettyprint">feed.icon = "http://abc.blogspot.com/RSS_Feed_Button.jpg";</pre>
                    Setting icon URL of this feed.
		    </td>
                </tr>
                <tr>
                    <td>
                    <code>links</code>
                    </td>
                    <td>String [ ]</td>
                    <td>
		    <pre class="prettyprint">feed.links[i]</pre>
                    Returns the i th location of the feed.
					<pre class="prettyprint">feed.links = ["link1","link2"];</pre>
                    Setting locations of the feed.
		    </td>
                </tr>
                <tr>
                    <td>
                    <code>title</code>
                    </td>
                    <td>String</td>
                    <td>
		     <pre class="prettyprint">feed.title</pre>
                    Returns the title of the feed.
					<pre class="prettyprint">feed.title = "title";</pre>
                    Setting the title of the feed.
		    </td>
                </tr>
		 <tr>
                    <td>
                    <code>rights</code>
                    </td>
                    <td>String</td>
                    <td>
		     <pre class="prettyprint">feed.rights</pre>
                    Returns the rights of the feed.
					<pre class="prettyprint">feed.rights = "rights";</pre>
                    Setting the rights for the feed.
		    </td>
                </tr>
                <tr>
                    <td>
                    <code>updated</code>
                    </td>
                    <td>Date</td>
                    <td>
		     <pre class="prettyprint">feed.updated</pre>
                    Returns the last updated date of the feed.
					<pre class="prettyprint">var d1 = new Date("March 13, 2013 11:13:00")
feed.updated = d1;</pre>
                    Setting the last updated date of the feed.
		    </td>
                </tr>

                     </tbody>
                </table>

    </section>
    <section id="operations">
<h4>Operations</h4>
<table class="clsStd operations-table">

    <tbody>

    <tr>

        <th>Operations</th>
       <th>Returns</th>
        <th>Description</th>

    </tr>
                <tr>
                    <td>
                    <code>Feed([url])</code>
                    </td>
                    <td>Feed</td>
                    <td>
		     <pre class="prettyprint">var feed= new Feed(blogURL);</pre>
			Returns a Feed object
		    </td>
                </tr>
                <tr>
                    <td>
                    <code>toXML()</code>
                    </td>
                    <td>XML</td>
                    <td>
 		     <pre class="prettyprint">feed.toXML()</pre>
			Returns the E4X XML contents of this Feed object.
		    </td>
                </tr>
                <tr>
                    <td>
                    <code>toString()</code>
                    </td>
                    <td>String</td>
                    <td>  <pre class="prettyprint">feed.toString()</pre>
			Returns the String representation of the feed
		    </td>
                </tr>
    <tbody>
    </table>
    </section>
            </div>
            <br>
            <br>
        </div>

    </div>
    <%
    include('/includes/footer.jag');
    %>

</div>

<!-- /container -->
<%
include('/includes/scripts.jag')
%>

	<script>	
		
		$(document).ready(function(){
        $('#feed').toggleClass('active')
		$('#docs').addClass('active')
        })
	</script>
</body>
</html>
