mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
More store plugin documentation.
This commit is contained in:
parent
1d50ac5cd1
commit
3ba9b28c94
@ -33,6 +33,14 @@ class StorePlugin(object): # {{{
|
|||||||
:attr:`gui` member. You can access other plugins by name, for example::
|
:attr:`gui` member. You can access other plugins by name, for example::
|
||||||
|
|
||||||
self.gui.istores['Amazon Kindle']
|
self.gui.istores['Amazon Kindle']
|
||||||
|
|
||||||
|
Plugin authors can use affiliate programs within their plugin. The
|
||||||
|
distribution of money earned from a store plugin is 70/30. 70% going
|
||||||
|
to the pluin author / maintainer and 30% going to the calibre project.
|
||||||
|
|
||||||
|
The easiest way to handle affiliate money payouts is to randomly select
|
||||||
|
between the author's affiliate id and calibre's affiliate id so that
|
||||||
|
70% of the time the author's id is used.
|
||||||
'''
|
'''
|
||||||
|
|
||||||
def __init__(self, gui, name):
|
def __init__(self, gui, name):
|
||||||
@ -71,6 +79,13 @@ class StorePlugin(object): # {{{
|
|||||||
isn't available because the store does not display cover images then it's okay to
|
isn't available because the store does not display cover images then it's okay to
|
||||||
ignore it.
|
ignore it.
|
||||||
|
|
||||||
|
Also, by default search results can only include ebooks. A plugin can offer users
|
||||||
|
an option to include physical books in the search results but this must be
|
||||||
|
disabled by default.
|
||||||
|
|
||||||
|
If a store doesn't provide search on it's own use something like a site specific
|
||||||
|
google search to get search results for this funtion.
|
||||||
|
|
||||||
:param query: The string query search with.
|
:param query: The string query search with.
|
||||||
:param max_results: The maximum number of results to return.
|
:param max_results: The maximum number of results to return.
|
||||||
:param timeout: The maximum amount of time in seconds to spend download the search results.
|
:param timeout: The maximum amount of time in seconds to spend download the search results.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user