Skip to content

Merge links & embedded #56

Closed
Closed

Description

@oriolgual

This is a major refactor, but Hyperclient should not differntiate between links and embeded they are all resource with more or less information.

Instead of accessing client.links.posts.first or client.embedded.posts.first one should be able to simply access client.resources.posts.first

Activity

  1. dblock commented on Sep 18, 2014

    @dblock
    Collaborator

    I think resources introduces a concept that HAL doesn't have.

    What do you think about taking it a bit further without actually changing the semantics of existing code?

    In general when you do x.y, can't you say that y is first a property and if that doesn't exist a link, and if that doesn't exist an embedded collection, and if that doesn't exist it's an error? In ambiguous cases when you have a property 'y' and a link 'y', you could always default to the full syntax.

  2. dblock commented on Sep 18, 2014

    @dblock
    Collaborator

    Check out the changes in https://github.com/dblock/hyperclient/tree/delegation-of-methods, that is actually mergeable and accomplishes what I proposed above. I'll PR after #61 is merged.

  3. dblock commented on Sep 26, 2014

    @dblock
    Collaborator

    I PRed this as #63.

  4. dblock commented on Sep 30, 2014

    @dblock
    Collaborator

    Closing this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions