-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Users API #234
feat: Users API #234
Conversation
beb910c
to
896e2ac
Compare
user/client.go
Outdated
|
||
type CreateParams struct { | ||
clerk.APIParams | ||
EmailAddresses []string `json:"email_address,omitempty"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❓ Would you mind reminding me why we don't need to use pointer to slices? Is it because here we don't need to differentiate between existing parameter and empty?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We do have to use pointer for slices as well! It's my mistake. Updated.
user/client.go
Outdated
PrivateMetadata *json.RawMessage `json:"private_metadata,omitempty"` | ||
UnsafeMetadata *json.RawMessage `json:"unsafe_metadata,omitempty"` | ||
TOTPSecret *string `json:"totp_secret,omitempty"` | ||
BackupCodes []string `json:"backup_codes,omitempty"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❓ Same question as above with regard to pointer to slice.
user/client.go
Outdated
q.Add("user_id", v) | ||
} | ||
if params.LastActiveAtSince != nil { | ||
q.Add("limit", strconv.FormatInt(*params.LastActiveAtSince, 10)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔧 Not sure if I'm missing something:
q.Add("limit", strconv.FormatInt(*params.LastActiveAtSince, 10)) | |
q.Add("last_active_at_since", strconv.FormatInt(*params.LastActiveAtSince, 10)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great catch, thanks! Updated.
896e2ac
to
f1e8ef8
Compare
Added support for the Users API. Available operations are Create, Get, List, Count, Update, UpdateMetadata, Delete, DeleteMFA, Ban, Unban, Lock, Unlock and ListOrganizationMemberships.
f1e8ef8
to
0c79528
Compare
Added support for the Users API. Available operations are Create, Get, List, Count, Update, UpdateMetadata, Delete, DeleteMFA, Ban, Unban, Lock, Unlock and ListOrganizationMemberships.