Problem/Motivation

Inspired by taking a closer look at Kitsu I found myself wondering why our current get method is getCollection. This also implies that in 1.x we'll have a comparable getResource for retrieving an individual resource. This does follow JSON:API terminology, but I wonder if exposing that in our API is actually useful. Would it be more or less ergonomic if a single `get` method handled both collections and resources depending on if an id is provided?

Opening this issue for discussion and feedback. Will flesh it out more of there is agreement that this is a good idea.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Issue fork api_client-3383546

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

brianperry created an issue. See original summary.

elber made their first commit to this issue’s fork.

elber’s picture

Status: Active » Needs review
brianperry’s picture

Status: Needs review » Reviewed & tested by the community

I think there needs to be a little more discussion before we decide to merge this change, but the MR looks good for the current state of the codebase. Thanks @elber!

  • brianperry committed 5c98e793 on canary authored by elber
    Issue #3383546 by elber, brianperry: Rename getCollection to get
    
brianperry’s picture

Status: Reviewed & tested by the community » Fixed

Merged. Thanks @elber!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.