get_user
Retrieve user details and optional posts by ID or username. Specify post type (MADE or VOTED), count, and pagination cursor for tailored results. Ensures accurate user data retrieval with error handling.
Instructions
Retrieve user information by ID or username, with optional retrieval of their posts.
Parameters:
- id (str, optional): The user's unique ID.
- username (str, optional): The user's username.
- posts_type (str, optional): Type of posts to retrieve. Valid values: MADE (default), VOTED.
- posts_count (int, optional): Number of posts to return (default: 10, max: 20).
- posts_after (str, optional): Pagination cursor for next page of posts.
At least one of `id` or `username` must be provided.
Returns:
- success (bool)
- data (dict): If successful, contains user details and optionally their posts.
- error (dict, optional)
- rate_limits (dict)
Notes:
- Returns an error if neither `id` nor `username` is provided, or if the user is not found.
Input Schema
Name | Required | Description | Default |
---|---|---|---|
id | No | ||
posts_after | No | ||
posts_count | No | ||
posts_type | No | ||
username | No |
Input Schema (JSON Schema)
{
"properties": {
"id": {
"default": null,
"title": "Id",
"type": "string"
},
"posts_after": {
"default": null,
"title": "Posts After",
"type": "string"
},
"posts_count": {
"default": null,
"title": "Posts Count",
"type": "integer"
},
"posts_type": {
"default": null,
"title": "Posts Type",
"type": "string"
},
"username": {
"default": null,
"title": "Username",
"type": "string"
}
},
"title": "get_userArguments",
"type": "object"
}