in azure-devops/azext_devops/devops_sdk/v5_1/feed/feed_client.py [0:0]
def get_packages(self, feed_id, project=None, protocol_type=None, package_name_query=None, normalized_package_name=None, include_urls=None, include_all_versions=None, is_listed=None, get_top_package_versions=None, is_release=None, include_description=None, top=None, skip=None, include_deleted=None, is_cached=None, direct_upstream_id=None):
"""GetPackages.
[Preview API] Get details about all of the packages in the feed. Use the various filters to include or exclude information from the result set.
:param str feed_id: Name or Id of the feed.
:param str project: Project ID or project name
:param str protocol_type: One of the supported artifact package types.
:param str package_name_query: Filter to packages that contain the provided string. Characters in the string must conform to the package name constraints.
:param str normalized_package_name: [Obsolete] Used for legacy scenarios and may be removed in future versions.
:param bool include_urls: True to return REST Urls with the response. Default is True.
:param bool include_all_versions: True to return all versions of the package in the response. Default is false (latest version only).
:param bool is_listed: Only applicable for NuGet packages, setting it for other package types will result in a 404. If false, delisted package versions will be returned. Use this to filter the response when includeAllVersions is set to true. Default is unset (do not return delisted packages).
:param bool get_top_package_versions: Changes the behavior of $top and $skip to return all versions of each package up to $top. Must be used in conjunction with includeAllVersions=true
:param bool is_release: Only applicable for Nuget packages. Use this to filter the response when includeAllVersions is set to true. Default is True (only return packages without prerelease versioning).
:param bool include_description: Return the description for every version of each package in the response. Default is False.
:param int top: Get the top N packages (or package versions where getTopPackageVersions=true)
:param int skip: Skip the first N packages (or package versions where getTopPackageVersions=true)
:param bool include_deleted: Return deleted or unpublished versions of packages in the response. Default is False.
:param bool is_cached: [Obsolete] Used for legacy scenarios and may be removed in future versions.
:param str direct_upstream_id: Filter results to return packages from a specific upstream.
:rtype: [Package]
"""
route_values = {}
if project is not None:
route_values['project'] = self._serialize.url('project', project, 'str')
if feed_id is not None:
route_values['feedId'] = self._serialize.url('feed_id', feed_id, 'str')
query_parameters = {}
if protocol_type is not None:
query_parameters['protocolType'] = self._serialize.query('protocol_type', protocol_type, 'str')
if package_name_query is not None:
query_parameters['packageNameQuery'] = self._serialize.query('package_name_query', package_name_query, 'str')
if normalized_package_name is not None:
query_parameters['normalizedPackageName'] = self._serialize.query('normalized_package_name', normalized_package_name, 'str')
if include_urls is not None:
query_parameters['includeUrls'] = self._serialize.query('include_urls', include_urls, 'bool')
if include_all_versions is not None:
query_parameters['includeAllVersions'] = self._serialize.query('include_all_versions', include_all_versions, 'bool')
if is_listed is not None:
query_parameters['isListed'] = self._serialize.query('is_listed', is_listed, 'bool')
if get_top_package_versions is not None:
query_parameters['getTopPackageVersions'] = self._serialize.query('get_top_package_versions', get_top_package_versions, 'bool')
if is_release is not None:
query_parameters['isRelease'] = self._serialize.query('is_release', is_release, 'bool')
if include_description is not None:
query_parameters['includeDescription'] = self._serialize.query('include_description', include_description, 'bool')
if top is not None:
query_parameters['$top'] = self._serialize.query('top', top, 'int')
if skip is not None:
query_parameters['$skip'] = self._serialize.query('skip', skip, 'int')
if include_deleted is not None:
query_parameters['includeDeleted'] = self._serialize.query('include_deleted', include_deleted, 'bool')
if is_cached is not None:
query_parameters['isCached'] = self._serialize.query('is_cached', is_cached, 'bool')
if direct_upstream_id is not None:
query_parameters['directUpstreamId'] = self._serialize.query('direct_upstream_id', direct_upstream_id, 'str')
response = self._send(http_method='GET',
location_id='7a20d846-c929-4acc-9ea2-0d5a7df1b197',
version='5.1-preview.1',
route_values=route_values,
query_parameters=query_parameters)
return self._deserialize('[Package]', self._unwrap_collection(response))