-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
请问可以获取联系人或群成员的性别、所属地域、头像吗? #121
Comments
@wuhaoworld 在web上有的就是可以获取的 |
@udbmnm 文档中并未提供相关 API |
We are planing to add For more details about the user contact information which is not exposed by API, you can try to The harder part is to get the contact avatar. I do not know if you could get the avatar picture by URL directly, as the server might check the cookies. Please let me know if the url works for you, if not, I can add a new method to Contact for you, to get the avatar file. Thanks. |
@zixia thank you very much. 获取头像时,微信确实会检查 Cookie,未登录状态下头像地址无效。 性别接口建议使用 gender 这个词。 |
Ok. And how do you think about the |
Some new methods that you required just added. Could you please test them and let me know if they work as expected? Thanks. + /**
+ * Contact gender
+ * @return Gender.Male(2) | Gender.Femail(1) | Gender.Unknown(0)
+ */
+ public gender() { return this.obj ? this.obj.sex : Gender.Unknown }
+ public province() { return this.obj && this.obj.province }
+ public city() { return this.obj && this.obj.city }
+
+ /**
+ * Get avatar picture file stream
+ */
+ public async avatar(): Promise<NodeJS.ReadableStream> { |
@zixia
我在调试的时候发现 |
@nolanlee Thanks for your great feedback. Then what we need to do is to add a new method like I'll check it later. |
@nolanlee Please let me know if it works for you. Thanks. |
@zixia |
@nolanlee Great! 🖐 |
现在又获取不到头像了,相关的项目也是如此 |
@LuKing4DB Could you please submit a new issue, with the related "相关的项目也是如此" issues links? Because it must have others changes on the server side, and this issue is already closed. |
看文档 Contact Class 中并没有提供性别和所属地域以及头像的支持,在 web 页面中可以获得用户的地域和性别属性,刚好一个小项目中需要用到,希望未来能支持,感谢!
The text was updated successfully, but these errors were encountered: