|
QtRedmine
|
Simple Redmine connection class. More...
#include <SimpleRedmineClient.h>
Public Slots | |
| void | checkConnectionStatus (QNetworkAccessManager::NetworkAccessibility accessible=QNetworkAccessManager::UnknownAccessibility) |
| Check whether the connection currently works. More... | |
Signals | |
| void | connectionChanged (QNetworkAccessManager::NetworkAccessibility connected) |
| Singal that the connection to Redmine has changed. More... | |
Signals inherited from qtredmine::RedmineClient | |
| void | initialised () |
| Signal that the connection has been initialised. | |
| void | networkAccessibleChanged (QNetworkAccessManager::NetworkAccessibility accessible) |
| Signal that the network accessibility has changed. More... | |
| void | requestFinished (JsonCb callback, QNetworkReply *reply, QJsonDocument *json) |
| Signal that the request has finished. More... | |
Public Member Functions | |
| SimpleRedmineClient (QObject *parent=nullptr) | |
| Constructor for an unconfigured Redmine connection. More... | |
| SimpleRedmineClient (QString url, QObject *parent=nullptr) | |
| Constructor for an unconfigured Redmine connection. More... | |
| SimpleRedmineClient (QString url, QString apiKey, bool checkSsl=true, QObject *parent=nullptr) | |
| Constructor for a Redmine connection using API key authentication. More... | |
| SimpleRedmineClient (QString url, QString login, QString password, bool checkSsl=true, QObject *parent=nullptr) | |
| Constructor for a Redmine connection using basic authentication. More... | |
| void | init () |
| Initialise the Redmine client. | |
Redmine data creators and updaters | |
| void | sendIssue (Issue item, SuccessCb callback=nullptr, int id=-1, QString parameters="") |
| Create or update issue in Redmine. More... | |
| void | sendIssuePriority (Enumeration item, SuccessCb callback=nullptr, int id=-1, QString parameters="") |
| Create or update issue priority in Redmine. More... | |
| void | sendIssueStatus (IssueStatus item, SuccessCb callback=nullptr, int id=-1, QString parameters="") |
| Create or update issue status in Redmine. More... | |
| void | sendProject (Project item, SuccessCb callback=nullptr, int id=-1, QString parameters="") |
| Create or update project in Redmine. More... | |
| void | sendTimeEntry (TimeEntry item, SuccessCb callback=nullptr, int id=-1, QString parameters="") |
| Create or update time entry in Redmine. More... | |
| void | sendTimeEntryActivity (Enumeration item, SuccessCb callback=nullptr, int id=-1, QString parameters="") |
| Create or update time entry activity in Redmine. More... | |
| void | sendTracker (Tracker item, SuccessCb callback=nullptr, int id=-1, QString parameters="") |
| Create or update tracker in Redmine. More... | |
Redmine data retrievers | |
| void | retrieveIssuePriorities (EnumerationsCb callback, QString parameters="") |
| Retrieve issue priorities from Redmine. More... | |
| void | retrieveIssue (IssueCb callback, int issueId, QString parameters="") |
| Retrieve an issue from Redmine. More... | |
| void | retrieveIssues (IssuesCb callback, RedmineOptions options=RedmineOptions()) |
| Retrieve issues from Redmine. More... | |
| void | retrieveIssueStatuses (IssueStatusesCb callback, QString parameters="") |
| Retrieve issue statuses from Redmine. More... | |
| void | retrieveProjects (ProjectsCb callback, QString parameters="") |
| Retrieve projects from Redmine. More... | |
| void | retrieveTimeEntries (TimeEntriesCb callback, QString parameters="") |
| Retrieve time entries from Redmine. More... | |
| void | retrieveTimeEntryActivities (EnumerationsCb callback, QString parameters="") |
| Retrieve time entry activities from Redmine. More... | |
| void | retrieveTrackers (TrackersCb callback, QString parameters="") |
| Retrieve trackers from Redmine. More... | |
| void | retrieveCurrentUser (UserCb callback) |
| Retrieve current user from Redmine. More... | |
| void | retrieveUsers (UsersCb callback, QString parameters="") |
| Retrieve users from Redmine. More... | |
Public Member Functions inherited from qtredmine::RedmineClient | |
| RedmineClient (QObject *parent=nullptr) | |
| Constructor for an unconfigured Redmine connection. More... | |
| RedmineClient (QString url, QObject *parent=nullptr) | |
| Constructor for an unconfigured Redmine connection. More... | |
| RedmineClient (QString url, QString apiKey, bool checkSsl=true, QObject *parent=nullptr) | |
| Constructor for a Redmine connection using API key authentication. More... | |
| RedmineClient (QString url, QString login, QString password, bool checkSsl=true, QObject *parent=nullptr) | |
| Constructor for a Redmine connection using basic authentication. More... | |
| void | reconnect () |
| (Re-)Connect to Redmine | |
| QString | getUrl () const |
| Get the Redmine base URL. More... | |
| void | setUrl (QString url) |
| Set the Redmine base URL. More... | |
| void | setAuthenticator (QString apiKey) |
| Set the Redmine authentification parameters. More... | |
| void | setAuthenticator (QString login, QString password) |
| Set the Redmine authentification parameters. More... | |
| void | setUserAgent (QByteArray userAgent) |
| Set the user agent for the Redmine connection. More... | |
| void | setCheckSsl (bool checkSsl) |
| Set the SSL check data (e.g. certificate validity) More... | |
| void | sendCustomField (const QJsonDocument &data, JsonCb callback=nullptr, int id=-1, QString parameters="") |
| Create or update custom field in Redmine. More... | |
| void | sendIssue (const QJsonDocument &data, JsonCb callback=nullptr, int id=-1, QString parameters="") |
| Create or update issue in Redmine. More... | |
| void | sendIssueCategory (const QJsonDocument &data, JsonCb callback=nullptr, int id=-1, QString parameters="") |
| Create or update issue category in Redmine. More... | |
| void | sendIssuePriority (const QJsonDocument &data, JsonCb callback=nullptr, int id=-1, QString parameters="") |
| Create or update issue priority in Redmine. More... | |
| void | sendIssueStatus (const QJsonDocument &data, JsonCb callback=nullptr, int id=-1, QString parameters="") |
| Create or update issue status in Redmine. More... | |
| void | sendProject (const QJsonDocument &data, JsonCb callback=nullptr, int id=-1, QString parameters="") |
| Create or update project in Redmine. More... | |
| void | sendTimeEntry (const QJsonDocument &data, JsonCb callback=nullptr, int id=-1, QString parameters="") |
| Create or update time entry in Redmine. More... | |
| void | sendTimeEntryActivity (const QJsonDocument &data, JsonCb callback=nullptr, int id=-1, QString parameters="") |
| Create or update time entry activity in Redmine. More... | |
| void | sendTracker (const QJsonDocument &data, JsonCb callback=nullptr, int id=-1, QString parameters="") |
| Create or update tracker in Redmine. More... | |
| void | sendUser (const QJsonDocument &data, JsonCb callback=nullptr, int id=-1, QString parameters="") |
| Create or update user in Redmine. More... | |
| void | sendVersion (const QJsonDocument &data, JsonCb callback=nullptr, int id=-1, QString parameters="") |
| Create or update version in Redmine. More... | |
| void | retrieveCustomFields (JsonCb callback, QString parameters="") |
| Retrieve custom fields from Redmine. More... | |
| void | retrieveIssue (JsonCb callback, int issueId, QString parameters="") |
| Retrieve an issue from Redmine. More... | |
| void | retrieveIssueCategories (JsonCb callback, QString parameters="") |
| Retrieve issue categories from Redmine. More... | |
| void | retrieveIssuePriorities (JsonCb callback, QString parameters="") |
| Retrieve issue priorities from Redmine. More... | |
| void | retrieveIssues (JsonCb callback, QString parameters="") |
| Retrieve issues from Redmine. More... | |
| void | retrieveIssueStatuses (JsonCb callback, QString parameters="") |
| Retrieve issue statuses from Redmine. More... | |
| void | retrieveProjects (JsonCb callback, QString parameters="") |
| Retrieve projects from Redmine. More... | |
| void | retrieveTimeEntries (JsonCb callback, QString parameters="") |
| Retrieve time entries from Redmine. More... | |
| void | retrieveTimeEntryActivities (JsonCb callback, QString parameters="") |
| Retrieve time entry activities from Redmine. More... | |
| void | retrieveTrackers (JsonCb callback, QString parameters="") |
| Retrieve trackers from Redmine. More... | |
| void | retrieveCurrentUser (JsonCb callback, QString parameters="") |
| Retrieve current user from Redmine. More... | |
| void | retrieveUsers (JsonCb callback, QString parameters="") |
| Retrieve users from Redmine. More... | |
| void | retrieveVersions (JsonCb callback, QString parameters="") |
| Retrieve versions from Redmine. More... | |
Protected Member Functions | |
| void | retrieveEnumerations (QString enumeration, EnumerationsCb callback, QString parameters="") |
| Retrieve enumerations from Redmine. More... | |
Protected Member Functions inherited from qtredmine::RedmineClient | |
| void | retrieveEnumerations (QString enumeration, JsonCb callback, QString parameters="") |
| Retrieve enumerations from Redmine. More... | |
| void | sendEnumeration (QString enumeration, const QJsonDocument &data, JsonCb callback=nullptr, int id=-1, QString parameters="") |
| Create or update enumeration in Redmine. More... | |
| QNetworkReply * | sendRequest (QString resource, JsonCb callback=nullptr, QNetworkAccessManager::Operation mode=QNetworkAccessManager::GetOperation, const QString &queryParams="", const QByteArray &postData="") |
| Send a request to Redmine. More... | |
Additional Inherited Members | |
Public Types inherited from qtredmine::RedmineClient | |
| using | JsonCb = std::function< void(QNetworkReply *, QJsonDocument *)> |
| Typedef for a JSON callback function. | |
Simple Redmine connection class.
This class handles the connections to a Redmine instance and provides access to the Redmine REST API.
It provides a simple API for accessing Redmine.
| qtredmine::SimpleRedmineClient::SimpleRedmineClient | ( | QObject * | parent = nullptr | ) |
Constructor for an unconfigured Redmine connection.
| parent | Parent QObject (default: nullptr) |
| qtredmine::SimpleRedmineClient::SimpleRedmineClient | ( | QString | url, |
| QObject * | parent = nullptr |
||
| ) |
Constructor for an unconfigured Redmine connection.
| url | Redmine base URL |
| parent | Parent QObject (default: nullptr) |
| qtredmine::SimpleRedmineClient::SimpleRedmineClient | ( | QString | url, |
| QString | apiKey, | ||
| bool | checkSsl = true, |
||
| QObject * | parent = nullptr |
||
| ) |
Constructor for a Redmine connection using API key authentication.
| url | Redmine base URL |
| apiKey | Redmine API key |
| checkSsl | Check the SSL certificate (default: true) |
| parent | Parent QObject (default: nullptr) |
| qtredmine::SimpleRedmineClient::SimpleRedmineClient | ( | QString | url, |
| QString | login, | ||
| QString | password, | ||
| bool | checkSsl = true, |
||
| QObject * | parent = nullptr |
||
| ) |
Constructor for a Redmine connection using basic authentication.
| url | Redmine base URL |
| login | Redmine login |
| password | Redmine password |
| checkSsl | Check the SSL certificate (default: true) |
| parent | Parent QObject (default: nullptr) |
|
slot |
Check whether the connection currently works.
If the status has changed from Accessible to NotAccessible or vice versa, the connectionChanged signal is emitted.
| accessible | Specifies whether the network is accessible at all |
|
signal |
Singal that the connection to Redmine has changed.
| connected | true if connection is available, false otherwise |
| void qtredmine::SimpleRedmineClient::retrieveCurrentUser | ( | UserCb | callback | ) |
Retrieve current user from Redmine.
| callback | Callback function with a User vector |
|
protected |
Retrieve enumerations from Redmine.
| enumeration | The enumeration to load |
| callback | Callback function with an Enumeration vector |
| parameters | Additional enumeration parameters |
| void qtredmine::SimpleRedmineClient::retrieveIssue | ( | IssueCb | callback, |
| int | issueId, | ||
| QString | parameters = "" |
||
| ) |
| void qtredmine::SimpleRedmineClient::retrieveIssuePriorities | ( | EnumerationsCb | callback, |
| QString | parameters = "" |
||
| ) |
Retrieve issue priorities from Redmine.
| callback | Callback function with an Enumeration vector |
| parameters | Additional enumeration parameters |
| void qtredmine::SimpleRedmineClient::retrieveIssues | ( | IssuesCb | callback, |
| RedmineOptions | options = RedmineOptions() |
||
| ) |
Retrieve issues from Redmine.
| callback | Callback function with an Issue vector |
| options | Additional options |
| void qtredmine::SimpleRedmineClient::retrieveIssueStatuses | ( | IssueStatusesCb | callback, |
| QString | parameters = "" |
||
| ) |
Retrieve issue statuses from Redmine.
| callback | Callback function with a IssueStatus vector |
| parameters | Additional issue status parameters |
| void qtredmine::SimpleRedmineClient::retrieveProjects | ( | ProjectsCb | callback, |
| QString | parameters = "" |
||
| ) |
Retrieve projects from Redmine.
| callback | Callback function with a Project vector |
| parameters | Additional project parameters |
| void qtredmine::SimpleRedmineClient::retrieveTimeEntries | ( | TimeEntriesCb | callback, |
| QString | parameters = "" |
||
| ) |
Retrieve time entries from Redmine.
| callback | Callback function with a TimeEntries vector |
| parameters | Additional time entry parameters |
| void qtredmine::SimpleRedmineClient::retrieveTimeEntryActivities | ( | EnumerationsCb | callback, |
| QString | parameters = "" |
||
| ) |
Retrieve time entry activities from Redmine.
| callback | Callback function with an Enumeration vector |
| parameters | Additional enumeration parameters |
| void qtredmine::SimpleRedmineClient::retrieveTrackers | ( | TrackersCb | callback, |
| QString | parameters = "" |
||
| ) |
Retrieve trackers from Redmine.
| callback | Callback function with a Tracker vector |
| parameters | Additional tracker parameters |
| void qtredmine::SimpleRedmineClient::retrieveUsers | ( | UsersCb | callback, |
| QString | parameters = "" |
||
| ) |
Retrieve users from Redmine.
| callback | Callback function with a User vector |
| parameters | Additional user parameters |
| void qtredmine::SimpleRedmineClient::sendIssue | ( | Issue | item, |
| SuccessCb | callback = nullptr, |
||
| int | id = -1, |
||
| QString | parameters = "" |
||
| ) |
Create or update issue in Redmine.
| item | Data to be stored in Redmine |
| callback | Success callback function |
| id | Issue ID to update; if set to NULL_ID, create a new issue |
| parameters | Additional issue parameters |
| void qtredmine::SimpleRedmineClient::sendIssuePriority | ( | Enumeration | item, |
| SuccessCb | callback = nullptr, |
||
| int | id = -1, |
||
| QString | parameters = "" |
||
| ) |
Create or update issue priority in Redmine.
| item | Data to be stored in Redmine |
| callback | Success callback function |
| id | Issue priority ID to update; if set to NULL_ID, create a new issue priority |
| parameters | Additional enumeration parameters |
| void qtredmine::SimpleRedmineClient::sendIssueStatus | ( | IssueStatus | item, |
| SuccessCb | callback = nullptr, |
||
| int | id = -1, |
||
| QString | parameters = "" |
||
| ) |
Create or update issue status in Redmine.
| item | Data to be stored in Redmine |
| callback | Success callback function |
| id | Issue status ID to update; if set to NULL_ID, create a new issue status |
| parameters | Additional issue status parameters |
| void qtredmine::SimpleRedmineClient::sendProject | ( | Project | item, |
| SuccessCb | callback = nullptr, |
||
| int | id = -1, |
||
| QString | parameters = "" |
||
| ) |
Create or update project in Redmine.
| item | Data to be stored in Redmine |
| callback | Success callback function |
| id | Project ID to update; if set to NULL_ID, create a new project |
| parameters | Additional project parameters |
| void qtredmine::SimpleRedmineClient::sendTimeEntry | ( | TimeEntry | item, |
| SuccessCb | callback = nullptr, |
||
| int | id = -1, |
||
| QString | parameters = "" |
||
| ) |
Create or update time entry in Redmine.
| item | Data to be stored in Redmine |
| callback | Success callback function |
| id | Time entry ID to update; if set to NULL_ID, create a new time entry |
| parameters | Additional time entry parameters |
| void qtredmine::SimpleRedmineClient::sendTimeEntryActivity | ( | Enumeration | item, |
| SuccessCb | callback = nullptr, |
||
| int | id = -1, |
||
| QString | parameters = "" |
||
| ) |
Create or update time entry activity in Redmine.
| item | Data to be stored in Redmine |
| callback | Success callback function |
| id | Time entry activity ID to update; if set to NULL_ID, create a new time entry activity |
| parameters | Additional enumeration parameters |
| void qtredmine::SimpleRedmineClient::sendTracker | ( | Tracker | item, |
| SuccessCb | callback = nullptr, |
||
| int | id = -1, |
||
| QString | parameters = "" |
||
| ) |
Create or update tracker in Redmine.
| item | Data to be stored in Redmine |
| callback | Success callback function |
| id | Tracker ID to update; if set to NULL_ID, create a new tracker |
| parameters | Additional tracker parameters |
1.8.11