GData.Commentable¶
- Implementations:
Methods¶
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
|
|
|
Properties¶
None
Signals¶
None
Fields¶
None
Class Details¶
- class GData.Commentable¶
- Bases:
- Structure:
All the fields in the
GData.Commentablestructure are private and should never be accessed directlyNew in version 0.10.0.
- delete_comment(service, comment_, cancellable)¶
- Parameters:
service (
GData.Service) – aGData.Servicewith which the comment will be deletedcomment (
GData.Comment) – a comment to be deletedcancellable (
Gio.CancellableorNone) – optionalGio.Cancellableobject, orNone
- Raises:
- Returns:
Trueif the comment was successfully deleted,Falseotherwise- Return type:
Deletes comment from the
GData.Commentable.If the given comment isn’t deletable (either because the service doesn’t support deleting comments at all, or because this particular comment is not deletable due to having insufficient permissions),
GData.ServiceError.FORBIDDENwill be set in error andFalsewill be returned.New in version 0.10.0.
- delete_comment_async(service, comment_, cancellable, callback, *user_data)¶
- Parameters:
service (
GData.Service) – aGData.Servicewith which the comment will be deletedcomment (
GData.Comment) – a comment to be deletedcancellable (
Gio.CancellableorNone) – optionalGio.Cancellableobject, orNonecallback (
Gio.AsyncReadyCallbackorNone) – aGio.AsyncReadyCallbackto call when the operation is finisheduser_data (
objectorNone) – data to pass to the callback function
Deletes comment from the
GData.Commentable. self, service and comment_ are all reffed when this method is called, so can safely be freed after this method returns.For more details, see
GData.Commentable.delete_comment(), which is the synchronous version of this method.When the operation is finished, callback will be called. You can then call
GData.Commentable.delete_comment_finish() to get the results of the operation.New in version 0.10.0.
- delete_comment_finish(result)¶
- Parameters:
result (
Gio.AsyncResult) – aGio.AsyncResult- Raises:
- Returns:
Trueif the comment was successfully deleted,Falseotherwise- Return type:
Finishes an asynchronous comment deletion operation started with
GData.Commentable.delete_comment_async().New in version 0.10.0.
- insert_comment(service, comment_, cancellable)¶
- Parameters:
service (
GData.Service) – aGData.Servicewith which the comment will be addedcomment (
GData.Comment) – a new comment to be added to theGData.Commentablecancellable (
Gio.CancellableorNone) – optionalGio.Cancellableobject, orNone
- Raises:
- Returns:
the added
GData.Comment, orNone; unref withGObject.Object.unref()- Return type:
Adds comment to the
GData.Commentable.If the
GData.Commentabledoesn’t support commenting,Nonewill be returned and error will be set toGData.ServiceError.FORBIDDEN.New in version 0.10.0.
- insert_comment_async(service, comment_, cancellable, callback, *user_data)¶
- Parameters:
service (
GData.Service) – aGData.Servicewith which the comment will be addedcomment (
GData.Comment) – a new comment to be added to theGData.Commentablecancellable (
Gio.CancellableorNone) – optionalGio.Cancellableobject, orNonecallback (
Gio.AsyncReadyCallbackorNone) – aGio.AsyncReadyCallbackto call when the operation is finisheduser_data (
objectorNone) – data to pass to the callback function
Adds comment to the
GData.Commentable. self, service and comment_ are all reffed when this method is called, so can safely be freed after this method returns.For more details, see
GData.Commentable.insert_comment(), which is the synchronous version of this method.When the operation is finished, callback will be called. You can then call
GData.Commentable.insert_comment_finish() to get the results of the operation.New in version 0.10.0.
- insert_comment_finish(result)¶
- Parameters:
result (
Gio.AsyncResult) – aGio.AsyncResult- Raises:
- Returns:
the added
GData.Comment, orNone; unref withGObject.Object.unref()- Return type:
Finishes an asynchronous comment insertion operation started with
GData.Commentable.insert_comment_async().New in version 0.10.0.
- query_comments(service, query, cancellable, progress_callback, *progress_user_data)¶
- Parameters:
service (
GData.Service) – aGData.Servicerepresenting the service with which the object’s comments will be manipulatedquery (
GData.QueryorNone) – aGData.Querywith query parameters, orNonecancellable (
Gio.CancellableorNone) – optionalGio.Cancellableobject, orNoneprogress_callback (
GData.QueryProgressCallbackorNone) – aGData.QueryProgressCallbackto call when a comment is loaded, orNoneprogress_user_data (
objectorNone) – data to pass to the progress_callback function
- Raises:
- Returns:
a
GData.FeedofGData.Comments, orNone; unref withGObject.Object.unref()- Return type:
GData.FeedorNone
Retrieves a
GData.Feedcontaining theGData.Commentsrepresenting the comments on theGData.Commentablewhich match the given query.If the
GData.Commentabledoesn’t support commenting,Nonewill be returned and error will be set toGData.ServiceError.FORBIDDEN. This is in contrast to if it does support commenting but hasn’t had any comments added yet, in which case an emptyGData.Feedwill be returned and no error will be set.New in version 0.10.0.
- query_comments_async(service, query, cancellable, progress_callback, progress_user_data, callback, *user_data)¶
- Parameters:
service (
GData.Service) – aGData.Servicerepresenting the service with which the object’s comments will be manipulatedquery (
GData.QueryorNone) – aGData.Querywith query parameters, orNonecancellable (
Gio.CancellableorNone) – optionalGio.Cancellableobject, orNoneprogress_callback (
GData.QueryProgressCallbackorNone) – aGData.QueryProgressCallbackto call when a comment is loaded, orNoneprogress_user_data (
objectorNone) – data to pass to the progress_callback functioncallback (
Gio.AsyncReadyCallbackorNone) – aGio.AsyncReadyCallbackto call when the query is finisheduser_data (
objectorNone) – data to pass to the callback function
Retrieves a
GData.Feedcontaining theGData.Commentsrepresenting the comments on theGData.Commentablewhich match the given query. self, service and query are all reffed when this method is called, so can safely be freed after this method returns.For more details, see
GData.Commentable.query_comments(), which is the synchronous version of this method.When the operation is finished, callback will be called. You can then call
GData.Commentable.query_comments_finish() to get the results of the operation.New in version 0.10.0.
- query_comments_finish(result)¶
- Parameters:
result (
Gio.AsyncResult) – aGio.AsyncResult- Raises:
- Returns:
a
GData.FeedofGData.Comments, orNone; unref withGObject.Object.unref()- Return type:
GData.FeedorNone
Finishes an asynchronous comment query operation started with
GData.Commentable.query_comments_async().New in version 0.10.0.
- do_get_insert_comment_uri(comment) virtual¶
- Parameters:
comment (
GData.Comment) –- Return type:
a function that returns the URI to add new comments to the commentable object, or
Noneif the given commentable object doesn’t support adding comments; free withGLib.free()
- do_get_query_comments_uri() virtual¶
- Return type:
a function that returns the URI of a
GData.Feedof comments from a commentable object, orNoneif the given commentable object doesn’t support commenting; free withGLib.free()
- do_is_comment_deletable(comment) virtual¶
- Parameters:
comment (
GData.Comment) –- Return type:
a function that returns
Trueif the given comment may be deleted,Falseotherwise