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

Class: Services_SharedBook

Source Location: /Services_SharedBook-0.2.6/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 146]

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 323]

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 575]

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 704]

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 403]

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 461]

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

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)
   $groups   — 

[ Top ]

bmsCreatePublish   [line 532]

boolean bmsCreatePublish( )

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

[ Top ]

bmsPublish   [line 799]

boolean bmsPublish( )

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

[ Top ]

bmsSetBackCoverPhoto   [line 778]

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 751]

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 832]

boolean bookCreateInit( )

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

[ Top ]

bookCreatePublish   [line 974]

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 ]

bookCreateSetCoverTheme   [line 939]

boolean bookCreateSetCoverTheme( $coverTheme, string $subtitleText)

Function calls for bookcreate/setSubtitle
  • Return: Whether setting the subtitle succeeded
  • Access: public

Parameters:

string   $subtitleText   —  Text for subtitle in the cover
   $coverTheme   — 

[ Top ]

bookCreateSetDedication   [line 867]

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 ]

bookCreateSetSubtitle   [line 903]

boolean bookCreateSetSubtitle( string $subtitleText)

Function calls for bookcreate/setSubtitle
  • Return: Whether setting the subtitle succeeded
  • Access: public

Parameters:

string   $subtitleText   —  Text for subtitle in the cover

[ Top ]

bookPreview   [line 1018]

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 284]

string getLastResponse( )

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

[ Top ]

getMembers   [line 188]

array getMembers( )

Gets the members manualy in the case session already exists on the server
  • Return: Array with all the parameters
  • Access: public

[ Top ]

photoUpload   [line 726]

string photoUpload( $filePath, string $photoData)

Function calls for photo/upload
  • Return: URL of the photo added
  • Access: public

Parameters:

string   $photoData   —  byte array fo the photo to be uploaded
   $filePath   — 

[ Top ]

setMembers   [line 169]

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 15:19:38 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.