Skip to content
This repository was archived by the owner on Jul 25, 2018. It is now read-only.
This repository was archived by the owner on Jul 25, 2018. It is now read-only.

API for Relationships widget #33

Description

@lustoykov

See MusicConnectionMachine/RelationshipsG3#27

I don't have rights, so please add Assigness and Deadline: 02.04.2017

so yesterdey me, @martomi and @vviro had a meeting and here is what came out of the discussion

The basic idea is that we want to display in a somewhat-table view non-trivial relationships (almost like a surprise-fun-fact table - Mozart | Liked | Getting Drunk)

Entity | Relation | Entity

When a user on the IMSLP site and exploring our widget, one of the entities is always fixed (for instance Mozart).

Now we want to have a search bar, where user can type in. The search bar should be very smart and display autosuggestions in form of:

Relations Suggestions

  • Entity1
  • Entity2
    ...

Entities Suggestions

  • Entity1
  • Entity2
    ...

Whenever a user clicks one of the suggestions, we'd make an api call with Entity | Entity expecting relations as response or Entity | Relations expecting entities as response to display the table view Entity | Relation | Entity

Requirement: for the autosuggestions

  • the API GET /autosuggest should accept:
    a single param query: { primaryEntity, searchInput, }

  • the API should deliver:

{ 
   entitites: [ { title: '...', importance: '...', confidence: '...' }, { ... } ]
   relations: [ { title: '...', importance: '...', confidence: '...' }, { ... } ]
}

at least title is required, importance and confidence would be nice.


Requirement: for data display

  • The API GET /relations should accept:
    a single param query: { primaryEntity: String, secondaryEntity: String, }

and return

{ 
   relations: [ { title: '...', importance: '...', confidence: '...' }, { ... } ]
}
  • The API /entities should accept:
    a single param query: { primaryEntity: String, relation: String, }

and return

{ 
   entities: [ { title: '...', importance: '...', confidence: '...' }, { ... } ]
}

@martomi can you double check if the API as defined is OK? Please edit the post directly if I missed something.

@vviro also encourages us to talk to him more often.

Activity

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

Metadata

Metadata

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions