various questions

10 views
Skip to first unread message

dbjeeves

unread,
Jun 28, 2007, 6:27:42 PM6/28/07
to SharedBook APIs
Hi,

I think the SharedBook API is a great idea, but sadly it doesn't seem
all that developer friendly at the moment... I've got a few random
questions that could help me get started though;

1) Where exactly on the sharedbook website would my "book making
space" appear? I can't find any documentation on this... Might it be
http://[username].sharedbook.com/[book title] or something like this?
(If I've missed where this is written down, could you point me to it
as I guess there might be some other useful info I'd be interested
in.)

2) I've found the python and java examples, but is there an eta on
when PHP examples will be ready?

3) Is there a limit for the max number of pages per book?

Thanks,
Dave

ramia

unread,
Jun 29, 2007, 9:25:31 AM6/29/07
to SharedBook APIs
Hi Dave,

1) Once you invoke the last API call (http://api.sharedbook.com/v0.6/
book/preview) you will receive in the response the URL which redirects
to the "preview-book" page. At this stage the BMS is behind the scenes
and is reflected in the book you see.
If on the "preview-book" page the user clicks "Personalize", and
registers (or signs-in), then his BMS[s] is displayed. From there
further assets can be added to the BMS and further books can be
created.
Independently from the api process, there should also be a direct link
to the BMS. Shall check this out and get back to you on this one.

2) A php example along with a php wrapper that will ease the
interaction with the API is about to be release very shortly (upcoming
weeks, maybe earlier).

3) A soft-cover may contain a maximum of 200 pages. A laminated-cover
250 pages.

I Hope this helps,

Rami

Senior Developer
SharedBook Inc.

On Jun 29, 1:27 am, dbjeeves <davebutler...@gmail.com> wrote:
> Hi,
>
> I think the SharedBook API is a great idea, but sadly it doesn't seem
> all that developer friendly at the moment... I've got a few random
> questions that could help me get started though;
>
> 1) Where exactly on the sharedbook website would my "book making

> space" appear? I can't find any documentation on this... Might it behttp://[username].sharedbook.com/[book title] or something like this?

Alex

unread,
Jul 1, 2007, 8:39:11 AM7/1/07
to SharedBook APIs
Hey Dave,

PHP wrapper will be available tomorrow. It's a stand alone PHP class,
requires only PHP version 4.3 or higher.

In the near future, we plan to add PEAR package and plugin for Zend
Framework.

Regards,
Alex

SharedBook Inc.

Ben Horst

unread,
Jul 2, 2007, 1:46:09 PM7/2/07
to sharedb...@googlegroups.com
I've modified the developer documentation pages to include Alex's PHP
wrapper. You can see the code and download an example from the bottom of
the Examples page here: http://www.sharedbook.com/biz/dev/examples.html

Thanks,
Ben

dbjeeves

unread,
Jul 2, 2007, 6:37:50 PM7/2/07
to SharedBook APIs
Alex's PHP wrapper is excellent and I got through to making my first
test book. I did however find this line on sb_api_example.php

$my_book = new SharedBook("< Your API key >", "f4f3-8a7c-43ca-
afe4-1d76-338c-f", "http://alex-pc-weblogic.sharedbook.com/pilot/api/
v0.6/");

a little misleading... Maybe

$my_book = new SharedBook("< Your API key >", "< Secret >");

would be better, using the default vals in the constructor, as I
originally though I should put my own callback url as the 3rd
parameter to start with and got through right up to first
"bms_add_comment" before the script failed.

It should also be noted that I think the constructor should be

function SharedBook($api_key, $secret_word, $api_url="http://
api.sharedbook.com/v0.6/", $port=80)

At the moment it's

function SharedBook($api_key, $secret_word, $api_url="http://
api.sharedbook.com/pilot/api/v0.6/", $port=80)

which responds for me at least with a 404...

Another very pedantic thing I spotted was that on the page to get my
api key and secret having logged in to

http://www.sharedbook.com/biz/dev/mydevaccount.html

the link to the terms and conditions is a dead link.


And... I've got a few more queries though(!), in no particular
order...

1) I had a look at a preview book of the abiknits blog via blog2book
(mentioned in your own blog), and noticed that abiknits is one big
chapter with a blue title, but the entries also have their dates in
blue as well, effectively sub-sections in the chapter. How is this
done in the api? Is there a way to defined the text formatting? In
particular being able to set the font size I think might be useful, so
also would placing photos within the chapter.


2) To put text into a chapter from the example there's

$my_book->bmscreate_init("Crossing the ocean", "Chapters of the
book", "Chapters text comes here") or die($my_book->error["errmsg"]);

so, was the abiknits chapter one big string called in a similar manner
to that above, replacing "Chapters text comes here"? This seems to me
like it could possibly have some limit or memory issues... not sure
though. Might there already exist a function whereby one can construct
a chapter in sections, i.e. appending strings to chapters?


3) Is the AddChapter function available so that books can have more
than one?

Alex

unread,
Jul 3, 2007, 1:49:33 AM7/3/07
to SharedBook APIs
Hi, thanx for the feedback.

Secret word indeed should be removed from the example and the zip will
be replaced in a few hours.
About the default URL in the constructor you are right, must be some
misconfiguration in my
local apache files.


Reply all
Reply to author
Forward
0 new messages