mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-05-05 16:38:59 -04:00
Add user via api
Leave original user object in for this slice. Remove on next
This commit is contained in:
committed by
Rebecca Law
parent
762ab8e394
commit
c86b53f7f1
18
app/notify_client/user_api_client.py
Normal file
18
app/notify_client/user_api_client.py
Normal file
@@ -0,0 +1,18 @@
|
||||
from client.notifications import BaseAPIClient
|
||||
|
||||
|
||||
class UserApiClient(BaseAPIClient):
|
||||
|
||||
def __init__(self, base_url, client_id, secret):
|
||||
super(self.__class__, self).__init__(base_url=base_url,
|
||||
client_id=client_id,
|
||||
secret=secret)
|
||||
|
||||
def register_user(self, name, email_address, mobile_number, password):
|
||||
data = {
|
||||
"name": name,
|
||||
"email_address": email_address,
|
||||
"mobile_number": mobile_number,
|
||||
"password": password}
|
||||
|
||||
return self.post("/user", data)
|
||||
Reference in New Issue
Block a user