Ruby または REST API を通じたグループ所有者の更新ができません

Ruby API では、create_groupupdate_groupowner_usernames を割り当てるオプションが 表示されていますcreate_group は機能しているようです(グループ作成後にオーナーが表示される)が、owner_usernamesREST 側 では create 時のみ割り当て可能なようです。そのため、Ruby API を使用する場合、UI を通じずに既存のグループのオーナーにユーザーを昇格させることができません。

これは設計によるものですか、それとも PR の対象となる問題でしょうか?Ruby 側で groups#add_owners および groups#remove_owner に対応するメソッドが必要だと考えてよいでしょうか?

「いいね!」 1

The UI is using the API. Have you tried this?

「いいね!」 3

Thanks, Régis. I’m not seeing anything for ownership in discourse_api/lib/discourse_api/api/groups.rb at main · discourse/discourse_api · GitHub. I was just checking to make sure I wasn’t missing something. I can certainly just do a put request to the /admin/groups/:group_name/owners API endpoint directly without a method in the Ruby API.

「いいね!」 1

The API gem may have some gaps, if you find any feel free to plug them in with PRs.

image

「いいね!」 1

discourse_api gem に、グループのオーナーを追加・削除するメソッドが追加されました。

@client.group_add_owners(41, { usernames: "48ce9df193c627574202" } )
@client.group_remove_owners(41, { usernames: "48ce9df193c627574202" } )
「いいね!」 2