<!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 + "&lt;br/&gt");
print("Feed author is : " + feed.authors[0] + "&lt;br/&gt");

print("First five entries are :");
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/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 a entry list for to feed.
                    </td>
                </tr>
                <tr>
                    <td>
                    <code>authors</code>
                    </td>
                    <td>String [ ]</td>
                    <td>get/set authors</td>
                </tr>
                <tr>
                    <td>
                    <code>categoryies</code>
                    </td>
                    <td>String [ ]</td>
                    <td>get/set categories</td>
                </tr>
                <tr>
                    <td>
                    <code>contributors</code>
                    </td>
                    <td>String [ ]</td>
                    <td>get/set contributors</td>
                </tr>
                <tr>
                    <td>
                    <code>logo</code>
                    </td>
                    <td>String</td>
                    <td>The logo of this feed.</td>
                </tr>
                <tr>
                    <td>
                    <code>icon</code>
                    </td>
                    <td>String</td>
                    <td>get/set the icon URL of this feed</td>
                </tr>
                <tr>
                    <td>
                    <code>links</code>
                    </td>
                    <td>String [ ]</td>
                    <td>The location of the feed.</td>
                </tr>
                <tr>
                    <td>
                    <code>title</code>
                    </td>
                    <td>String</td>
                    <td>The title of the feed.</td>
                </tr>
                <tr>
                    <td>
                    <code>updated</code>
                    </td>
                    <td>Date</td>
                    <td>The date when last updated</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>Returns a Feed object</td>
                </tr>
                <tr>
                    <td>
                    <code>toXML()</code>
                    </td>
                    <td>XML</td>
                    <td>Returns the E4X XML contents of this Feed object.</td>
                </tr>
                <tr>
                    <td>
                    <code>toString()</code>
                    </td>
                    <td>String</td>
                    <td>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>