mirror of
https://github.com/zulip/zulip.git
synced 2025-10-30 03:23:50 +00:00
openapi: Document android_gcm_reg_id endpoints.
This commit adds API documentation for "/users/me/android_gcm_reg_id:post" and "/users/me/android_gcm_reg_id:delete" endpoints. Co-authored-by: Suyash Vardhan Mathur <suyash.mathur@research.iiit.ac.in>
This commit is contained in:
@@ -1391,6 +1391,30 @@ def remove_apns_token(client: Client) -> None:
|
||||
validate_against_openapi_schema(result, "/users/me/apns_device_token", "delete", "200")
|
||||
|
||||
|
||||
@openapi_test_function("/users/me/android_gcm_reg_id:post")
|
||||
def add_fcm_token(client: Client) -> None:
|
||||
# {code_example|start}
|
||||
request = {"token": "android-token"}
|
||||
result = client.call_endpoint(
|
||||
url="/users/me/android_gcm_reg_id", method="POST", request=request
|
||||
)
|
||||
# {code_example|end}
|
||||
validate_against_openapi_schema(result, "/users/me/android_gcm_reg_id", "post", "200")
|
||||
|
||||
|
||||
@openapi_test_function("/users/me/android_gcm_reg_id:delete")
|
||||
def remove_fcm_token(client: Client) -> None:
|
||||
# {code_example|start}
|
||||
request = {
|
||||
"token": "android-token",
|
||||
}
|
||||
result = client.call_endpoint(
|
||||
url="/users/me/android_gcm_reg_id", method="DELETE", request=request
|
||||
)
|
||||
# {code_example|end}
|
||||
validate_against_openapi_schema(result, "/users/me/android_gcm_reg_id", "delete", "200")
|
||||
|
||||
|
||||
@openapi_test_function("/typing:post")
|
||||
def set_typing_status(client: Client) -> None:
|
||||
ensure_users([10, 11], ["hamlet", "iago"])
|
||||
@@ -1682,6 +1706,8 @@ def test_users(client: Client, owner_client: Client) -> None:
|
||||
remove_alert_words(client)
|
||||
add_apns_token(client)
|
||||
remove_apns_token(client)
|
||||
add_fcm_token(client)
|
||||
remove_fcm_token(client)
|
||||
|
||||
|
||||
def test_streams(client: Client, nonadmin_client: Client) -> None:
|
||||
|
||||
Reference in New Issue
Block a user