User
Definition
- JSON
- Typescript
- Kotlin
user.json
{
"id": 0,
"ref": 0,
"outKey": "",
"firstName": "",
"lastName": "",
"emailAddress": "",
"phoneNumber": "",
"avatarUrl": "",
"photoUrl": "",
"password": "",
"rememberToken": "",
"status": 0,
"createdAt": "",
"updatedAt": "",
}
user.ts
export interface IUser {
id: number;
ref: number;
outKey: string | null;
firstName: string;
lastName: string;
emailAddress: string;
phoneNumber: string;
avatarUrl: string | null;
photoUrl: string | null;
password: string;
rememberToken: string | null;
status: number;
createdAt: Date | null;
updatedAt: Date | null;
}
Get Users
- Curl
- Typescript
- Kotlin
curl -X GET "${baseUrl}/user/?filter=${filter}&orderBy=${orderBy}&page=${page}&pageSize=${pageSize}" \
-H "Authorization: Bearer ${accessToken}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
Get User
- Curl
- Typescript
- Kotlin
curl -X GET "${baseUrl}/user/${id}" \
-H "Authorization: Bearer ${accessToken}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
Apply User.ID
- Curl
- Typescript
- Kotlin
curl -X POST "${baseUrl}/apply/user/id/" \
-H "Authorization: Bearer ${accessToken}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
Create User
- Curl
- Typescript
- Kotlin
curl -X POST "${baseUrl}/user/" \
-H "Authorization: Bearer ${accessToken}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d @user.json
信息
user.json
{
"ref": 0,
"outKey": "",
"firstName": "",
"lastName": "",
"emailAddress": "",
"phoneNumber": "",
"avatarUrl": "",
"photoUrl": "",
"status": 0,
}
提示
success status: 201
Update User
- Curl
- Typescript
- Kotlin
#!/bin/bash
curl -X PUT "${baseUrl}/user/${id}" \
-H "Authorization: Bearer ${accessToken}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d @user.json
信息
user.json
{
"ref": 0,
"outKey": "",
"firstName": "",
"lastName": "",
"emailAddress": "",
"phoneNumber": "",
"avatarUrl": "",
"photoUrl": "",
"status": 0,
}
Patch User
- Curl
- Typescript
- Kotlin
curl -X PATCH "${baseUrl}/user/${id}" \
-H "Authorization: Bearer ${accessToken}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Attrs: ref,outKey,firstName,lastName,emailAddress,phoneNumber,avatarUrl,photoUrl,status" \
-d @user.json
信息
user.json
{
"ref": 0,
"outKey": "",
"firstName": "",
"lastName": "",
"emailAddress": "",
"phoneNumber": "",
"avatarUrl": "",
"photoUrl": "",
"status": 0,
}