Args Parser
The Args Parser endpoint lets you send a text string and get back arguments and extra details based on the query parameters. It's handy for tasks like text manipulation, extracting user IDs, and checking for specific text in commands.
Endpoint
URL:
https://api.erensko.xyz/v1/parse-args
Method:
POST
Description: Splits the provided text into arguments and returns additional info like whether it contains time or reason details.
Request Body
text (required):
Type: String
Description: The text string to be processed.
Query Parameters
pingtoid (optional)
If set to true
, user mentions in the form <@ID>
are converted to just the numerical ID
.
textstatus (optional)
If set to true
, checks the text arguments for time (like "7d", "3w", etc.) and reasons, and provides the structure.
Headers
Authorization
Request Example
Response Example
This is a response with the ?pingtoid=true
parameter.
Text Status
hasTime: A boolean indicating if a time pattern (e.g., "7d", "3w") is present in the arguments.
hasReason: A boolean indicating if any reason is provided after the time argument.
structure: Describes the overall structure of the text. Possible values:
"All Exist"
: Both time and reason exist."No Reason"
: Only time is present, with no reason."No Time"
: A reason is present, but no time is detected."No Time No Reason"
: Neither time nor reason is present.
Last updated