Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mutual contacts count in search results #191

Open
mihalt opened this issue May 24, 2022 · 6 comments
Open

Mutual contacts count in search results #191

mihalt opened this issue May 24, 2022 · 6 comments

Comments

@mihalt
Copy link

mihalt commented May 24, 2022

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?

@Terrance
Copy link
Owner

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.

@mihalt
Copy link
Author

mihalt commented May 25, 2022

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?

@Terrance
Copy link
Owner

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).

@mihalt
Copy link
Author

mihalt commented May 25, 2022

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.

@Terrance
Copy link
Owner

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 Terrance changed the title Finding and adding of new contacts Mutual contacts count in search results May 27, 2022
@mihalt
Copy link
Author

mihalt commented Aug 20, 2022

Any news, mate? From my research, the problem is, that you use v1.1 there

API_DIRECTORY = "https://skypegraph.skype.com/search/v1.1/namesearch/swx/"

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants