Package: houseparty
housepartyDescriptionA python package to interact with Houseparty's API. The following tasks can be automated through the use of this package:Logging inWavingCallingMessaging (not functional at the moment)In house alertsChanging profile pictureChanging display nameChanging usernameChecking username availabilityViewing online friendsViewing relationshipsViewing friend suggestionsSearching for usersDownloading a user's avatarViewing account details:Account IDUsernameFull nameAvatar IDAccount creation dateLast account update dateRelationship statusLast interactionRequirementsThis package relies on therequestslibrary. You can install it withpip3 install requests.Installationpip3 install housepartyGetting startedfromhousepartyimportHouseparty,Userme=Houseparty('USERNAME','PASSWORD')# Replace this with your houseparty username and passwordprint(me.user)# Print your user informationfriend=User(me.auth_token,'USERNAME')# Initializes an instance of a user we want to interact with, the auth token is needed to retrieve a friend's information and preform user actions (wave, ring, etc.)print(friend.user)# Print the user's informationSeeexample.pyfor more usage examples of this package.Function explanationsFunction NameFunction ExplanationNumber of argumentsArgument DetailsReturn valueHouseparty.login()Logs in a user to get an authentication token.Called by default when initializingHousepartyinstance.2self, username, password:usernameandpasswordmust be valid Houseparty credentials.Dictionary containing user information.Houseparty.change_avatar()Changes the avatar of the current user.1self, file:filemust be a valid file path.Dictionary containing response from avatar PUT request.Houseparty.change_display_name()Changes the display name of the current user.1self, nameTrueif the change was sucessful, otherwise returnsNone.Houseparty.check_username()Checks the availability and validity of a username.1usernameDictionary containing the validity and availibility status.Houseparty.change_username()Changes the username of the current user.1self, username:usernamemust be available and valid.Trueif the change was sucessful, otherwise returnsNone.Houseparty.in_house_alert()Sends out a<name> is in the housealert.0selfTrueif the request was sucessful, otherwise returnsNone.Houseparty.online_friends()Returns the online friend list of the current user.0selfDictionary containing online friends and their user details.Houseparty.relationships()Returns the friend list of the current user.0selfDictionary containing all friends and their user details.Houseparty.suggestions()Returns friend suggestions for the current user.0selfDictionary containing frined suggestions and their user details.Houseparty.search()Searches for Houseparty users.1self, text:textmust be at least 3 charactersDictionary of users matching the search text and their user details.User.get_uid()Returns the user ID of a username.Called by default when initializingUserinstance.1username:usernamemust be a Houseparty user.uidstring if sucessful, otherwise returnsNone.User.get_user_info()Returns the user details for aUserinstance.0selfDictionary containing user details.User.get_avatar()Downloads the avatar for aUserinstance.2 (optional)self, output_dir, size:output_dirmust be a valid file path, by default it isHOME_DIRECTORY/Pictures/houseparty-avatars.sizemust be an integer, by default it is1000.Trueif sucessful, otherwise returnsNone.User.say_hi()Sends a wave to the currentUserinstance.1 (optional)self, amount:amountmust be a positive integer.Trueif sucessful, otherwise returnsNone.User.ring()Sendsd a call to the currentUserinstance.1 (optional)self, amount:amountmust be a positive integer.Trueif sucessful, otherwise returnsNone.User.send_message()Sends a message to the currentUserinstance.Still under development and not functional at the moment.2 (second argument is optional)self, message, amount:amountmust be a positive integer.Trueif sucessful, otherwise returnsNone.