KBlog Client Library
KBlog::GData Class Reference
#include <gdata.h>

Detailed Description
A class that can be used for access to GData blogs.The new blogspot.com accounts ( August 2007 ) exclusively support GData API which is a standard based on Atom API. Compared to Blogger 1.0, which is based on Xml-Rpc and less secure, it adds new functionality like titles and comments.
Blog* myblog = new GData("http://myblogspot.account.com"); myblog->setProfileId( "2039484587348593945823" ); // can be fetched via fetchProfileId() myblog->setUsername( "your_email@address.com" ); myblog->setPassword( "yOuRFuNnYPasSword" ); KBlog::BlogPost *post = new BlogPost(); post->setTitle( "This is the title." ); post->setContent( "Here is some the content..." ); myblog->createPost( post );
Definition at line 69 of file gdata.h.
Signals | |
void | listedBlogs (const QList< QMap< QString, QString > > &blogsList) |
void | listedAllComments (const QList< KBlog::BlogComment > &commentsList) |
void | listedComments (KBlog::BlogPost *post, const QList< KBlog::BlogComment > &comments) |
void | createdComment (const KBlog::BlogPost *post, const KBlog::BlogComment *comment) |
void | removedComment (const KBlog::BlogPost *post, const KBlog::BlogComment *comment) |
void | fetchedProfileId (const QString &profileId) |
Public Member Functions | |
GData (const KUrl &server, QObject *parent=0) | |
~GData () | |
virtual void | setFullName (const QString &fullName) |
QString | fullName () const |
QString | profileId () const |
virtual void | setProfileId (const QString &pid) |
QString | interfaceName () const |
void | fetchProfileId () |
virtual void | listBlogs () |
virtual void | listComments (KBlog::BlogPost *post) |
virtual void | listAllComments () |
void | listRecentPosts (int number) |
virtual void | listRecentPosts (const QStringList &label=QStringList(), int number=0, const KDateTime &upMinTime=KDateTime(), const KDateTime &upMaxTime=KDateTime(), const KDateTime &pubMinTime=KDateTime(), const KDateTime &pubMaxTime=KDateTime()) |
void | fetchPost (KBlog::BlogPost *post) |
void | modifyPost (KBlog::BlogPost *post) |
void | createPost (KBlog::BlogPost *post) |
void | removePost (KBlog::BlogPost *post) |
virtual void | createComment (KBlog::BlogPost *post, KBlog::BlogComment *comment) |
virtual void | removeComment (KBlog::BlogPost *post, KBlog::BlogComment *comment) |
Protected Member Functions | |
GData (const KUrl &server, GDataPrivate &dd, QObject *parent=0) |
Constructor & Destructor Documentation
GData::GData | ( | const KUrl & | server, | |
QObject * | parent = 0 | |||
) | [explicit] |
KBlog::GData::GData | ( | const KUrl & | server, | |
GDataPrivate & | dd, | |||
QObject * | parent = 0 | |||
) | [protected] |
Overloaded for private inheritance handling.
Member Function Documentation
void GData::setFullName | ( | const QString & | fullName | ) | [virtual] |
Sets the user's name for the blog.
Username is only the E-Mail address of the user. This is used in createPost and modifyPost.
- Parameters:
-
fullName is a QString containing the blog username.
- See also:
- username()
createPost( KBlog::BlogPost* )
modifiyPost( KBlog::BlogPost* )
QString GData::fullName | ( | ) | const |
QString GData::profileId | ( | ) | const |
Returns the profile id of the blog.
This is used for rss paths internally.
- Returns:
- The profile id.
- See also:
- setProfileId( const QString& )
void GData::setProfileId | ( | const QString & | pid | ) | [virtual] |
QString GData::interfaceName | ( | ) | const [virtual] |
void GData::fetchProfileId | ( | ) |
Get information about the profile from the blog.
Sets the profileId automatically for the blog it is called from.
void GData::listBlogs | ( | ) | [virtual] |
List the blogs available for this authentication on the server.
- See also:
- void listedBlogs( const QList<QMap<QString,QString>>& )
void GData::listComments | ( | KBlog::BlogPost * | post | ) | [virtual] |
List the comments available for this post on the server.
- Parameters:
-
post The post, which posts should be listed.
- See also:
- void listedComments( KBlog::BlogPost*, const QList<KBlog::BlogComment>& )
void GData::listAllComments | ( | ) | [virtual] |
List the all comments available for this authentication on the server.
- See also:
- void listedAllComments( const QList<KBlog::BlogComment>& )
void GData::listRecentPosts | ( | int | number | ) | [virtual] |
List recent posts on the server.
The status of the posts will be Fetched.
- Parameters:
-
number The number of posts to fetch. The order is newest first.
- See also:
- void listedPosts( const QList<KBlog::BlogPost>& )
Implements KBlog::Blog.
void GData::listRecentPosts | ( | const QStringList & | label = QStringList() , |
|
int | number = 0 , |
|||
const KDateTime & | upMinTime = KDateTime() , |
|||
const KDateTime & | upMaxTime = KDateTime() , |
|||
const KDateTime & | pubMinTime = KDateTime() , |
|||
const KDateTime & | pubMaxTime = KDateTime() | |||
) | [virtual] |
List recent posts on the server depending on meta information about the post.
- Parameters:
-
label The lables of posts to fetch. number The number of posts to fetch. The order is newest first. upMinTime The oldest upload time of the posts to fetch. upMaxTime The newest upload time of the posts to fetch. pubMinTime The oldest publication time of the posts to fetch. pubMaxTime The newest publication time of the posts to fetch.
- See also:
- void listedPosts( const QList<KBlog::BlogPost>& )
void GData::fetchPost | ( | KBlog::BlogPost * | post | ) | [virtual] |
Fetch the Post with a specific id.
- Parameters:
-
post This is the post with its id set correctly.
Implements KBlog::Blog.
void GData::modifyPost | ( | KBlog::BlogPost * | post | ) | [virtual] |
Modify a post on server.
- Parameters:
-
post This is used to send the modified post including the correct id.
Implements KBlog::Blog.
void GData::createPost | ( | KBlog::BlogPost * | post | ) | [virtual] |
Create a new post on server.
- Parameters:
-
post This is send to the server.
- See also:
- createdPost( KBlog::BlogPost *post )
Implements KBlog::Blog.
void GData::removePost | ( | KBlog::BlogPost * | post | ) | [virtual] |
Remove a post from the server.
- Parameters:
-
post This is the post with its id set correctly.
Implements KBlog::Blog.
void GData::createComment | ( | KBlog::BlogPost * | post, | |
KBlog::BlogComment * | comment | |||
) | [virtual] |
Create a comment on the server.
- Parameters:
-
post This is the post with its id set correctly. comment This is the comment to create.
- See also:
- BlogPost::setPostId( const QString& )
createdComment( KBlog::BlogPost*, KBlog::BlogComment* )
void GData::removeComment | ( | KBlog::BlogPost * | post, | |
KBlog::BlogComment * | comment | |||
) | [virtual] |
Remove a comment from the server.
- Parameters:
-
post This is the post with its id set correctly. comment This is the comment to remove.
- See also:
- BlogPost::setPostId( const QString& )
removedComment( KBlog::BlogPost*, KBlog::BlogComment* )
void KBlog::GData::listedBlogs | ( | const QList< QMap< QString, QString > > & | blogsList | ) | [signal] |
This signal is emitted when a list of blogs has been fetched from the blogging server.
- Parameters:
-
blogsList The list of blogs.
- See also:
- listBlogs()
void KBlog::GData::listedAllComments | ( | const QList< KBlog::BlogComment > & | commentsList | ) | [signal] |
This signal is emitted when a list of all comments has been fetched from the blogging server.
- Parameters:
-
commentsList The list of comments.
- See also:
- listAllComments()
void KBlog::GData::listedComments | ( | KBlog::BlogPost * | post, | |
const QList< KBlog::BlogComment > & | comments | |||
) | [signal] |
This signal is emitted when a list of comments has been fetched from the blogging server.
- Parameters:
-
post This is the corresponding post. comments The list of comments.
- See also:
- listComments( KBlog::BlogPost* )
void KBlog::GData::createdComment | ( | const KBlog::BlogPost * | post, | |
const KBlog::BlogComment * | comment | |||
) | [signal] |
This signal is emitted when a comment has been created on the blogging server.
- Parameters:
-
post This is the corresponding post. comment This is the created comment.
void KBlog::GData::removedComment | ( | const KBlog::BlogPost * | post, | |
const KBlog::BlogComment * | comment | |||
) | [signal] |
This signal is emitted when a comment has been removed from the blogging server.
- Parameters:
-
post This is the corresponding post. comment This is the removed comment.
void KBlog::GData::fetchedProfileId | ( | const QString & | profileId | ) | [signal] |
This signal is emitted when the profile id has been fetched.
- Parameters:
-
profileId This is the fetched id. On error it is QString()
- See also:
- fetchProfileId()
The documentation for this class was generated from the following files: