Skip to content

Commit

Permalink
Merge branch idmedia:master (PR #106)
Browse files Browse the repository at this point in the history
  • Loading branch information
Terrance committed Feb 23, 2022
2 parents 055a24f + 677b7d1 commit f263fab
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions skpy/conn.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ def externalCall(cls, method, url, codes=(200, 201, 204, 207), **kwargs):
API_MSACC = "https://login.live.com"
API_EDGE = "https://edge.skype.com/rps/v1/rps/skypetoken"
API_USER = "https://api.skype.com"
API_AVATAR = "https://avatar.skype.com"
API_PROFILE = "https://profile.skype.com/profile/v1"
API_OPTIONS = "https://options.skype.com/options/v1/users/self/options"
API_JOIN = "https://join.skype.com"
Expand Down
4 changes: 2 additions & 2 deletions skpy/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,8 @@ def setAvatar(self, image):
Args:
image (file): a file-like object to read the image from
"""
self.conn("PUT", "{0}/users/{1}/profile/avatar".format(SkypeConnection.API_USER, self.userId),
auth=SkypeConnection.Auth.SkypeToken, data=image.read())
self.conn("PUT", "{0}/v1/avatars/{1}".format(SkypeConnection.API_AVATAR, self.userId),
auth=SkypeConnection.Auth.SkypeToken, data=image.read(), headers={"Content-Type": "image/jpeg"})

def getUrlMeta(self, url):
"""
Expand Down

0 comments on commit f263fab

Please sign in to comment.