Skip to content

Commit

Permalink
Deprecate older methods
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Dec 2, 2021
1 parent 33a7bc7 commit cddc522
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 10 deletions.
Expand Up @@ -47,9 +47,11 @@ If ``user`` is blank then the user associated with the current logon details wil
:return: - JSON user info
- errorTitle: title summary of any encountered errors
- errorText: error text of any encountered errors

.. versionadded:: 3.24
%End

static QVariantMap retrieveUserInfo( const QString &communityUrl, const QString &user, const QString &authcfg, QString &errorTitle /Out/, QString &errorText /Out/, const QMap< QString, QVariant > &requestHeaders, QgsFeedback *feedback = 0 );
static QVariantMap retrieveUserInfo( const QString &communityUrl, const QString &user, const QString &authcfg, QString &errorTitle /Out/, QString &errorText /Out/, const QMap< QString, QVariant > &requestHeaders, QgsFeedback *feedback = 0 ) /Deprecated/;
%Docstring
Retrieves JSON user info for the specified user name. Only to avoid API break.

Expand All @@ -64,6 +66,9 @@ If ``user`` is blank then the user associated with the current logon details wil
:return: - JSON user info
- errorTitle: title summary of any encountered errors
- errorText: error text of any encountered errors

.. deprecated:: QGIS 3.24
use the version with :py:class:`QgsHttpHeaders` instead
%End

static QVariantList retrieveUserGroups( const QString &communityUrl, const QString &user, const QString &authcfg, QString &errorTitle /Out/, QString &errorText /Out/, const QgsHttpHeaders &requestHeaders = QgsHttpHeaders(), QgsFeedback *feedback = 0 );
Expand All @@ -81,9 +86,11 @@ If ``user`` is blank then the user associated with the current logon details wil
:return: - a list of JSON group info
- errorTitle: title summary of any encountered errors
- errorText: error text of any encountered errors

.. versionadded:: 3.24
%End

static QVariantList retrieveUserGroups( const QString &communityUrl, const QString &user, const QString &authcfg, QString &errorTitle /Out/, QString &errorText /Out/, const QMap< QString, QVariant > &requestHeaders, QgsFeedback *feedback = 0 );
static QVariantList retrieveUserGroups( const QString &communityUrl, const QString &user, const QString &authcfg, QString &errorTitle /Out/, QString &errorText /Out/, const QMap< QString, QVariant > &requestHeaders, QgsFeedback *feedback = 0 ) /Deprecated/;
%Docstring
Retrieves JSON definitions for all groups which the specified user name is a member of. Only to avoid API break.

Expand All @@ -98,6 +105,9 @@ If ``user`` is blank then the user associated with the current logon details wil
:return: - a list of JSON group info
- errorTitle: title summary of any encountered errors
- errorText: error text of any encountered errors

.. deprecated:: QGIS 3.24
use the version with :py:class:`QgsHttpHeaders` instead
%End

static QVariantList retrieveGroupContent( const QString &contentUrl, const QString &groupId, const QString &authcfg, QString &errorTitle /Out/, QString &errorText /Out/, const QgsHttpHeaders &requestHeaders = QgsHttpHeaders(), QgsFeedback *feedback = 0, int pageSize = 100 );
Expand All @@ -114,9 +124,11 @@ Retrieves JSON definitions for all items which belong the the specified ``groupI
:return: - a list of JSON item info for all items within the group
- errorTitle: title summary of any encountered errors
- errorText: error text of any encountered errors

.. versionadded:: 3.24
%End

static QVariantList retrieveGroupContent( const QString &contentUrl, const QString &groupId, const QString &authcfg, QString &errorTitle /Out/, QString &errorText /Out/, const QMap< QString, QVariant > &requestHeaders, QgsFeedback *feedback = 0, int pageSize = 100 );
static QVariantList retrieveGroupContent( const QString &contentUrl, const QString &groupId, const QString &authcfg, QString &errorTitle /Out/, QString &errorText /Out/, const QMap< QString, QVariant > &requestHeaders, QgsFeedback *feedback = 0, int pageSize = 100 ) /Deprecated/;
%Docstring
Retrieves JSON definitions for all items which belong the the specified ``groupId``. Only to avoid API break.

Expand All @@ -130,6 +142,9 @@ Retrieves JSON definitions for all items which belong the the specified ``groupI
:return: - a list of JSON item info for all items within the group
- errorTitle: title summary of any encountered errors
- errorText: error text of any encountered errors

.. deprecated:: QGIS 3.24
use the version with :py:class:`QgsHttpHeaders` instead
%End

static QVariantList retrieveGroupItemsOfType( const QString &contentUrl, const QString &groupId, const QString &authcfg,
Expand All @@ -149,11 +164,13 @@ Retrieves JSON definitions for all items which belong the the specified ``groupI
:return: - a list of JSON item info for all items within the group
- errorTitle: title summary of any encountered errors
- errorText: error text of any encountered errors

.. versionadded:: 3.24
%End

static QVariantList retrieveGroupItemsOfType( const QString &contentUrl, const QString &groupId, const QString &authcfg,
static QVariantList retrieveGroupItemsOfType( const QString &contentUrl, const QString &groupId, const QString &authcfg,
const QList< int > &itemTypes,
QString &errorTitle /Out/, QString &errorText /Out/, const QMap< QString, QVariant > &requestHeaders, QgsFeedback *feedback = 0, int pageSize = 100 );
QString &errorTitle /Out/, QString &errorText /Out/, const QMap< QString, QVariant > &requestHeaders, QgsFeedback *feedback = 0, int pageSize = 100 ) /Deprecated/;
%Docstring
Retrieves JSON definitions for all items which belong the the specified ``groupId``. Only to avoid API break.

Expand All @@ -168,6 +185,9 @@ Retrieves JSON definitions for all items which belong the the specified ``groupI
:return: - a list of JSON item info for all items within the group
- errorTitle: title summary of any encountered errors
- errorText: error text of any encountered errors

.. deprecated:: QGIS 3.24
use the version with :py:class:`QgsHttpHeaders` instead
%End

};
Expand Down
18 changes: 13 additions & 5 deletions src/core/providers/arcgis/qgsarcgisportalutils.h
Expand Up @@ -61,6 +61,7 @@ class CORE_EXPORT QgsArcGisPortalUtils
* \param feedback optional feedback argument for cancellation support
*
* \returns JSON user info
* \since QGIS 3.24
*/
static QVariantMap retrieveUserInfo( const QString &communityUrl, const QString &user, const QString &authcfg, QString &errorTitle SIP_OUT, QString &errorText SIP_OUT, const QgsHttpHeaders &requestHeaders = QgsHttpHeaders(), QgsFeedback *feedback = nullptr );

Expand All @@ -78,8 +79,9 @@ class CORE_EXPORT QgsArcGisPortalUtils
* \param feedback optional feedback argument for cancellation support
*
* \returns JSON user info
* \deprecated since QGIS 3.24, use the version with QgsHttpHeaders instead
*/
static QVariantMap retrieveUserInfo( const QString &communityUrl, const QString &user, const QString &authcfg, QString &errorTitle SIP_OUT, QString &errorText SIP_OUT, const QMap< QString, QVariant > &requestHeaders, QgsFeedback *feedback = nullptr );
Q_DECL_DEPRECATED static QVariantMap retrieveUserInfo( const QString &communityUrl, const QString &user, const QString &authcfg, QString &errorTitle SIP_OUT, QString &errorText SIP_OUT, const QMap< QString, QVariant > &requestHeaders, QgsFeedback *feedback = nullptr ) SIP_DEPRECATED;

/**
* Retrieves JSON definitions for all groups which the specified user name is a member of.
Expand All @@ -95,6 +97,7 @@ class CORE_EXPORT QgsArcGisPortalUtils
* \param feedback optional feedback argument for cancellation support
*
* \returns a list of JSON group info
* \since QGIS 3.24
*/
static QVariantList retrieveUserGroups( const QString &communityUrl, const QString &user, const QString &authcfg, QString &errorTitle SIP_OUT, QString &errorText SIP_OUT, const QgsHttpHeaders &requestHeaders = QgsHttpHeaders(), QgsFeedback *feedback = nullptr );

Expand All @@ -112,8 +115,9 @@ class CORE_EXPORT QgsArcGisPortalUtils
* \param feedback optional feedback argument for cancellation support
*
* \returns a list of JSON group info
* \deprecated since QGIS 3.24, use the version with QgsHttpHeaders instead
*/
static QVariantList retrieveUserGroups( const QString &communityUrl, const QString &user, const QString &authcfg, QString &errorTitle SIP_OUT, QString &errorText SIP_OUT, const QMap< QString, QVariant > &requestHeaders, QgsFeedback *feedback = nullptr );
Q_DECL_DEPRECATED static QVariantList retrieveUserGroups( const QString &communityUrl, const QString &user, const QString &authcfg, QString &errorTitle SIP_OUT, QString &errorText SIP_OUT, const QMap< QString, QVariant > &requestHeaders, QgsFeedback *feedback = nullptr ) SIP_DEPRECATED;

/**
* Retrieves JSON definitions for all items which belong the the specified \a groupId.
Expand All @@ -128,6 +132,7 @@ class CORE_EXPORT QgsArcGisPortalUtils
* \param pageSize number of results to retrieve for each request. Maximum value is 100.
*
* \returns a list of JSON item info for all items within the group
* \since QGIS 3.24
*/
static QVariantList retrieveGroupContent( const QString &contentUrl, const QString &groupId, const QString &authcfg, QString &errorTitle SIP_OUT, QString &errorText SIP_OUT, const QgsHttpHeaders &requestHeaders = QgsHttpHeaders(), QgsFeedback *feedback = nullptr, int pageSize = 100 );

Expand All @@ -144,8 +149,9 @@ class CORE_EXPORT QgsArcGisPortalUtils
* \param pageSize number of results to retrieve for each request. Maximum value is 100.
*
* \returns a list of JSON item info for all items within the group
* \deprecated since QGIS 3.24, use the version with QgsHttpHeaders instead
*/
static QVariantList retrieveGroupContent( const QString &contentUrl, const QString &groupId, const QString &authcfg, QString &errorTitle SIP_OUT, QString &errorText SIP_OUT, const QMap< QString, QVariant > &requestHeaders, QgsFeedback *feedback = nullptr, int pageSize = 100 );
Q_DECL_DEPRECATED static QVariantList retrieveGroupContent( const QString &contentUrl, const QString &groupId, const QString &authcfg, QString &errorTitle SIP_OUT, QString &errorText SIP_OUT, const QMap< QString, QVariant > &requestHeaders, QgsFeedback *feedback = nullptr, int pageSize = 100 ) SIP_DEPRECATED;

/**
* Retrieves JSON definitions for all items which belong the the specified \a groupId.
Expand All @@ -161,6 +167,7 @@ class CORE_EXPORT QgsArcGisPortalUtils
* \param pageSize number of results to retrieve for each request. Maximum value is 100.
*
* \returns a list of JSON item info for all items within the group
* \since QGIS 3.24
*/
static QVariantList retrieveGroupItemsOfType( const QString &contentUrl, const QString &groupId, const QString &authcfg,
const QList< int > &itemTypes,
Expand All @@ -180,10 +187,11 @@ class CORE_EXPORT QgsArcGisPortalUtils
* \param pageSize number of results to retrieve for each request. Maximum value is 100.
*
* \returns a list of JSON item info for all items within the group
* \deprecated since QGIS 3.24, use the version with QgsHttpHeaders instead
*/
static QVariantList retrieveGroupItemsOfType( const QString &contentUrl, const QString &groupId, const QString &authcfg,
Q_DECL_DEPRECATED static QVariantList retrieveGroupItemsOfType( const QString &contentUrl, const QString &groupId, const QString &authcfg,
const QList< int > &itemTypes,
QString &errorTitle SIP_OUT, QString &errorText SIP_OUT, const QMap< QString, QVariant > &requestHeaders, QgsFeedback *feedback = nullptr, int pageSize = 100 );
QString &errorTitle SIP_OUT, QString &errorText SIP_OUT, const QMap< QString, QVariant > &requestHeaders, QgsFeedback *feedback = nullptr, int pageSize = 100 ) SIP_DEPRECATED;

private:

Expand Down

0 comments on commit cddc522

Please sign in to comment.