Skip to content

Commit

Permalink
Edit: Profile Info Change Optimized
Browse files Browse the repository at this point in the history
  • Loading branch information
faridrasidov committed Aug 9, 2024
1 parent 699ece7 commit 911b664
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions soundcld/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -637,20 +637,21 @@ def get_my_following_ids(
}
return self._get_id_list(link, **param)

def put_me_info(
def change_my_profile_info(
self,
permalink: str,
username: str,
city: str = '',
country_code: str = 'EN',
description: str = '',
first_name: str = '',
last_name: str = ''
permalink: str = None,
username: str = None,
city: str = None,
country_code: str = None,
description: str = None,
first_name: str = None,
last_name: str = None
):
"""
Changes My {Logged-In User} Information.
"""
link = '/me'
last_info = self.get_user(self.my_account_id)
payload = {
'city': city,
'country_code': country_code,
Expand All @@ -660,4 +661,7 @@ def put_me_info(
'permalink': permalink,
'username': username
}
for item, value in payload.items():
if not value:
payload[item] = last_info[item]
return self._put_payload(link, payload)

0 comments on commit 911b664

Please sign in to comment.