Skip to content

Suggestion: API call to return connection between two profiles #12

@faceless2

Description

@faceless2

First issue, let's hope this is the right place for this. If not here, where?

I have a suggestion: adding a method to the API which would allow the relationship between two IDs would open up all sorts of interesting options for visualizers (including SlippyTree)

Something like

curl 'https://api.wikitree.com/api.php?action=getConnections&key1=Clemens-1&key2=Windsor-1&type=shortest'

[
  {
    "connections": [
      [
         {
           "Id": 5185,
           "Name": "Clemens-1"
         },
         {
           "Id: 5186,
           "Name": "Clemens-2",
           "relationship": "mother"
         },
         ...
         {
           "Id: 1234,
           "Name": "Windsor-1",
           "relationship":"daughter"
         }
       ]
    ]
  }
]

Returning an array of connections (to cater for there being more than one), and otherwise essentially presenting the same information we get on https://www.wikitree.com/index.php?title=Special:Connection

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions