مستندات کامل متدهای کلاس Rubino — مدیریت پیجها، پستها، استوریها، کامنتها و...
| پارامتر | نوع | توضیحات |
|---|---|---|
| auth | str | کلید احراز هویت حساب کاربری |
| platform | str | پلتفرم (پیشفرض "m.rubika.ir") |
| lang_code | str | کد زبان (پیشفرض "fa") |
| None | شیء Rubino ساخته میشود |
from rubino import Bot
bot = Bot("YOUR_AUTH_TOKEN")
# یا با پلتفرم اندروید
bot = Bot("YOUR_AUTH_TOKEN", platform="android")| پارامتر | نوع | توضیحات |
|---|---|---|
| username | str | نام کاربری پیج (یکتا) |
| name | str | نام نمایشی پیج (پیشفرض "codern") |
| bio | str | None | بیوگرافی پیج |
| phone | str | None | شماره تماس |
| str | None | ایمیل | |
| website | str | None | وبسایت |
| dict | اطلاعات پیج ایجاد شده |
result = await bot.create_page(
username="my_page",
name="صفحه من",
bio="سلام به صفحه من خوش آمدید"
)| پارامتر | نوع | توضیحات |
|---|---|---|
| username_me | str | نام کاربری پیج مورد نظر |
| name | str | نام جدید |
| bio | str | None | بیوگرافی جدید |
| phone | str | None | شماره تماس جدید |
| str | None | ایمیل جدید | |
| website | str | None | وبسایت جدید |
| dict | نتیجه ویرایش |
await bot.edit_info_page("my_page", name="اسم جدید", bio="بیو جدید")| profile_id | str | شناسه پیج |
| dict | اطلاعات کامل پیج |
info = await bot.get_me_info("profile_id_here")| — | ندارد |
| dict | لیست پیجها |
profiles = await bot.get_all_profile()
| target_profile_id | str | شناسه پیج مقصد |
| track_id | str | track id (پیشفرض "Explore:two_tower") |
| dict | اطلاعات پیج |
info = await bot.get_profile_info("target_profile_id")| پارامتر | نوع | توضیحات |
|---|---|---|
| post_file | str | مسیر فایل یا لینک مستقیم |
| caption | str | None | متن پست |
| time | int | مدت زمان ویدیو (ثانیه) |
| size | list | ابعاد [width, height] |
| thumbnail_file | str | None | مسیر تصویر بندانگشتی |
| profile_id | str | None | شناسه پیج |
| dict | اطلاعات پست ارسال شده |
await bot.add_Post("photo.jpg", caption="عکس جدید", profile_id="profile_id")| پارامتر | نوع | توضیحات |
|---|---|---|
| post_file | str | مسیر فایل یا لینک |
| duration | int | مدت زمان (ثانیه، پیشفرض 27) |
| size | list | ابعاد [width, height] |
| thumbnail_file | str | None | تصویر بندانگشتی |
| profile_id | str | None | شناسه پیج |
| dict | اطلاعات استوری |
await bot.add_Story("story.mp4", duration=15, profile_id="profile_id")| post_id | str | شناسه پست |
| profile_id | str | None | شناسه پیج |
| dict | نتیجه حذف |
await bot.delete_Post("post_id_here")| story_id | list | لیست شناسههای استوری |
| profile_id | str | None | شناسه پیج |
| dict | نتیجه حذف |
await bot.delete_Story(["story_id_1", "story_id_2"])
| target_profile_id | str | شناسه پیج مقصد |
| max_id | str | شناسه آخرین پست برای صفحهبندی |
| sort | str | نوع مرتبسازی (FromMax/FromMin) |
| limit | str | تعداد پستها |
| dict | لیست پستها |
posts = await bot.get_Profile_Posts("profile_id", max_id="", limit=10)| profile_id | str | None | شناسه پیج |
| limit | int | تعداد پستها (پیشفرض 20) |
| sort | str | نوع مرتبسازی |
| dict | لیست پستها |
my_posts = await bot.get_myprofile_posts(limit=10)
| post_id | str | شناسه پست |
| target_post_id | str | شناسه پیج صاحب پست |
| dict | نتیجه لایک |
await bot.Like("post_id", "target_profile_id")| post_id | str | شناسه پست |
| post_profile_id | str | شناسه پیج صاحب پست |
| dict | نتیجه |
await bot.un_like("post_id", "profile_id")| post_id | str | شناسه پست |
| post_profile_id | str | شناسه پیج صاحب پست |
| prof | str | None | شناسه پیج ذخیرهکننده |
| dict | نتیجه |
await bot.save_post("post_id", "profile_id")| post_profile_id | str | شناسه پیج صاحب پست |
| post_id | str | شناسه پست |
| profile_id | str | None | شناسه پیج |
| dict | نتیجه |
await bot.un_save_Post("profile_id", "post_id")await bot.comment("متن کامنت", "post_id", "target_profile_id")| content | str | متن پاسخ |
| comment_id | str | شناسه کامنت اصلی |
| post_id | str | شناسه پست |
| profile_id | str | شناسه پیج پاسخدهنده |
await bot.add_reply_comment("پاسخ شما", "comment_id", "post_id", "profile_id")comments = await bot.get_comments("post_id", "profile_id")await bot.delete_Comment("post_id", "comment_id", "text")await bot.like_Comment("comment_id", "post_id")replies = await bot.get_comment_replies("post_id", "comment_id", "profile_id")await bot.request_Follow("target_profile_id")await bot.un_Follow("target_profile_id")followers = await bot.get_Page_Follower("profile_id")following = await bot.get_Page_Following("profile_id")await bot.accept_Follow_Request("request_id")requests = await bot.get_New_Follow_Requests()
await bot.block_Page("target_profile_id")await bot.un_block_Page("target_profile_id")await bot.report_Page("profile_id", reason=2)result = await bot.search_Page("username")exists = await bot.is_Exist_Username("my_username")await bot.upload_avatar("avatar.jpg", profile_id="profile_id")story = await bot.get_Story("profile_id", ["story_id"])viewers = await bot.get_Story_Viewers("story_id")await bot.add_View_Story("target_profile_id", ["story_id"])await bot.create_Highlight("نام هایلایت", ["story_id1","story_id2"], "cover.jpg")highlights = await bot.get_Page_Highlights("profile_id")explore = await bot.get_Explore_Posts()
posts = await bot.get_posts_by_hashtag("rubika")await bot.set_profile_public("profile_id")await bot.set_profile_private("profile_id")