ShyykoSerhiy / skyweb

Unofficial Skype API for nodejs via 'Skype (HTTP)' protocol.
MIT License
193 stars 44 forks source link

Add mood messages #66

Open madisonsilver opened 7 years ago

madisonsilver commented 7 years ago

There currently appears to be no feature that lets the program change mood messages. Would this be feasible to implement?

ShyykoSerhiy commented 7 years ago

It's possible to ad what's implemented in https://web.skype.com/ . It looks like it's not implemented in web version of Skype yet.

madisonsilver commented 7 years ago

Would it be possible to replicate what https://github.com/OllieTerrance/SkPy does in some way?

madisonsilver commented 7 years ago

It seems like it would be possible to change the mood by making a request to "https://api.skype.com/users/{user_id}/profile/partial" as shown in the setMood method of the SkPy code: https://github.com/OllieTerrance/SkPy/blob/master/skpy/main.py . Is there a way to get the user's id in skyweb?

ShyykoSerhiy commented 7 years ago

Sure. if you look at https://github.com/ShyykoSerhiy/skyweb/blob/master/src/demo/demo.ts#L12 skyweb.skypeAccount.selfInfo will contain your username. Smth like this:

{
  "username": "live:phantomzkype",
  "namespace": "live",
  "displayname": "skype skype",
  "firstname": "skype",
  "lastname": "skype"
}

username is user's id

madisonsilver commented 7 years ago

So am I correct in assuming that implementing a setMood function would be possible?

ShyykoSerhiy commented 7 years ago

Yeah, I'll add it tomorrow.