Skip to content

Commit bdbc031

Browse files
committed
Feat: Add a new get_metadata_by_email method to the User
1 parent 856347f commit bdbc031

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ repos:
1818
- id: codespell
1919
exclude: ^locale/
2020
- repo: https://github.com/astral-sh/ruff-pre-commit
21-
rev: v0.14.8
21+
rev: v0.15.0
2222
hooks:
2323
- id: ruff-check
2424
args: [--fix]

magic_admin/resources/user.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,14 @@
66
class User(ResourceComponent):
77
v1_user_info = "/v1/admin/user"
88
v1_user_logout = "/v1/admin/user/logout"
9+
v2_user_info = "/v2/admin/user"
10+
11+
def get_metadata_by_email(self, email):
12+
return self.request(
13+
"get",
14+
self.v2_user_info,
15+
params={"type": "email", "value": email},
16+
)
917

1018
def get_metadata_by_issuer_and_wallet(self, issuer, wallet_type):
1119
return self.request(

0 commit comments

Comments
 (0)