README
1NAME
2 WebService::Bloglines - Easy-to-use Interface for Bloglines Web Services
3
4SYNOPSIS
5 use WebService::Bloglines;
6
7 my $bloglines = WebService::Bloglines->new(
8 username => $username,
9 password => $password, # password is optional for notify()
10 );
11
12 # get the number of unread items using Notifer API
13 my $notifier = $bloglines->notify();
14
15 # list subscriptions using Sync API
16 my $subscription = $bloglines->listsubs();
17
18 # list all feeds
19 my @feeds = $subscription->feeds();
20 for my $feed (@feeds) {
21 my $title = $feed->{title}; # title of the feed
22 my $url = $feed->{htmlUrl}; # URL for HTML
23 my $type = $feed->{type}; # "rss"
24 my $xml = $feed->{xmlUrl}; # URL for XML
25 my $subid = $feed->{BloglinesSubId}; # Blogines SubId
26 my $unread = $feed->{BloglinesUnread}; # number of unread items
27 my $ignore = $feed->{BloglinesIgnore}; # flag to ignore update
28 }
29
30 # list folders
31 my @folders = $subscription->folders();
32 for my $folder (@folders) {
33 my $title = $folder->{title}; # title of the folder
34 my $subid = $folder->{BloglinesSubId}; # Bloglines SubId
35 my $ignore = $folder->{BloglinesIgnore}; # flag to ignore update
36 my @feeds = $subscription->feeds_in_folder($subid);
37 }
38
39 # list feeds in root folder
40 my @root_feeds = $subscription->feeds_in_folder(); # no args or just use $subId = 0
41
42 # get new items using Sync API
43 my $update = $bloglines->getitems($subId);
44 # $update = $bloglines->getitems($subId, 1); # mark unread items as read
45 # $update = $bloglines->getitems($subId, 1, $unixtime); # items from $unixtime
46
47 # get channel information
48 my $feed = $update->feed();
49 $feed->{title}; # channel/title
50 $feed->{link}; # channel/link
51 $feed->{description}; # channel/description
52 $feed->{bloglines}->{siteid}; # bloglines::siteid
53 $feed->{language}; # language
54
55 for my $item ($update->items) {
56 my $title = $item->{title};
57 my $creator = $item->{dc}->{creator};
58 my $link = $item->{link};
59 my $guid = $item->{guid};
60 my $description = $item->{description};
61 my $pubDate = $item->{pubDate}; # "Mon, 27 Sep 2004 8:04:17 GMT"
62 my $itemid = $item->{bloglines}->{itemid};
63 }
64
65DESCRIPTION
66 WebService::Bloglines priovides you an Object Oriented interface for
67 Bloglines Web Services (BWS). It currently supports Notifier API and
68 Sync API. See http://www.bloglines.com/services/api/ for details.
69
70METHODS
71 TBD.
72
73TODO
74 * Cacheability using Cache::Cache API.
75
76 * Use LibXML to parse OPML?
77
78WARNING
79 This module is in beta version. Object interface it provides may be
80 changed later.
81
82AUTHOR
83 Tatsuhiko Miyagawa <miyagawa@bulknews.net>
84
85 This library is free software; you can redistribute it and/or modify it
86 under the same terms as Perl itself.
87
88SEE ALSO
89 http://www.bloglines.com/
90
91 http://www.bloglines.com/services/api/
92
93 Blog Hacks: http://hacks.bloghackers.net/ (in Japanese)
94
95