SkPy icon indicating copy to clipboard operation
SkPy copied to clipboard

Mutual contacts count in search results

Open mihalt opened this issue 3 years ago • 6 comments

Hi! You wrote very interesting lib! Thank you very much for it.

I can't understand how to use your protocol documentation. For example looks like https://github.com/Terrance/SkPy.docs/blob/master/background/protocol/contacts.rst contains demanded feature for me — search of contacts in Skype. And I would like to see how many of common contacts has this new contacts from search. But I can't understand how to use it.

Also I didn't find how I can send contact request to found contact.

And separate question: does Skype have any limits on creating of group chats for one user?

mihalt avatar May 24 '22 17:05 mihalt

You mention both the library and the HTTP protocol; which are you actually using?

Assuming the lib, you should be reading the API docs rather than the protocol -- see SkypeContacts.

Terrance avatar May 25 '22 08:05 Terrance

You mention both the library and the HTTP protocol; which are you actually using?

Assuming the lib, you should be reading the API docs rather than the protocol -- see SkypeContacts.

I use only library. As I understand protocol is more low-level, that better not to see.

SkypeContacts.search() is that I need, thanks. And how can I fetch how many of common contacts quantity does this contact have? I can't find in SkypeContacts object.

By the way, would be good to make method on SkypeUser like is_contact? Which allows me to understand did I have any conversations with this man?

mihalt avatar May 25 '22 15:05 mihalt

how can I fetch how many of common contacts quantity does this contact have?

Previously Skype didn't expose this information, but it looks like they've redone search to show a mutual count. Pull requests are open if you wish to add it.

would be good to make method on SkypeUser like is_contact

Retrieved user objects aren't aware of your contact list, but you can try retrieving their identifier from SkypeContacts, i.e. isinstance(sk.contacts[user.id], SkypeContact) (the key lookup will return a SkypeUser or None if not a contact).

Terrance avatar May 25 '22 18:05 Terrance

Previously Skype didn't expose this information, but it looks like they've redone search to show a mutual count. Pull requests are open if you wish to add it

Do you have any recommendations what I have to learn to be able to create this feature? It is really very demanded and useful for me.

mihalt avatar May 25 '22 18:05 mihalt

You'll need to use your browser dev tools against Skype for Web to find the HTTP request that happens when you run a search, and update SkypeContacts.search() to call that endpoint.

Terrance avatar May 27 '22 23:05 Terrance

Any news, mate? From my research, the problem is, that you use v1.1 there https://github.com/Terrance/SkPy/blob/f263fabf7297393de98fcb08295366f217347637/skpy/conn.py#L144

But today is something like that in browser https://skypegraph.skype.com/v2.0/search?searchString=cards&requestId=Query[number]&locale=en-EN&sessionId=a87c8be3-e0c0-4ba1-a1c1-87fb17d3e2f4

And few new headers, as I understand, like x-ecs-etag and x-skypegraphservicesettings.

sessionId, as I understand, is the same as your endpoints https://skpy.t.allofti.me/reference/internal.html?highlight=skypeendpoint#skpy.conn.SkypeEndpoint. But another headers a bit can't understand about what are they and how are they optional.

Can you help a bit? In this api version there is key mutualFriendCount in response

mihalt avatar Aug 20 '22 19:08 mihalt