• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdepim API Reference
  • KDE Home
  • Contact Us
 

blogilo

  • KBlog
  • Blogger
Signals | Public Member Functions | List of all members
KBlog::Blogger Class Reference

#include <blogger.h>

Inherits Blog.

Signals

void authenticated (const QMap< QString, QString > &authData)
 
void listedBlogs (const QList< QMap< QString, QString > > &blogs)
 
void listedComments (KBlog::BlogPost *post, const QList< BlogComment > &comments)
 

Public Member Functions

 Blogger (const KUrl &server, QObject *parent=0)
 
virtual ~Blogger ()
 
void authenticate (const QMap< QString, QString > &authData=QMap< QString, QString >())
 
void createPost (KBlog::BlogPost *post)
 
void fetchPost (KBlog::BlogPost *post)
 
QString interfaceName () const
 
void listBlogs ()
 
void listComments (KBlog::BlogPost *post)
 
void listRecentPosts (int number)
 
void modifyPost (KBlog::BlogPost *post)
 
void removePost (KBlog::BlogPost *post)
 
void setApiKey (const QString &apiKey)
 
void setSecretKey (const QString &secretKey)
 

Detailed Description

A class that can be used for access to Google blogs.

The blogspot.com and blogger.com accounts support native Blogger API v3.

Blog *myblog = new Blogger("http://myblog.blogspot.com");
myblog->setProfileId( "12345678" ); // can be fetched via fetchProfileId()
myblog->setBlogId( "1" ); // can be caught by listBlogs()
KBlog::BlogPost *post = new BlogPost();
post->setTitle( "This is the title." );
post->setContent( "Here is some the content..." );
myblog->createPost( post );
Author
Daniel Vrátil <dvratil@redhat.com>

Definition at line 65 of file blogger.h.

Constructor & Destructor Documentation

Blogger::Blogger ( const KUrl &  server,
QObject *  parent = 0 
)
explicit

Create an object for Blogger.

Parameters
serverThe blog URL
parentThe parent object, inherited from QObject.

Definition at line 237 of file blogger.cpp.

Blogger::~Blogger ( )
virtual

Destructor.

Definition at line 243 of file blogger.cpp.

Member Function Documentation

void Blogger::authenticate ( const QMap< QString, QString > &  authData = QMap<QString, QString>())

Authenticate this instance of Blogger against Google account.

When no authData is provided, full authentication will take place, which includes popping up a dialog with Google Accounts Sign-On.

Parameters
authDataOptinal authData received from authenticated(QMap<QString,QString>) signal emitted after previous authenticate() call.
See also
authenticated(QMap<QString,QString>)

Definition at line 266 of file blogger.cpp.

void KBlog::Blogger::authenticated ( const QMap< QString, QString > &  authData)
signal

This signal is emitted when authentication process started by call to authenticate() is finished.

Parameters
authDataOpaque authentication data (contains OAuth tokens) that application can store in some persistent storage (like KWallet) and pass them to authenticate() call on next start.
void Blogger::createPost ( KBlog::BlogPost *  post)

Create a new post on server.

Parameters
postThis is send to the server.
See also
createdPost( KBlog::BlogPost *post )

Definition at line 438 of file blogger.cpp.

void Blogger::fetchPost ( KBlog::BlogPost *  post)

Fetch the Post with a specific id.

Parameters
postThis is the post with its id set correctly.
See also
BlogPost::setPostId( const QString& )
fetchedPost( KBlog::BlogPost *post )

Definition at line 377 of file blogger.cpp.

QString Blogger::interfaceName ( ) const

Returns name of the service.

Definition at line 249 of file blogger.cpp.

void Blogger::listBlogs ( )

List the blogs available for this authentication on the server.

See also
void listedBlogs( const QList<QMap<QString,QString>>& )

Definition at line 319 of file blogger.cpp.

void Blogger::listComments ( KBlog::BlogPost *  post)

List the comments available for this post on the server.

Parameters
postThe post, which posts should be listed.
See also
void listedComments( KBlog::BlogPost*, const QList<KBlog::BlogComment>& )

Definition at line 510 of file blogger.cpp.

void KBlog::Blogger::listedBlogs ( const QList< QMap< QString, QString > > &  blogs)
signal

This signal is emitted when a list of blogs has been fetched from the blogging server.

Parameters
blogsListThe list of blogs.
See also
listBlogs()
void KBlog::Blogger::listedComments ( KBlog::BlogPost *  post,
const QList< BlogComment > &  comments 
)
signal

This signal is emitted when a list of comments has been fetched from the blogging server.

Parameters
postThis is the corresponding post.
commentsThe list of comments.
See also
listComments( KBlog::BlogPost* )
void Blogger::listRecentPosts ( int  number)

List recent posts on the server.

The status of the posts will be Fetched.

Parameters
numberThe number of posts to fetch. The order is newest first.
See also
void listedPosts( const QList<KBlog::BlogPost>& )
void fetchPost( KBlog::BlogPost* )
BlogPost::Status

Definition at line 347 of file blogger.cpp.

void Blogger::modifyPost ( KBlog::BlogPost *  post)

Modify a post on server.

Parameters
postThis is used to send the modified post including the correct id.

Definition at line 473 of file blogger.cpp.

void Blogger::removePost ( KBlog::BlogPost *  post)

Remove a post from the server.

Parameters
postThis is the post with its id set correctly.
See also
BlogPost::setPostId( const QString& )
removedPost( KBlog::BlogPost* )

Definition at line 411 of file blogger.cpp.

void Blogger::setApiKey ( const QString &  apiKey)

Sets Google OAuth application API key.

Parameters
apiKeyAPI key to use for requests.
See also
setSecretKey(QString)

Definition at line 254 of file blogger.cpp.

void Blogger::setSecretKey ( const QString &  secretKey)

Sets Google OAuth application secret key.

Parameters
secretKeySecret key to use for requests.
See also
setApiKey(QString)

Definition at line 260 of file blogger.cpp.


The documentation for this class was generated from the following files:
  • blogger.h
  • blogger.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:32:16 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

blogilo

Skip menu "blogilo"
  • Main Page
  • Namespace List
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members

kdepim API Reference

Skip menu "kdepim API Reference"
  • akonadi_next
  • akregator
  • blogilo
  • calendarsupport
  • console
  •   kabcclient
  •   konsolekalendar
  • kaddressbook
  • kalarm
  •   lib
  • kdgantt2
  • kjots
  • kleopatra
  • kmail
  • knode
  • knotes
  • kontact
  • korgac
  • korganizer
  • ktimetracker
  • libkdepim
  • libkleo
  • libkpgp
  • mailcommon
  • messagelist
  • messageviewer
  • pimprint

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal