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

Class: Services_SharedBook

Source Location: /Services_SharedBook-0.1.0/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 269]

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

string bmsAddComment( string $ownerName, string $commentTitle, string $commentText, [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   $textInChapter   —  Text in chapter (optional)
string   $commentId   —  Comment id (optional)
string   $time   —  Comment time (optional)

[ Top ]

bmsAddPhoto   [line 552]

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

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 ]

bmsCreatePublish   [line 398]

boolean bmsCreatePublish( )

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

[ Top ]

bmsPublish   [line 627]

boolean bmsPublish( )

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

[ Top ]

bmsSetBackCoverPhoto   [line 606]

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

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

boolean bookCreateInit( )

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

[ Top ]

bookCreatePublish   [line 730]

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

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

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

string getLastResponse( )

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

[ Top ]


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