Definition
- JSON
- Typescript
- Kotlin
email.json
{
"id": 0,
"userID": 0,
"emailAddress": "",
"emailVerifiedAt": "",
"status": 0,
"createdAt": "",
"updatedAt": "",
}
email.ts
export interface IEmail {
id: number;
userID: number;
emailAddress: string;
emailVerifiedAt: Date | null;
status: number;
createdAt: Date | null;
updatedAt: Date | null;
}
Get Emails
- Curl
- Typescript
- Kotlin
curl -X GET "${baseUrl}/email/?filter=${filter}&orderBy=${orderBy}&page=${page}&pageSize=${pageSize}" \
-H "Authorization: Bearer ${accessToken}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
Get Email
- Curl
- Typescript
- Kotlin
curl -X GET "${baseUrl}/email/${id}" \
-H "Authorization: Bearer ${accessToken}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
Apply Email.ID
- Curl
- Typescript
- Kotlin
curl -X POST "${baseUrl}/apply/email/id/" \
-H "Authorization: Bearer ${accessToken}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
Create Email
- Curl
- Typescript
- Kotlin
curl -X POST "${baseUrl}/email/" \
-H "Authorization: Bearer ${accessToken}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d @email.json
信息
email.json
{
"userID": 0,
"emailAddress": "",
"emailVerifiedAt": "",
"status": 0,
}
提示
success status: 201
Update Email
- Curl
- Typescript
- Kotlin
#!/bin/bash
curl -X PUT "${baseUrl}/email/${id}" \
-H "Authorization: Bearer ${accessToken}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d @email.json
信息
email.json
{
"userID": 0,
"emailAddress": "",
"emailVerifiedAt": "",
"status": 0,
}
Patch Email
- Curl
- Typescript
- Kotlin
curl -X PATCH "${baseUrl}/email/${id}" \
-H "Authorization: Bearer ${accessToken}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Attrs: userID,emailAddress,emailVerifiedAt,status" \
-d @email.json
信息
email.json
{
"userID": 0,
"emailAddress": "",
"emailVerifiedAt": "",
"status": 0,
}
Update Email Status
- Curl
- Typescript
- Kotlin
curl -X PATCH "${baseUrl}/email/${id}/status/" \
-H "Authorization: Bearer ${accessToken}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d @email.json
信息
email.json
{
"status": 0
}
Destroy Email
- Curl
- Typescript
- Kotlin
curl -X DELETE "${baseUrl}/email/${id}" \
-H "Authorization: Bearer ${accessToken}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"