Amino-NET-Group / Amino.NET

An unofficial C# wrapper around Aminos REST API based on Amino.py!
MIT License
11 stars 2 forks source link
amino amino-api amino-dotnet aminoapps aminodotnet aminofix aminolibrary aminopy api-wrapper botamino narvii samino

Amino.Net

An unofficial C# wrapper for Aminos REST API to make Amino Bots and Tools

What can this wrapper do?

Amino.Net has a lot of functionality that allow you to develop Amino tools and bots for multiple types of C# / dotNet projects

Extras and Credits

Important Notice

By using this library you agree that you are aware of the fact that you are breaking the App services Terms of Service - as Team Amino strictly forbids the use of any sort of third party software / scripting to gain an advantage over other members, any activity by third party tools found by Team Amino may result in your account getting banned from their services!

How to install

You can get Amino.Net straight from NuGet.org or any NuGet Package manager!

Quick Links

GENERAL DOCUMENTATION

To see a better view on the Documentation consider viewing the seperated documentation files linked in Quick Links

Client

The Amino.Client() Object is a crucial object to make Bots or tools, as there need to be an instance of it to make the library work

Values

Note that some values might be null if you don't login into an Amino account

Client(string _deviceId)

You need to create an Object instance of the Amino.Client object to use the Clients functions, it accepts 1 value

Extras

Example:

Amino.Client client = new Amino.Client(); // This client will be used as an Example Client for the rest of the Amino.Client() docuemntations, whenever "client" is being used, its just an instance of Amino.Client()

Methods / Functions

request_verify_code(string email, bool resetPassword) : Task

You can request an Amino verification code using this function.

login(string email, string password, string secret) : Task

You can log into an existing Amino account using this function.

logout() : Task

You can log out of an Amino account using this function, make sure you are logged into an account to use this function!

register(string name, string email, string password, string verificationCode, string deviceId) : Task

This function allows you to register an Amino account

restore_account(string email, string password, string deviceId) : Task

This function allows you to restore a deleted Amino account

delete_account(string password) : Task

This function allows you to delete the current Amino account in use.

activate_account(string email, string verificationCode, string deviceId) : Task

This function allows you to activate an Amino account using a verification Code

configure_account(Amino.Types.account_gender gender, int age) : Task

This function allows you to configure an Amino accounts age and gender

change_password(string email, string password, string verificationCode) : Task

This function allows you to change the password of the current Amino account.

get_user_info(string userId) : Amino.Objects.GlobalProfile

This function allows you to get information about a global Amino Profile

check_device(string deviceId) : bool

This function allows you to check if a device ID is valid or not

get_event_log() : Amino.Objects.EventLog

This function allows you to get information about the current accounts event log!

get_subClient_communities(int start, int size) : List

This function allows you to get information about all the Communities where the current Amino account is in

get_subClient_profiles(int start, int size) : List

This function allows you to get information about all the community profiles where the current Amino account is in

get_account_info() : Amino.Objects.UserAccount

This function allows you to get information about the current Amino account

get_chat_threads(int start, int size) : List

This function allows you to get all chat threads where the current Amino account is in

get_chat_thread(string chatId) : Amino.Objects.Chat

This function allows you to get information about a specific chat thread where the current Amino account is in

get_chat_users(string chatId, int start, int size) : List

This function allows you to get chat member information about a specific chat thread

join_chat(string chatId) : Task

This function allows you to join a chat thread using the current Amino account.

leave_chat(string chatId) : Task

This function allows you to leave a chat thread using the current Amino account.

invite_to_chat(stiring[] userIds, string chatId) : Task

This function allows you to invite one or more members to a chat thread with the current Amino account

kick_from_chat(string userId, string chatId, bool allowRejoin) : Task

This function allows you to kick a user from a chat thread

get_chat_messages(string chatId, int size, string pageToken) : List

This function allows you to get a collection of messages in a specific chat thread the current Amino account is in

search_community(string aminoId) : List

This function allows you to search for a Community by its aminoId (not and ObjectId) and retrieve information about it

get_user_following(string userId, int start, int size) : List

This function allows you to get the users a target is following

get_user_followers(string userId, int start, int size) : List

This function allows you to get a list of users that follow a user

get_user_visitors(string userId, int start, int size) : List

This function allows you to get a list of users that have visited a target profile

} catch { Console.WriteLine("Could not get user visitors!"); }


### get_blocked_users(int start, int size) : List<Amino.Objects.BlockedUser>
This function allows you to get a list of users that the current Amino account has blocked
- Success: Gets the blocked users and returns them as an Object List (List<Amino.Objects.BlockedUser>)
- Error: Throws an Exception
### Values:
- start : int (default: 0) : Sets the Start index for getting blocked users
- size : int (default: 25) : Sets the range between `start` and whatever this is set to
### Example:
```CSharp
try 
{
    List<Amino.Objects.BlockedUser> blockedUsers = client.get_blocked_users();
    Console.WriteLine("List of blocked users (user IDs)");
    foreach(Amino.Obejcts.BlockedUser user in blockedUsers) 
    {
        Console.WriteLine(user.userId);
    }
} catch 
{
    Console.WriteLine("Could not get blocked users");
}

get_blocker_users(int start, int size) : List<string>

This function allows you to get a list of user IDs of the users who have currenty blocked the current Amino account

get_wall_comments(string userId, Amino.Types.Sorting_Types type, int start, int size) : List

This function allows you to get a list of comments that have been left on a users wall

flag(string reason, Amino.Types.Flag_Types flagType, Amino.Types.Flag_Targets targetType, string targetId, bool asGuest) : Task

This function allows you to flag a post / profile on Amino

delete_message(string chatId, string messageId, bool asStaff, string reason) : Task

This function allows you to delete a specific chat message using the current Amino account

mark_as_read(string chatId, string messageId) : Task

This function allows you to mark a message as read

visit(string userId) : Task

This function allows you to visit a users Amino profile

follow_user(string userId) : Task

This function allows you to follow a user using the current Amino account

unfollow_user(string userId) : Task

This function allows you to unfollow a user using the current Amino account

block_user(string userId) : Task

This function allows you to block a user using the current Amino account

unblock_user(string userId) : Task

This function allows you to unblock a user using the current Amino account

join_community(string communityId, string invitationCode) : Task

This function allows you to join a community using the current Amino account

join_community_request(string communityId, string message) : Task

This function allows you to make a join request to a community

leave_community(string communityId) : Task

This function allows you to leave a comunity using the current Amino account

flag_community(string communityId, string reason, Amino.Types.Flag_Types flagType, bool asGuest) : Task

This function allows you to flag a community

upload_media(byte[] file | string filePath, Amino.Types.Upload_File_Types type) : string

This function allows you to upload media directly to the Amino servers, it will return the resulting media URL.

} catch { Console.WriteLine("Could not upload media"); }


### edit_profile(string nickname, string content, byte[] icon, string backgroundColor, string backgroundMediaUrl, string defaultChatbubbleId) : Task
This function allows you to edit your global Amino profile
- Success: Edits the profile and completes the task successfully 
- Error: Throws an Exception
### Values:
- nickname : string (default: null) : The nickname you want the account to have
- content : string (default: null) : The content of the accounts description you want the account to have
- icon : byte[] (default: null) : The icon you want the account to have as profile picture
- backgroundColor : string (default: null) : The background color of the account as HEX format
- backgroundMediaUrl : string (default: null) : The backkground media you want the account to have
- defaultChatbubbleId : string (default: null) : The default chat bubble ID you want the account to have
### Example:
```CSharp
try 
{
    client.edit_profile("I hated making this one.", "it sucked and probably doesn't even work.", backgroundColor: "#FFFFFF");
    Console.WriteLine("Edited profile");
} catch 
{
    Console.WriteLine("Could not edit profile");
}

set_privacy_status(bool isAnonymous, bool getNotifications) : Task

This function allows you to set the privacy status of the current Amino account

set_amino_id(string aminoId) : Task

This function allows you to change your Amino ID, note that you can't do this an unlimited amount of times

add_linked_community(int communityId) : Task

This function allows you to add a linked community to the profile of the current Amino account

remove_linked_community(int communityId) : Task

This function allows you to remove a linked community from the profile of the current Amino account

comment(string message, Amino.Types.Comment_Types type, objectId) : Task

This function allows you to comment below a post, a wall or reply to a comment using the current Amino account

delete_comment(string commentId, Amino.Types.Comment_Types type, string objectId) : Task

This function allows you to delete a comment from a post, a users wall or a reply using the current Amino account

like_post(string objectId, Amino.Types.Post_Types type) : Task

This function allows you to like a post using the current Amino account

unlike_post(string objectId, Amino.Types.Post_Types type) : Task

This function allows you to unlike a post using the current Amino account

get_membership_info() : Amino.Objects.MembershipInfo

This function allows you to get information about the current Amino accounts Amino+ membership

get_ta_announcements(Amino.Types.Supported_Languages language, int start, int size) : List

This function allows you to get a list of Team Amino announcements

get_wallet_info() : Amino.Objects.WalletInfo

This function allows you to get the wallet info of the current Amino account

get_wallet_history(int start, int size) : List

This function allows you to get the wallet history of the current Amino account

get_from_deviceId(string deviceId) : string

This function allows you to get a user ID thats linked to a deviceId

get_from_code(string aminoUrl) : Amino.Objects.FromCode

This function allows you to get information about a specific Amino URL (code)

get_from_id(string objectId, Amino.Types.Object_Types type, string communityId) : Amino.Objects.FromId

This function allows you to get informations abou tan object using the object ID

get_supported_languages() : string[]

This function allows you to get the language codes for each supported language as a strin array

claim_new_user_coupon() : Task

This function allows you to claim the new user coupon for the current Amino account

get_all_users(int start, int size) : List

This function allows you to get a list of all global Amino users

accept_host(string chatId, string requestId) : Task

This function allows you to accept host / organizer of a chat room using the current Amino account

accept_organizer(string chatId, string requestId) : Task

link_identify(string inviteCode) : Amino.Obejcts.FromInvite

This function allows you to get information about an Amino invite code and its community

wallet_config(Amino.Types.Wallet_Config_Levels walletLevel) : Task

This function allows you to set the coin wallet configuration using the current Amino account

get_avatar_frames(int start, int size) : List

This function allows you to get a list of Avatar Frames that the current Amino account has unlocked

Events

onMessage : Amino.Objects.Message

This event fires each time the Client receives a Text message

Event:

[...]

static void main(string[] args) { [...] client.onMessage += onMessageEvent; }


### onImageMessage : Amino.Objects.ImageMessage
This event fires each time the Client receives an Image message
### Event:
- This event returns an Amino.Objects.ImageMessage Object
### Example: 
```CSharp
static void onImageMessageEvent(Amino.Objects.ImageMessage imageMessage) 
{
    Console.WriteLine($"User {imageMessage.Author.nickname} has sent an image: {imageMessage.mediaUrl}");
}

[...]

static void main(string[] args) 
{
    [...]
    client.onImageMessage += onImageMessageEvent;
}

onWebSocketMessage : string

This event fires each time a websocket message has been recevied by the Client

Event:

[...]

static void main(string[] args) { [...] client.onWebSocketMessage += onWebSocketMessageEvent; }


## helpers
- The helpers class is an important part of Amino.Net and any other Amino library, as it allows you to get around the Amino API more easily
### Values:
- BaseURL : string : This string represents the base URL to Aminos REST API
## Methods / Functions
### generate_device_id() : string
This function allows you to generate an Amino ready device ID 
### Values:
- None
### Example:
```CSharp
Console.WriteLine("Amino device ID: " + Amino.helpers.generate_device_id());

generate_signiture(sring data) : string

This function allows you to generate an Amino valid request signiture

Values:

generate_file_signiture(byte[] data) : string

This function allows you to generate an Amino valid request signiture out of file data

Values:

GetTimestamp() : double

This function allows you to get the current UNIX timestamp, it is not Amino ready!

Values:

get_ObjectTypeID(Amino.Types.Object_Types type) : int

This function allows you to convert a Type into the fitting Amino object ID

Values: