x-helper
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseX-Helper Skill
X-Helper Skill
Functions
函数
x_helper.py
x_helper.py
-
->
lookup(username){"username", "followers", "following", "tweets", "likes", "description"}- : Twitter username (without @)
username
-
->
get_tweet(tweet_id, username="i"){"tweet_id", "username", "text", "likes", "retweets", "replies", "quote": {...} | None}- : tweet ID
tweet_id - : nested object
quoteif this tweet quotes another, else None{"tweet_id", "username", "text"}
-
->
has_quoted(username, target_tweet_id, quote_tweet_id){"username", "target_tweet_id", "quoted": bool, "quote_tweet_id": str | None}- : expected quote author (without @)
username - : the tweet that should be quoted
target_tweet_id - : the tweet claimed to be the quote
quote_tweet_id
-
->
lookup(username){"username", "followers", "following", "tweets", "likes", "description"}- :Twitter用户名(不含@)
username
-
->
get_tweet(tweet_id, username="i"){"tweet_id", "username", "text", "likes", "retweets", "replies", "quote": {...} | None}- :推文ID
tweet_id - :如果该推文引用了其他推文,则为嵌套对象
quote,否则为None{"tweet_id", "username", "text"}
-
->
has_quoted(username, target_tweet_id, quote_tweet_id){"username", "target_tweet_id", "quoted": bool, "quote_tweet_id": str | None}- :预期的引用者用户名(不含@)
username - :被引用的目标推文ID
target_tweet_id - :声称是引用内容的推文ID
quote_tweet_id
Limitations
局限性
- No timeline endpoint available — cannot list a user's recent tweets
- calculation not supported (requires recent tweet list)
engagement_rate - requires the caller to supply the
has_quoted(cannot scan timeline)quote_tweet_id
- 无时间线端点——无法列出用户的近期推文
- 不支持计算(需要近期推文列表)
engagement_rate - 要求调用者提供
has_quoted(无法扫描时间线)quote_tweet_id
Examples
示例
bash
cd <path-to-this-skill>/scripts && python3 -c "
from x_helper import lookup
print(lookup('elonmusk'))
"bash
cd <path-to-this-skill>/scripts && python3 -c "
from x_helper import get_tweet
print(get_tweet('20'))
"bash
cd <path-to-this-skill>/scripts && python3 -c "
from x_helper import has_quoted
print(has_quoted('somequoter', '1234567890', '9876543210'))
"bash
cd <path-to-this-skill>/scripts && python3 -c "
from x_helper import lookup
print(lookup('elonmusk'))
"bash
cd <path-to-this-skill>/scripts && python3 -c "
from x_helper import get_tweet
print(get_tweet('20'))
"bash
cd <path-to-this-skill>/scripts && python3 -c "
from x_helper import has_quoted
print(has_quoted('somequoter', '1234567890', '9876543210'))
"Rules
规则
- Parse and call
$ARGUMENTS.lookup(username) - Respond in the user's language.
- Usernames must be real values — never fabricate or use mock data.
- 解析并调用
$ARGUMENTS。lookup(username) - 以用户的语言回复。
- 用户名必须为真实值——切勿编造或使用模拟数据。