Slack user_id 和用户名是否有已发布的格式?
Is there a published format for Slack user_id and username?
我在淘the docs for this info but I haven't found anything much. I've found this note on a hubot-slack issue:
From the slack ui when changing username:
"Usernames must be all lowercase. They cannot be longer than 21 characters and can only contain letters, numbers, periods, hyphens, and underscores."
我可以想出一个正则表达式来根据他们给出的几个例子解析出一个扩展的实体,但我迂腐的一面是希望得到诸如最小长度之类的东西,关于最大长度的官方说法, 允许的字符等
任何帮助将不胜感激。同时我可能会尝试获取 .....................
的用户名 :)
我不确定用户 ID,但对于用户名,我发现详细信息仅列在网站内的用户个人资料页面上(不是 http link,原因应该很明显)在该页面上的 Username
字段:
https://<yourSlackAccountNameHere>.slack.com/account/settings#username
它指出(截至 2018 年 5 月 11 日):
用户名不是您个人资料的一部分,Slack 仅出于技术原因才需要用户名。您的用户名通常对其他人不可见,但您可以根据需要更改它。
用户名必须全部小写。它们不能超过 21 个字符,并且只能包含字母、数字、句点、连字符和下划线。
请注意,每小时更改用户名的次数不能超过两次。明智地选择。
我个人使用以下正则表达式:
([a-z0-9._-]{1,21})
我给 Slack 支持发了邮件,他们回复了我:
at the moment the only format we have for the team_id is that it begins with a T as you've seen. There's no other constraints in place (e.g. number of characters) that you could use as a check. I've pushed a request over to our product managers though as something you'd like to see in future!
他们跟进了:
I had a look over some example Team IDs to see can I find some patterns or anything but outside of the starting character, I can't see much concrete in regards to the rest of the characters.
这很公平。
我在淘the docs for this info but I haven't found anything much. I've found this note on a hubot-slack issue:
From the slack ui when changing username:
"Usernames must be all lowercase. They cannot be longer than 21 characters and can only contain letters, numbers, periods, hyphens, and underscores."
我可以想出一个正则表达式来根据他们给出的几个例子解析出一个扩展的实体,但我迂腐的一面是希望得到诸如最小长度之类的东西,关于最大长度的官方说法, 允许的字符等
任何帮助将不胜感激。同时我可能会尝试获取 .....................
的用户名 :)
我不确定用户 ID,但对于用户名,我发现详细信息仅列在网站内的用户个人资料页面上(不是 http link,原因应该很明显)在该页面上的 Username
字段:
https://<yourSlackAccountNameHere>.slack.com/account/settings#username
它指出(截至 2018 年 5 月 11 日):
用户名不是您个人资料的一部分,Slack 仅出于技术原因才需要用户名。您的用户名通常对其他人不可见,但您可以根据需要更改它。
用户名必须全部小写。它们不能超过 21 个字符,并且只能包含字母、数字、句点、连字符和下划线。
请注意,每小时更改用户名的次数不能超过两次。明智地选择。
我个人使用以下正则表达式:
([a-z0-9._-]{1,21})
我给 Slack 支持发了邮件,他们回复了我:
at the moment the only format we have for the team_id is that it begins with a T as you've seen. There's no other constraints in place (e.g. number of characters) that you could use as a check. I've pushed a request over to our product managers though as something you'd like to see in future!
他们跟进了:
I had a look over some example Team IDs to see can I find some patterns or anything but outside of the starting character, I can't see much concrete in regards to the rest of the characters.
这很公平。