-
-
Notifications
You must be signed in to change notification settings - Fork 7
Added new Erply Api options Could include more #11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,9 +2,7 @@ | |
| """ | ||
| ErplyAPI | ||
| ~~~~~~~~ | ||
|
|
||
| Simple Python wrapper for Erply API | ||
|
|
||
| :copyright: (c) 2014-2016 by Priit Laes | ||
| :license: BSD, see LICENSE for details. | ||
| """ | ||
|
|
@@ -33,7 +31,6 @@ class ErplyException(Exception): | |
| class ErplyAPILimitException(ErplyException): | ||
| """Raised when Erply API limit (by default 1000 requests per hour) has | ||
| been exceeded. | ||
|
|
||
| :param server_time: Erply server time. Can be used to determine amount of | ||
| time until API accepts requests again. | ||
| """ | ||
|
|
@@ -67,21 +64,26 @@ class Erply(object): | |
| ,'getEmployees' | ||
| ,'getProducts' | ||
| ,'getProductCategories' | ||
| ,'getProductCostForSpecificAmount' # untested | ||
| ,'getProductCostForSpecificAmount' | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Did you test this API call?
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes |
||
| ,'getProductGroups' | ||
| ,'getProductPrices' # untested, broken ?? | ||
| ,'getProductPriorityGroups' # untested | ||
| ,'getProductStock' # untested | ||
| ,'getProductPrices' | ||
| ,'getProductPriorityGroups' | ||
| ,'getProductStock' | ||
| ,'getProductUnits' | ||
| ,'getPurchaseDocuments' | ||
| ,'getReports' | ||
| ,'getSalesDocuments' | ||
| ,'getServices' | ||
| ,'getWarehouses' | ||
| ,'getAllowedWarehouses' | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This list is supposed to be alphabetically ordered.
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sorry For that |
||
| ,'verifyUser' | ||
| ,'getCampaigns' | ||
| ,'getStocktakings' | ||
| ,'getAccountStatements' | ||
| ,'getCostOfGoodsSold' | ||
| ) | ||
| ERPLY_CSV = ('getProductStockCSV', 'getSalesReport') | ||
| ERPLY_POST = ('saveProduct',) | ||
| ERPLY_CSV = ('getProductStockCSV', 'getSalesReport','getPurchaseReport') | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Alphabetic order please. |
||
| ERPLY_POST = ('saveProduct') | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The removed comma is needed as |
||
|
|
||
| def __init__(self, auth, erply_api_url=None, wait_on_limit=False): | ||
| self.auth = auth | ||
|
|
@@ -122,7 +124,6 @@ def api_url(self): | |
|
|
||
| def _erply_query(self, data, _initial_response=None): | ||
| """Send request to Erply API and parse response. | ||
|
|
||
| Returns two-tuple containing: `retry` and `data` values: | ||
| - `retry` is boolean specifying whether session token was expired | ||
| and signalling caller to request new session token and redo the | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please keep existing empty lines in the docstrings. Please check PEP 257.