跳到主要内容

Email

Definition

email.json
{
"id": 0,
"userID": 0,
"emailAddress": "",
"emailVerifiedAt": "",
"status": 0,
"createdAt": "",
"updatedAt": "",
}

Get Emails

#!/bin/bash

set -e

if [ -f ./_env.bash ] ; then
source ./_env.bash
fi

_filter=""
_orderBy=""
_page=1
_pageSize=10

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

#!/bin/bash

set -e

if [ -f ./_env.bash ] ; then
source ./_env.bash
fi

_id=0

curl -X GET "${baseUrl}/email/${_id}" \
-H "Authorization: Bearer ${accessToken}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"

Apply Email.ID

#!/bin/bash

set -e

if [ -f ./_env.bash ] ; then
source ./_env.bash
fi

curl -X POST "${baseUrl}/apply/email/id/" \
-H "Authorization: Bearer ${accessToken}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"

Create Email

#!/bin/bash

set -e

if [ -f ./_env.bash ] ; then
source ./_env.bash
fi

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

#!/bin/bash

set -e

if [ -f ./_env.bash ] ; then
source ./_env.bash
fi

_id=0

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

#!/bin/bash

set -e

if [ -f ./_env.bash ] ; then
source ./_env.bash
fi

_id=0

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

#!/bin/bash

set -e

if [ -f ./_env.bash ] ; then
source ./_env.bash
fi

_id=0

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

#!/bin/bash

set -e

if [ -f ./_env.bash ] ; then
source ./_env.bash
fi

_id=0

curl -X DELETE "${baseUrl}/email/${_id}" \
-H "Authorization: Bearer ${accessToken}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"