Skip to main content

Blockman Go API package

Project description

Blockmango API Wrapper

logo

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

blockmango-1.4.6.tar.gz (12.0 kB view details)

Uploaded Source

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

Hashes for blockmango-1.4.6.tar.gz
Algorithm Hash digest
SHA256 226d5309773d018da84368626356bc879feade292f26b8b5a12fa9bafa339ab9
MD5 50ccde7bb990341b5f34917bff1d3df8
BLAKE2b-256 e524e8584c41f7c6017b3ceff17a58d3fa2537f32f7cfe2756ced3a896f12dd5

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page