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

AtomPub API のエンドポイントにownerを設定できるように修正 #58

Merged
merged 4 commits into from
Jan 25, 2023

Conversation

halkt
Copy link
Contributor

@halkt halkt commented Jan 17, 2023

背景

  • 2022年6月16日のはてなブログAtomPubにの変更によりAtomPub APIがブログメンバーにも対応した
    • AtomPub API のエンドポイントは https://blog.hatena.ne.jp/<ブログオーナーのはてな ID>/<ブログ ID>/atom/entry/<entry_id> が期待されている
    • blogsync は https://blog.hatena.ne.jp/<blogsync_username>/<ブログ ID>/atom/entry/<entry_id> というフォーマットでエンドポイントを扱っている
    • そのため複数人で編集する場合、<blogsync_username> != <ブログオーナーのはてな ID> となるので、ブログオーナー以外は編集できない状態となっている

解決策

  • configでblog_ownerを設定できるように変更し、blog_ownerが設定されている場合はAtomPub API のエンドポイントにblog_ownerが設定されるように修正しました

@halkt halkt changed the title Update/post url set AtomPub API endpoint to blog_owner_name Jan 17, 2023
@halkt halkt changed the title set AtomPub API endpoint to blog_owner_name AtomPub API のエンドポイントにblog_ownerを設定できるように修正 Jan 17, 2023
@halkt halkt marked this pull request as ready for review January 17, 2023 09:10
Copy link
Member

@Songmu Songmu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ありがとうございます!これは大事な変更ですね。
一点お願いしたいのですが、設定名は単にownerで良いと思うので、その点だけ変更してもらえますでしょうか。

@halkt
Copy link
Contributor Author

halkt commented Jan 17, 2023

blogであることは自明だったのでownerに統一しました!

@halkt halkt requested a review from Songmu January 17, 2023 13:28
@halkt halkt changed the title AtomPub API のエンドポイントにblog_ownerを設定できるように修正 AtomPub API のエンドポイントにownerを設定できるように修正 Jan 18, 2023
@Songmu
Copy link
Member

Songmu commented Jan 25, 2023

あれ、これマージしたつもりになっていました…。すみません。とりこみますね。

@Songmu Songmu merged commit fae1e5b into x-motemen:master Jan 25, 2023
@github-actions github-actions bot mentioned this pull request Jan 25, 2023
@halkt halkt deleted the update/postURL branch January 26, 2023 02:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants