aboutsummaryrefslogtreecommitdiff
path: root/mediawiki.lrdevplugin/MediaWikiApi.lua
Commit message (Collapse)AuthorAge
* Add option to populate a gallery.Robin Krahl2015-06-28
| | | | | | | | | | | | | | If set, a new section of the given page is created with a gallery of the uploaded files. - add MediaWikiApi.appendToPage and MediaWikiInterface.addToGallery - require target file name to be set when calling MediaWikiInterface.uploadFile - calculate file name in MediaWikiExportServiceProvider.processRenderedPhotos insted of in ..., store it and pass it to MediaWikiInterface.addToGallery - add the gallery option to the export dialog in MediaWikiExportServiceProvider - update messages Fix #24.
* Check for new versions after start.Robin Krahl2015-06-27
| | | | | | | | | | | | | | | | | | | After LrMediaWiki is loaded, GitHub is checked for new versions if the user enabled that setting. To parse the response of the GitHub API, a third-party library is used for JSON parsing (JSON.lua). As the GitHub API query for the latest release only returns non-pre-release versions, all releases are queried and the first one is considered the latest. - create MediaWikiInit that queries the new version and shows a message (if necessary) - add MediaWikiInit to Info so that it is run after LrMediaWiki is loaded - add ‘Check version’ setting to the configuration - refactor MediaWikiApi and create performHttpRequest as a generic HTTP request method - add MediaWikiApi.getCurrentPluginVersion to query the GitHub API Fix #44.
* Add logging support and fix refactoring errors.Robin Krahl2015-06-27
| | | | | | | | | | | | | | The user now may enable logging in MediaWikiUtils. If logging is enabled, a log file is written to the user’s "My Documents" that contains all API requests. Furthermore, bugs introduced by the refactoring in commit 8862341672dc288596d6ef66f92751bba6dfef25 have been fixed. - set up logging in MediaWikiUtils - write to the log in MediaWikiApi.performRequest - fix error in MediaWikiExportServiceProvider.processRenderedPhotos - fix error in MediaWikiApi.parseXmlDom Fix #43.
* Fix coding style and add `luacheck` to Travis CI.Robin Krahl2015-06-27
| | | | Fix #40.
* Improve error message for API warningsRobin Krahl2015-02-02
| | | | | | | | | | | | | Display more information if the upload fails because the API returned a warning. Therefor the warnings tag is parsed if the result is Warning, and the keys of the tag are shown as error message (e. g. 'badfilename'). Previously, the error message was only 'Warning', which did not help users to identify the problem. - modify MediaWikiApi.upload to give a more specific error message for API warnings Fix #36
* Check for empty HTTP statusRobin Krahl2014-11-01
| | | | | | | | | | | Raise a specific error if the HTTP status is empty. This indicates that there is no internet connection or that the MediaWiki installation cannot be reached. Previously, the error message just reported an empty HTTP status. - check for empty HTTP status in `MediaWikiApi` Fix https://github.com/ireas/LrMediaWiki/issues/28
* Add permission field to export dialogRobin Krahl2014-11-01
| | | | | | | | | | | Add the permission field to the export dialog and to the file description template. - add permission to the template in `description.txt` - add permission to the UI in `MediaWikiExportServiceProvider` - add permission to the data items in `MediaWikiInterface` Fix https://github.com/ireas/LrMediaWiki/issues/27
* Fix #23: [string "MediaWikiApi.lua"]:68: table index is nilRobin Krahl2014-10-06
|
* Initial commit.v0.1Robin Krahl2014-08-21