Hi All,
We've put together the beginnings of an API for Leanpub. Right now you can
It's pretty straightforward. To do a preview, you post to:
https://leanpub.com/SLUG/preview?api_key=YOUR_API_KEY
The full documentation is at https://leanpub.com/help/api. It explains all the options available and how to get your api key.
Please let us know what you like, what you wish it would do and what cool things you're built with it.
Enjoy!
Scott
--
You received this message because you are subscribed to the Google Groups "leanpub" group.
To unsubscribe from this group and stop receiving emails from it, send an email to leanpub+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
Presumably, the publish and preview actions for a slug are rejected if the API key doesn't match with the author? I.e. I can send a request to have scotttest999 published, with my API key.
As well as invidual data, can there be an endpoint to get information on total sales? E.g. Total number of happy people, total number of paid people, total refunds, total royalties etc? (I think this is all from the /slug/sales page)
Gary.
--
You received this message because you are subscribed to the Google Groups "leanpub" group.
To unsubscribe from this group and stop receiving emails from it, send an email to leanpub+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
Gary.
Great. That, as of yesterday, hadn't been added to /help/api yet.
Gary.
--
You received this message because you are subscribed to the Google Groups "leanpub" group.
To unsubscribe from this group and stop receiving emails from it, send an email to leanpub+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
Hi All,
We've put together the beginnings of an API for Leanpub. Right now you can
Hi Mathias,
I've just added support for this, and will be deploying it later today. It should be live in a couple of hours.
I've added it to the documentation, but the gist of it is that instead of posting to https://leanpub.com/SLUG/preview.json
you post to https://leanpub.com/SLUG/preview/subset.json
.
Scott
--
You received this message because you are subscribed to the Google Groups "leanpub" group.
To unsubscribe from this group and stop receiving emails from it, send an email to leanpub+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
Hi Mathias,
I've just added support for this, and will be deploying it later today. It should be live in a couple of hours.
thanks, this works with version 0.1.0 of the perl module WebService::Leanpub which I have just uploaded to CPAN. It should be available in a couple of hours. Regards, Mathias
Hey Scott,I'm looking to try to use this in a google spreadsheet "dashboard" and I'm running into a few issues. The first is that I am trying to see what the data that gets returned looks like. To see how it all looks, I installed curl and tried some of the examples in the API documentation, e.g.C:\Program Files\cURL\bin>curl "http://leanpub.com/electricfertilizerbook/sales.json?api_key=MY_API_KEY"And I get:<html><head><title>301 Moved Permanently</title></head><body bgcolor="white"><center><h1>301 Moved Permanently</h1></center><hr><center>nginx</center></body></html>or with the https I get from: curl "https://leanpub.com/electricfertilizerbook/sales.json?api_key=3wr6RR3LP1ahT00mREQiWK"Redirecting to <a href="http://leanpub.com/ElectricFertilizerBook/sales.json">http://leanpub.com/ElectricFertilizerBook/sales.json</a>Once this gets figured out, then getting it into google docs should be a lot easier.Thanks for your help!-David
--
You received this message because you are subscribed to the Google Groups "leanpub" group.
To unsubscribe from this group and stop receiving emails from it, send an email to leanpub+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.