spring-social-facebook

org.springframework.social.facebook.api
Interface BookActions

All Known Implementing Classes:
BookActionsTemplate

public interface BookActions

Defines operations for publishing OpenGraph actions pertaining to books. Many OpenGraph operations require approval from Facebook. See https://developers.facebook.com/docs/opengraph/submission-process for details.

Author:
Craig Walls

Method Summary
 java.lang.String quoteBook(java.lang.String bookUrl, java.lang.String quote)
          Publishes a "books.quotes" action for the OpenGraph book object at the given URL.
 java.lang.String quoteBook(java.lang.String bookUrl, java.lang.String quote, ActionMetadata metadata)
          Publishes a "books.quotes" action for the OpenGraph book object at the given URL.
 java.lang.String rateBook(java.lang.String bookUrl, float rating, int scale)
          Publishes a "books.rates" action for the OpenGraph book object at the given URL.
 java.lang.String rateBook(java.lang.String bookUrl, float rating, int scale, ActionMetadata metadata)
          Publishes a "books.rates" action for the OpenGraph book object at the given URL.
 java.lang.String readBook(java.lang.String bookUrl, long timestamp, float percentComplete)
          Publishes a "books.reads" action for the OpenGraph book object at the given URL.
 java.lang.String readBook(java.lang.String bookUrl, long timestamp, float percentComplete, ActionMetadata metadata)
          Publishes a "books.reads" action for the OpenGraph book object at the given URL.
 java.lang.String wantsToRead(java.lang.String bookUrl)
          Publishes a "books.wants_to_read" action for the OpenGraph book object at the given URL.
 java.lang.String wantsToRead(java.lang.String bookUrl, ActionMetadata metadata)
          Publishes a "books.wants_to_read" action for the OpenGraph book object at the given URL.
 

Method Detail

readBook

java.lang.String readBook(java.lang.String bookUrl,
                          long timestamp,
                          float percentComplete)
Publishes a "books.reads" action for the OpenGraph book object at the given URL.

Parameters:
bookUrl - The URL of the book that is being read. Must reference an OpenGraph object of type "books.book".
timestamp - The time that the book was read.
percentComplete - The percentage of the book that has been read.
Returns:
The ID for the action created.

readBook

java.lang.String readBook(java.lang.String bookUrl,
                          long timestamp,
                          float percentComplete,
                          ActionMetadata metadata)
Publishes a "books.reads" action for the OpenGraph book object at the given URL.

Parameters:
bookUrl - The URL of the book that is being read. Must reference an OpenGraph object of type "books.book".
timestamp - The time that the book was read.
percentComplete - The percentage of the book that has been read.
metadata - Action metadata to be applied to the action.
Returns:
The ID for the action created.

quoteBook

java.lang.String quoteBook(java.lang.String bookUrl,
                           java.lang.String quote)
Publishes a "books.quotes" action for the OpenGraph book object at the given URL.

Parameters:
bookUrl - The URL of the book that is being quoted. Must reference an OpenGraph object of type "books.book".
quote - The quote from the book.
Returns:
The ID for the action created.

quoteBook

java.lang.String quoteBook(java.lang.String bookUrl,
                           java.lang.String quote,
                           ActionMetadata metadata)
Publishes a "books.quotes" action for the OpenGraph book object at the given URL.

Parameters:
bookUrl - The URL of the book that is being quoted. Must reference an OpenGraph object of type "books.book".
quote - The quote from the book.
metadata - Action metadata to be applied to the action.
Returns:
The ID for the action created.

wantsToRead

java.lang.String wantsToRead(java.lang.String bookUrl)
Publishes a "books.wants_to_read" action for the OpenGraph book object at the given URL.

Parameters:
bookUrl - The URL of the book that is wanted to be read. Must reference an OpenGraph object of type "books.book".
Returns:
The ID for the action created.

wantsToRead

java.lang.String wantsToRead(java.lang.String bookUrl,
                             ActionMetadata metadata)
Publishes a "books.wants_to_read" action for the OpenGraph book object at the given URL.

Parameters:
bookUrl - The URL of the book that is wanted to be read. Must reference an OpenGraph object of type "books.book".
metadata - Action metadata to be applied to the action.
Returns:
The ID for the action created.

rateBook

java.lang.String rateBook(java.lang.String bookUrl,
                          float rating,
                          int scale)
Publishes a "books.rates" action for the OpenGraph book object at the given URL.

Parameters:
bookUrl - The URL of the book that is being rated. Must reference an OpenGraph object of type "books.book".
rating - The rating given to the book, relative to the scale attribute. (e.g., "{rating} out of {scale} stars")
scale - The maximum rating possible.
Returns:
The ID for the action created.

rateBook

java.lang.String rateBook(java.lang.String bookUrl,
                          float rating,
                          int scale,
                          ActionMetadata metadata)
Publishes a "books.rates" action for the OpenGraph book object at the given URL.

Parameters:
bookUrl - The URL of the book that is being rated. Must reference an OpenGraph object of type "books.book".
rating - The rating given to the book, relative to the scale attribute. (e.g., "{rating} out of {scale} stars")
scale - The maximum rating possible.
metadata - Action metadata to be applied to the action. May be an instance of RatingActionMetadata to apply review text and/or a review link to the rating.
Returns:
The ID for the action created.

spring-social-facebook