update yaml file

This commit is contained in:
Jannik 2020-12-24 12:55:05 +01:00 committed by GitHub
parent a62cf28a04
commit c9fe6dcfa0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -57,7 +57,7 @@ paths:
Note: You don't have your token yet, so the domain is just {base_url}/userlogin Note: You don't have your token yet, so the domain is just {base_url}/userlogin
Returns the user_token on success. Returns an `AuthorizationState` with the user token on success.
requestBody: requestBody:
content: content:
application/x-www-form-urlencoded: application/x-www-form-urlencoded:
@ -100,8 +100,7 @@ paths:
default: true default: true
type: boolean type: boolean
result: result:
default: true $ref: '#/components/schemas/AuthorizationState'
type: boolean
required: required:
- ok - ok
- result - result
@ -126,7 +125,7 @@ paths:
description: |- description: |-
*ONLY FOR USERS* *ONLY FOR USERS*
Use this method in the authorization process to check your authentication code. Returns *True* on success. Use this method in the authorization process to check your authentication code. Returns an `AuthorizationState` on success.
requestBody: requestBody:
content: content:
application/x-www-form-urlencoded: application/x-www-form-urlencoded:
@ -169,8 +168,7 @@ paths:
default: true default: true
type: boolean type: boolean
result: result:
default: true $ref: '#/components/schemas/AuthorizationState'
type: boolean
required: required:
- ok - ok
- result - result
@ -188,7 +186,7 @@ paths:
description: |- description: |-
*ONLY FOR USERS* *ONLY FOR USERS*
Use this method in the authorization process to check your 2-factor-authorization password for correctness. Returns *True* on success. Use this method in the authorization process to check your 2-factor-authorization password for correctness. Returns an `AuthorizationState` on success.
*Never* send your password over a plain http connection. Make sure https is enabled or use this API locally. *Never* send your password over a plain http connection. Make sure https is enabled or use this API locally.
requestBody: requestBody:
@ -233,8 +231,7 @@ paths:
default: true default: true
type: boolean type: boolean
result: result:
default: true $ref: '#/components/schemas/AuthorizationState'
type: boolean
required: required:
- ok - ok
- result - result
@ -252,7 +249,7 @@ paths:
description: |- description: |-
*ONLY FOR USERS* *ONLY FOR USERS*
Use this method to register a new user account. Only works after sending the authcode if the user is not yet registered. Returns *True* on success. Use this method to register a new user account. Only works after sending the authcode if the user is not yet registered. Returns an `AuthorizationState` on success.
User registration is disabled by default. You can enable it with the `--allow-users-registration` command line option or the env variable `TELEGRAM_ALLOW_USERS_REGISTRATION` set to `1` when using docker.s User registration is disabled by default. You can enable it with the `--allow-users-registration` command line option or the env variable `TELEGRAM_ALLOW_USERS_REGISTRATION` set to `1` when using docker.s
requestBody: requestBody:
@ -306,8 +303,7 @@ paths:
default: true default: true
type: boolean type: boolean
result: result:
default: true $ref: '#/components/schemas/AuthorizationState'
type: boolean
required: required:
- ok - ok
- result - result
@ -648,7 +644,7 @@ paths:
post: post:
tags: tags:
- added - added
description: Send an MTProto ping message to the telegram servers. Useful to detect the delay of the bot api server. Returns the time in seconds as `string` description: Send an MTProto ping message to the telegram servers. Useful to detect the delay of the bot api server. Returns the time in seconds as double-precision floating-point number.
responses: responses:
'200': '200':
description: '' description: ''
@ -661,7 +657,7 @@ paths:
default: true default: true
type: boolean type: boolean
result: result:
type: string type: number
required: required:
- ok - ok
- result - result
@ -12035,6 +12031,33 @@ components:
- user - user
- score - score
AuthorizationState:
description: Used in the User Authorization process, used to return the current state of the authorization and the token.
type: object
properties:
authorization_state:
description: 'Returns the current state of the authorization process. Is one of `wait_code`, `wait_password`, `wait_registration`, `ready` or `unknown`'
type: string
enum:
- wait_code
- wait_password
- wait_registration
- ready
- unknown
token:
description: 'Optional. Token to be used for calling methods at the bot api. Only returned once after the `userlogin` method.'
type: string
timeout:
description: 'Optional. Timeout for entering the authorization code.'
type: integer
password_hint:
description: 'Optional. The password hint for your 2fa password. May be empty even if you set a hint.'
type: string
has_recovery_email_address:
description: 'Optional. True, if a recovery email address has been set up.'
type: boolean
required:
- authorization_state
CallbackQueryAnswer: CallbackQueryAnswer:
description: Contains a bot's answer to a callback query. description: Contains a bot's answer to a callback query.
type: object type: object