Skip to content

Commit

Permalink
updates
Browse files Browse the repository at this point in the history
  • Loading branch information
xiangyan99 committed Jun 1, 2020
1 parent 69fe384 commit cefb0c2
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
from azure.core.credentials import AzureKeyCredential


class SearchIndexerClient(HeadersMixin):
class SearchIndexerClient(HeadersMixin): # pylint: disable=R0904
"""A client to interact with Azure search service Indexers.
"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
from azure.core.credentials import AzureKeyCredential


class SearchIndexerClient(HeadersMixin):
class SearchIndexerClient(HeadersMixin): # pylint: disable=R0904
"""A client to interact with Azure search service Indexers.
"""
Expand Down Expand Up @@ -145,6 +145,19 @@ async def get_indexers(self, **kwargs):
:language: python
:dedent: 4
:caption: List all the SearchIndexers
"""
kwargs["headers"] = self._merge_client_headers(kwargs.get("headers"))
result = await self._client.indexers.list(**kwargs)
return result.indexers

@distributed_trace_async
async def get_indexer_names(self, **kwargs):
# type: (**Any) -> Sequence[str]
"""Lists all indexer names available for a search service.
:return: List of all the SearchIndexer names.
:rtype: `list[str]`
"""
kwargs["headers"] = self._merge_client_headers(kwargs.get("headers"))
result = await self._client.indexers.list(**kwargs)
Expand Down

0 comments on commit cefb0c2

Please sign in to comment.