2015-11-11 65 views
4

我試圖使用curl和github API將多個用戶添加到私人組團隊中的團隊。不過,我的語法有些問題,我不確定它是什麼。將用戶添加到組織存儲庫github API

我已經試過:

curl --user "groupowner:password" -X PUT -d "" "https://api.github.com/orgs/ORGNAME/teams/TEAMNAME/members/USERNAMETOBEADDED/" 

GitHub的文檔,例如,here是有益的,但我很想念something.Looking here似乎另一種語法是可能的。

回答

4

擺脫尾隨斜線和使用團隊成員API應該做的伎倆:

curl --user "groupowner:password" -X PUT -d "" "https://api.github.com/teams/TEAMID/memberships/USERNAMETOBEADDED" 
+0

我得到: { 「消息」: 「未找到」, 「documentation_url」:「HTTPS: //developer.github.com/v3「 } – Donnied

+0

我的不好 - 我只需要找到teamid:http://fabian-kostadinov.github.io/2015/01/16/how-to-find-a- GitHub的團隊-ID / – Donnied

相關問題