auth0-python
Advanced tools
| # This value is updated by `poetry_dynamic_versioning` during build time from the latest git tag | ||
| __version__ = "4.4.2" | ||
| __version__ = "4.5.0" | ||
@@ -4,0 +4,0 @@ from auth0.exceptions import Auth0Error, RateLimitError, TokenValidationError |
@@ -249,5 +249,10 @@ from __future__ import annotations | ||
| take: int | None = None, | ||
| fields: list[str] | None = None, | ||
| include_fields: bool = True, | ||
| ): | ||
| """Retrieves a list of all the organization members. | ||
| Member roles are not sent by default. Use `fields=roles` to retrieve the roles assigned to each listed member. | ||
| To use this parameter, you must include the `read:organization_member_roles scope` in the token. | ||
| Args: | ||
@@ -271,3 +276,10 @@ id (str): the ID of the organization. | ||
| See: https://auth0.com/docs/api/management/v2#!/Organizations/get_members | ||
| fields (list of str, optional): A list of fields to include or | ||
| exclude from the result (depending on include_fields). If fields is left blank, | ||
| all fields (except roles) are returned. | ||
| include_fields (bool, optional): True if the fields specified are | ||
| to be included in the result, False otherwise. Defaults to True. | ||
| See: https://auth0.com/docs/api/management/v2/organizations/get-members | ||
| """ | ||
@@ -281,2 +293,4 @@ | ||
| "take": take, | ||
| "fields": fields and ",".join(fields) or None, | ||
| "include_fields": str(include_fields).lower(), | ||
| } | ||
@@ -283,0 +297,0 @@ |
@@ -235,2 +235,4 @@ import unittest | ||
| "take": None, | ||
| "fields": None, | ||
| "include_fields": "true", | ||
| }, | ||
@@ -257,2 +259,4 @@ ) | ||
| "take": None, | ||
| "fields": None, | ||
| "include_fields": "true", | ||
| }, | ||
@@ -277,5 +281,28 @@ ) | ||
| "include_totals": "true", | ||
| "fields": None, | ||
| "include_fields": "true", | ||
| }, | ||
| ) | ||
| # With fields | ||
| c.all_organization_members("test-org", fields=["a,b"], include_fields=False) | ||
| args, kwargs = mock_instance.get.call_args | ||
| self.assertEqual( | ||
| "https://domain/api/v2/organizations/test-org/members", args[0] | ||
| ) | ||
| self.assertEqual( | ||
| kwargs["params"], | ||
| { | ||
| "page": None, | ||
| "per_page": None, | ||
| "include_totals": "true", | ||
| "from": None, | ||
| "take": None, | ||
| "fields": "a,b", | ||
| "include_fields": "false", | ||
| }, | ||
| ) | ||
| @mock.patch("auth0.management.organizations.RestClient") | ||
@@ -282,0 +309,0 @@ def test_create_organization_members(self, mock_rc): |
+1
-1
| Metadata-Version: 2.1 | ||
| Name: auth0-python | ||
| Version: 4.4.2 | ||
| Version: 4.5.0 | ||
| Summary: | ||
@@ -5,0 +5,0 @@ Home-page: https://auth0.com |
+1
-1
@@ -7,3 +7,3 @@ [build-system] | ||
| name = "auth0-python" | ||
| version = "4.4.2" # This is replaced by dynamic versioning | ||
| version = "4.5.0" # This is replaced by dynamic versioning | ||
| description = "" | ||
@@ -10,0 +10,0 @@ authors = ["Auth0 <support@auth0.com>"] |
Alert delta unavailable
Currently unable to show alert delta for PyPI packages.
497402
0.33%10505
0.33%