Services_SharedBook
[ class tree: Services_SharedBook ] [ index: Services_SharedBook ] [ all elements ]

Class: Services_SharedBook

Source Location: /Services_SharedBook-0.2.2/Services/SharedBook.php

Class Overview


Services_SharedBook is the main class that represents the book.


Author(s):

Methods


Inherited Variables

Inherited Methods


Class Details

[line 63]
Services_SharedBook is the main class that represents the book.

Full documentation is found on the SharedBook site: http://www.sharedbook.com/biz/dev/index.html

PHP version 5



[ Top ]


Method Detail

__construct (Constructor)   [line 143]

Services_SharedBook __construct( string $apiKey, string $secretWord, [string $openApiUrl = self::OPEN_API_URL])

Constructor of the class
  • Access: public

Parameters:

string   $apiKey   —  Api key of the client.
string   $secretWord   —  Secret word.
string   $openApiUrl   —  Open API url, can be changed by user.

[ Top ]

authLogin   [line 290]

boolen authLogin( )

Function calls for auth/login.
  • Return: Whether the login succeeded.
  • Throws: Services_SharedBook_Exception When invalid auth token, session token returned
  • Access: public

[ Top ]

bmsAddComment   [line 529]

string bmsAddComment( string $ownerName, string $commentTitle, string $commentText, [string $chapterNumber = null], [string $textInChapter = null], [string $commentId = null], [string $time = null])

Function calls for bms/addComment.
  • Return: ID of the comment added
  • Throws: Services_SharedBook_Exception When no comment ID returned
  • Access: public

Parameters:

string   $ownerName   —  Comment owner (must be valid owner name)
string   $commentTitle   —  Comment title
string   $commentText   —  Comment text
string   $chapterNumber   —  If multiple article used, to which article goes this comment (optional)
string   $textInChapter   —  Text in chapter (optional)
string   $commentId   —  Comment id (optional)
string   $time   —  Comment time (optional)

[ Top ]

bmsAddPhoto   [line 643]

string bmsAddPhoto( string $filePath, string $ownerName, [string $fileName = null], [string $photoId = null], [string $caption = null], [string $time = null])

Function calls for bms/addPhoto
  • Return: ID of the photo added
  • Access: public

Parameters:

string   $filePath   —  Path for the photo to be uploaded
string   $ownerName   —  Photo owner (must be valid owner name)
string   $fileName   —  Name for the photo (optional)
string   $photoId   —  Photo id (optional)
string   $caption   —  Photo caption (optional)
string   $time   —  Photo time (optional)

[ Top ]

bmsCreateInit   [line 369]

string bmsCreateInit( string $bookTitle, string $chapterTitle, string $chapterTtext, [string $theme = 'sb.theme.vanilla'], [string $postCommentLink = null], [string $postPhotoLink = null])

Function calls for bmscreate/init.
  • Return: ID of book making space
  • Throws: Services_SharedBook_Exception When no bms ID returned
  • Access: public

Parameters:

string   $bookTitle   —  Book title
string   $chapterTitle   —  Chapter title
string   $chapterTtext   —  Chapter text
string   $theme   —  Theme for the book (optional)
string   $postCommentLink   —  Comment link (optional)
string   $postPhotoLink   —  Photo link (optional)

[ Top ]

bmsCreateInitMultipleArticles   [line 426]

string bmsCreateInitMultipleArticles( string $bookTitle, array $articles, [string $theme = 'sb.theme.vanilla'])

Function calls for bmscreate/init with multiple arcticles support
  • Return: ID of book making space
  • Throws: Services_SharedBook_Exception When no bms ID returned
  • Access: public

Parameters:

string   $bookTitle   —  Book title
array   $articles   —  Articles array. Each cell should contain (chapterTitle, chapterText, [postCommentLink], [postPhotoLink])
string   $theme   —  Theme for the book (optional)

[ Top ]

bmsCreatePublish   [line 486]

boolean bmsCreatePublish( )

Function calls for bmscreate/publish.
  • Return: Wheter bms publishing succeeded
  • Access: public

[ Top ]

bmsPublish   [line 718]

boolean bmsPublish( )

Function calls for bms/publish
  • Return: Whether book making space publishing succeeded
  • Access: public

[ Top ]

bmsSetBackCoverPhoto   [line 697]

string bmsSetBackCoverPhoto( string $filePath, string $ownerName, [string $fileName = null], [string $photoId = null], [string $caption = null], [string $time = null])

Function calls for bms/setBackCoverPhoto
  • Return: ID of the photo added
  • Access: public

Parameters:

string   $filePath   —  Path for the photo to be uploaded
string   $ownerName   —  Photo owner (must be valid owner name)
string   $fileName   —  Name for the photo (optional)
string   $photoId   —  Photo id (optional)
string   $caption   —  Photo caption (optional)
string   $time   —  Photo time (optional)

[ Top ]

bmsSetFrontCoverPhoto   [line 670]

string bmsSetFrontCoverPhoto( string $filePath, string $ownerName, [string $fileName = null], [string $photoId = null], [string $caption = null], [string $time = null])

Function calls for bms/setFrontCoverPhoto
  • Return: ID of the photo added
  • Access: public

Parameters:

string   $filePath   —  Path for the photo to be uploaded
string   $ownerName   —  Photo owner (must be valid owner name)
string   $fileName   —  Name for the photo (optional)
string   $photoId   —  Photo id (optional)
string   $caption   —  Photo caption (optional)
string   $time   —  Photo time (optional)

[ Top ]

bookCreateInit   [line 751]

boolean bookCreateInit( )

Function calls for bookcreate/init
  • Return: Whether book creating init succeeded
  • Access: public

[ Top ]

bookCreatePublish   [line 821]

string bookCreatePublish( )

Function calls for bookcreate/publish
  • Return: Book ID of the published book
  • Throws: Services_SharedBook_Exception When no book ID returned
  • Access: public

[ Top ]

bookCreateSetDedication   [line 786]

boolean bookCreateSetDedication( string $dedicationText)

Function calls for bookcreate/setDedication
  • Return: Whether setting the dedication succeeded
  • Access: public

Parameters:

string   $dedicationText   —  Text for dedication page

[ Top ]

bookPreview   [line 863]

string bookPreview( )

Function calls for book/preview
  • Return: URL to the book itself
  • Throws: Services_SharedBook_Exception When no URL returned
  • Access: public

[ Top ]

getLastResponse   [line 253]

string getLastResponse( )

Function returns last API response
  • Return: API response
  • Access: public

[ Top ]

setMembers   [line 166]

none setMembers( array $parametersArray)

Sets the members manualy in the case session already exists on the server
  • Access: public

Parameters:

array   $parametersArray   —  Array with all the parameters

[ Top ]


Documentation generated on Mon, 11 Mar 2019 14:44:17 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.