Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre > Development

Notices

Reply
 
Thread Tools Search this Thread
Old 06-24-2015, 03:31 PM   #1
mindblender
Junior Member
mindblender began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Feb 2013
Device: iPad
Ajax Endpoint usage?

I am trying to use the endpoints listed in https://github.com/kovidgoyal/calibr...re/srv/ajax.py and I seem to not be using them correctly or am missing something.

Here are the URLs I am hitting and their response:
http://<calibre_ip>:8080/ajax/books - I get "must specify some ids." I would expect a list of books returned when if I do not pass a list of IDs.

http://<calibre_ip>:8080/ajax/book/123 - I get the book details for book 123

Any suggestion on how to get a list of books?

Some additional notes/suggestions:
when hitting http://<calibre_ip>:8080/ajax/categories - if an entry is not a category, then do not return a URL since the URL results in a 404. Otherwise, allow access to non-categories such as "Newest" and "All Books".

Thanks!
Jeff
mindblender is offline   Reply With Quote
Old 06-24-2015, 10:12 PM   #2
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,776
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
As the documentation says, you need:

/ajax/books?ids=1,2,3

If you want a list of all ids in the library use

/ajax/search

the result is paginated and sorted according to any field you want (see the docs).

All URLs in /ajax/categories work, including the ones for newest and all books.
kovidgoyal is offline   Reply With Quote
Advert
Old 06-24-2015, 10:16 PM   #3
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,776
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Oh and I should note that the in-progress server re-write allows you to specify

/ajax/books?ids=all

to get all ids so you dont have to use search -- which can be a little unintuitive.
kovidgoyal is offline   Reply With Quote
Old 06-25-2015, 03:44 AM   #4
mindblender
Junior Member
mindblender began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Feb 2013
Device: iPad
Great! Thanks for the info. I believe that will help me get started.
mindblender is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Loading external file via Ajax. BenTrafford Development 1 04-27-2015 10:50 PM
Free (Kindle/Nook) Beyond the Keynesian Endpoint [Politics/Economics] ATDrake Deals and Resources (No Self-Promotion or Affiliate Links) 1 02-11-2012 12:41 AM
Ajax Publisher jasonb57 Self-Promotions by Authors and Publishers 58 11-09-2011 11:23 AM
Free Book (Kindle) - The Keynesian Endpoint koland Deals and Resources (No Self-Promotion or Affiliate Links) 0 02-14-2011 03:33 AM


All times are GMT -4. The time now is 03:19 PM.


MobileRead.com is a privately owned, operated and funded community.