Sunday, 30 November 2008

Parameters in Blogspot feed

This post presented with parameters in blogspot feed. As we know, the URL to get feed items of our blog is
http://yourblogname.blogspot.com/feeds/posts/default. You can review this feed after as my blog feed :

http://growyourblog.blogspot.com/feeds/posts/default


Understand these parameters and with a little of javascript can help us create some small 'ourself' interested widget. Lets take a look:


1. start-index.

This param allow the Feed begins at 'start-index' ordinal.
Example :
As normal feed:
http://growyourblog.blogspot.com/feeds/posts/default

result is:
entry 1
entry 2
entry 3
entry 4
entry 5

...

and

http://growyourblog.blogspot.com/feeds/posts/default?start-index=3

result is:

entry 3
entry 4
entry 5
...


2.max-results
This param allow the Feed returns feed-items in range of 'max-results'.

Example:

http://growyourblog.blogspot.com/feeds/posts/default?max-results=10

will shows at max 10 items.

3.published-min, published-max

These parameter allow get feeditems in date range. Example:

http://growyourblog.blogspot.com/feeds/posts/default?published-max=2009-01-01
&max-results=5


4. updated-min, updated-max: same with published-min, published-max.

5.1. Items in the same label:

Link feed:

http://yourblogname.blogspot.com/feeds/posts/
default/-/Label%20Name

5.2.
Items in 2 label:

http://
yourblogname.blogspot.com/feeds/posts/
default/-/Label%20Name1/Label%Name2

5.3. Items in 3 label: (tương tự cho 4,5...)

http://
yourblogname.blogspot.com/feeds/posts/
default/-/Label%20Name1/Label%Name2/Label%20Name3