Blockman Go API package
Project description
Blockmango API Wrapper
This Python package provides a convenient way to interact with the Blockmango API.
Installation
You can install the package via pip:
pip install blockmango
๐ Docs
For detailed usage instructions and examples, please refer to the documentation in the docs
folder.
For more information on available methods and parameters, contact me on discord, darkk.py.
License
This project is licensed under the MIT License - see the LICENSE.md file for details.
๐ซ Friends Class Documentation
This documentation provides details on the Friends
class which is part of the blockmango
module. The class interacts with a friend management API, allowing various operations such as adding friends, deleting friends, managing friend requests, and more.
๐ฆ Installation
To install the blockmango
module, use the following command:
pip install blockmango
๐ Usage
To use the Friends
class, import it from the blockmango
module:
import blockmango
from blockmango import Friends
๐ Initialization
friends = Friends(user_id="your_user_id", access_token="your_access_token")
๐ Methods
๐ซ delete_friend
Deletes a friend from your friend list.
friends.delete_friend(friend_id="friend_id")
๐ค request
Sends a friend request to another user.
friends.request(friend_id="friend_id", msg="Let's be friends!")
๐ popularity
Gets the popularity of a friend.
friends.popularity(friend_id="friend_id")
โน๏ธ info
Gets detailed information about a friend.
friends.info(friend_id="friend_id")
๐จ decoration
Gets decorations used by a friend.
friends.decoration(friend_id="friend_id")
โ add_popularity
Adds popularity to a friend.
friends.add_popularity(friend_id="friend_id")
๐ friend_list
Gets the list of friends.
friends.friend_list()
๐ nickname
Sets a nickname for a friend.
friends.nickname(friend_id="friend_id", alias="Nickname")
โ friend_approve
Approves a friend request.
friends.friend_approve(friend_id="friend_id")
๐ท friend_blacklist
Adds a friend to the blacklist.
friends.friend_blacklist(friend_id="friend_id")
๐ reject_all
Rejects all friend requests.
friends.reject_all()
โ approve_all
Approves all pending friend requests.
friends.approve_all()
โ friend_reject
Rejects a friend request.
friends.friend_reject(friend_id="friend_id")
This README.md
provides an overview of the Friends
class methods and usage examples. For more detailed usage, refer to the method definitions and parameters listed above.
๐ง Group Class Documentation
This documentation provides details on the Group
class which is part of the blockmango
module. The class interacts with a group management API, allowing various operations such as creating groups, managing group members, sending invitations, and more.
๐ฆ Installation
To install the blockmango
module, use the following command:
pip install blockmango
๐ Usage
To use the Group
class, import it from the blockmango
module:
import blockmango
from blockmango import Group
๐ Initialization
group = Group(user_id="your_user_id", access_token="your_access_token")
๐ Methods
๐ ๏ธ create
Creates a new group.
group.create(member_ids=["member_id1", "member_id2"])
๐ช allow_invite
Allows or disallows group invitations.
group.allow_invite(group_id="group_id", group_name="Group Name", invite_status=True)
โ๏ธ edit
Edits group details such as name, notice, and invitation status.
group.edit(group_id="group_id", group_name="Group Name", group_notice="Group Notice", invite_status=True, notice_pics=["pic1.jpg", "pic2.jpg"])
๐ฎ admin
Assigns or removes admin rights to a member.
group.admin(group_id="group_id", member_id="member_id", operation_type="add")
๐ค mute
Mutes a group member for a specific duration.
group.mute(group_id="group_id", member_id="member_id", minutes=30)
๐ invite
Invites members to join a group.
group.invite(group_id="group_id", member_ids=["member_id1", "member_id2"])
๐ช kick
Kicks members out of a group.
group.kick(group_id="group_id", group_name="Group Name", member_ids=["member_id1", "member_id2"])
โ approve_or_disapprove
Approves or disapproves a group application.
group.approve_or_disapprove(group_id="group_id", operate_id="operation_id", j_type="approve")
๐ถ quit
Quits a group.
group.quit(group_id="group_id", group_name="Group Name")
๐ apply
Applies to join a group with a message.
group.apply(group_id="group_id", msg="Please accept my request.")
๐ transfer
Transfers group ownership to another member.
group.transfer(group_id="group_id", new_owner="new_owner_id")
This README.md
provides an overview of the Group
class methods and usage examples. For more detailed usage, refer to the method definitions and parameters listed above.
๐ค User Class Documentation
This documentation provides details on the User
class which is part of the blockmango
module. The class interacts with a user management API, allowing various operations such as fetching user info, changing user details, modifying passwords, and more.
๐ฆ Installation
To install the blockmango
module, use the following command:
pip install blockmango
๐ Usage
To use the User
class, import it from the blockmango
module:
import blockmango
from blockmango import User
๐ Initialization
user = User(user_id="your_user_id", access_token="your_access_token")
๐ Methods
โน๏ธ get_user_info
Gets detailed information about the user.
user.get_user_info()
๐ set_birthday
Sets the user's birthday.
user.set_birthday(birthday="yyyy-mm-dd")
๐ login
Logs in the user.
user.login(device_id="device_id", device_sign="device_signature", password="password", userId="user_id")
โ๏ธ change_name
Changes the user's name.
user.change_name(new_name="New Name", old_name="Old Name")
๐ change_details
Changes the user's details.
user.change_details(new_details="New details")
๐ผ๏ธ change_pfp
Changes the user's profile picture.
user.change_pfp(pfp_url="image_url")
๐ modify_password
Modifies the user's password.
user.modify_password(old_password="old_password", new_password="new_password")
๐ง bind_email
Binds an email to the user's account.
user.bind_email(email="email_address", verify_code="verification_code")
๐ง unbind_email
Unbinds an email from the user's account.
user.unbind_email(verify_code="verification_code", email="email_address")
This README.md
provides an overview of the User
class methods and usage examples. For more detailed usage, refer to the method definitions and parameters listed above.
๐ฐ Clan Class Documentation
This documentation provides details on the Clan
class which is part of the blockmango
module. The class interacts with a clan management API, allowing various operations such as joining a clan, inviting members, muting members, and more.
๐ฆ Installation
To install the blockmango
module, use the following command:
pip install blockmango
๐ Usage
To use the Clan
class, import it from the blockmango
module:
import blockmango
from blockmango import Clan
๐ Initialization
clan = Clan(user_id="your_user_id", access_token="your_access_token")
๐ Methods
๐ user_clan
Fetches the user's clan information.
clan.user_clan()
โ join
Joins a clan by ID.
clan.join(clan_id="clan_id")
โ leave
Leaves a clan by ID.
clan.leave(clan_id="clan_id")
๐ search
Searches for clans by name.
clan.search(clan_name="clan_name", page_no=0, page_size=20)
โน๏ธ info
Gets information about a specific clan by ID.
clan.info(clan_id="clan_id")
๐ฉ invite
Invites friends to the clan.
clan.invite(friend_ids=["friend_id1", "friend_id2"], message="Join my clan!")
โ agreement_user
Agrees to a user's clan request.
clan.agreement_user(other_id="user_id")
โ reject_user
Rejects a user's clan request.
clan.reject_user(other_id="user_id")
๐ mute_member
Mutes a clan member for a specified duration in minutes.
clan.mute_member(member_id="member_id", minutes=30)
๐ unmute_member
Unmutes a clan member.
clan.unmute_member(member_id="member_id")
๐ mute_all
Mutes all members in the clan.
clan.mute_all()
๐ unmute_all
Unmutes all members in the clan.
clan.unmute_all()
๐๏ธ remove_member
Removes members from the clan.
clan.remove_member(member_ids=["member_id1", "member_id2"])
๐ ๏ธ edit
Edits the clan details.
clan.edit(clan_id="clan_id", currency=0, details="New details", head_pic="new_pic_url", name="New Name", tags=["tag1", "tag2"])
๐ง edit_elders
Edits the clan elders.
clan.edit_elders(type_="elder_type", elder_ids=["elder_id1", "elder_id2"])
๐ authentication
Sets clan authentication.
clan.authentication(type_="on") # or "off"
๐๏ธ buy_decoration
Buys a clan decoration.
clan.buy_decoration(decoration_id="decoration_id")
โ task_accept
Accepts a clan task.
clan.task_accept(task_id="task_id", is_team_task=True)
๐ self_task_refresh
Refreshes personal clan tasks.
clan.self_task_refresh()
๐ task_claim
Claims a completed clan task.
clan.task_claim(task_id="task_id", is_team_task=True)
๐ข notice
Posts a clan notice.
clan.notice(content="Clan meeting at 8 PM!")
๐ transfer_chief
Transfers clan chief role to another member.
clan.transfer_chief(new_chief_id="new_chief_id")
๐๏ธ create
Creates a new clan.
clan.create(clan_id=0, currency=2, details="Clan details", head_pic="pic_url", name="Clan Name", tags=["tag1", "tag2"])
โ dissolve
Dissolves the clan.
clan.dissolve(clan_id="clan_id")
๐ ๏ธ Example
import blockmango
from blockmango import Clan
# Initialize Clan instance
clan = Clan(user_id="your_user_id", access_token="your_access_token")
# Join a clan
clan.join(clan_id="clan_id")
# Search for clans
result = clan.search(clan_name="ExampleClan")
print(result)
This README.md
provides an overview of the Clan
class methods and usage examples. For more detailed usage, refer to the method definitions and parameters listed above.
๐จ Decoration Class Documentation
This documentation provides details on the Decoration
class which is part of the blockmango
module. The class interacts with a decoration management API, allowing various operations such as fetching skins, checking current prices, buying decorations, and more.
๐ฆ Installation
To install the blockmango
module, use the following command:
pip install blockmango
๐ Usage
To use the Decoration
class, import it from the blockmango
module:
import blockmango
from blockmango import Decoration
๐ Initialization
decoration = Decoration(user_id="your_user_id", access_token="your_access_token")
๐ Methods
๐ผ๏ธ skins
Fetches the skins available for a user.
decoration.skins(uid="user_id")
๐ฐ current_price
Gets the current price of a skin.
decoration.current_price(skin_id="skin_id", is_suit=True)
๐ buy
Buys a decoration.
decoration.buy(diamond=100, cloth_voucher=5, paytype="pay_type")
๐ช shop_info
Gets the shop information of the user.
decoration.shop_info()
๐ญ equip
Equips a decoration.
decoration.equip(skin_id="skin_id")
๐ ๏ธ Example
import blockmango
from blockmango import Decoration
# Initialize Decoration instance
decoration = Decoration(user_id="your_user_id", access_token="your_access_token")
# Fetch skins for a user
skins = decoration.skins(uid="user_id")
print(skins)
# Get current price of a skin
price = decoration.current_price(skin_id="skin_id", is_suit=True)
print(price)
# Buy a decoration
buy_response = decoration.buy(diamond=100, cloth_voucher=5, paytype="diamond")
print(buy_response)
# Get shop information
shop_info = decoration.shop_info()
print(shop_info)
# Equip a decoration
equip_response = decoration.equip(skin_id="skin_id")
print(equip_response)
This README.md
provides an overview of the Decoration
class methods and usage examples. For more detailed usage, refer to the method definitions and parameters listed above.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file blockmango-1.4.6.tar.gz
.
File metadata
- Download URL: blockmango-1.4.6.tar.gz
- Upload date:
- Size: 12.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.10.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 226d5309773d018da84368626356bc879feade292f26b8b5a12fa9bafa339ab9 |
|
MD5 | 50ccde7bb990341b5f34917bff1d3df8 |
|
BLAKE2b-256 | e524e8584c41f7c6017b3ceff17a58d3fa2537f32f7cfe2756ced3a896f12dd5 |