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

Comments: Fetch site comments from core V2 endpoint #463

Merged
merged 8 commits into from
Nov 2, 2021

Conversation

dvdchr
Copy link
Contributor

@dvdchr dvdchr commented Nov 1, 2021

Refs wordpress-mobile/WordPress-iOS#17087

Description

This PR adds a method on CommentServiceRemoteREST to fetch site comments through the core v2 endpoint. Since the JSON response structure is a bit different from v1.1, RemoteCommentV2 is created to accommodate the differences and mainly to avoid confusion – as some fields in v1.1 are not supported in core v2 (like_count, i_like, can_moderate, i_replied). Conversely, the core v2 endpoint provides author, the dotcom ID of the comment's author, and some custom filtering capabilities (e.g. by parent comment ID, or by author dotcom ID).

Testing Details

  • Make sure that all the test passes.

  • More detailed testing instructions will be shared in the WP-iOS PR later on.

  • Please check here if your pull request includes additional test coverage.

@dvdchr dvdchr added the enhancement New feature or request label Nov 1, 2021
@dvdchr dvdchr requested a review from ScoutHarris November 1, 2021 16:06
@dvdchr dvdchr self-assigned this Nov 1, 2021
@dvdchr dvdchr merged commit 8336649 into develop Nov 2, 2021
@dvdchr dvdchr deleted the feature/fetch-comment-replies branch November 2, 2021 11:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants