indieweb / indieweb/micropub-extensions

Query for contacts

Open
#39 7 comments 0 reactions 0 assignees View on GitHub
Dominant language
No language data
Stars
12
Forks
1
PR merge metrics
No merged PRs in 30d

Description

Copying this here [from the wiki](https://indieweb.org/Micropub-extensions#Query_for_contacts).

For apps to be able to autocomplete by known contacts we need some way to query these values. This would be very useful for person-tag

This is supported by the Drupal IndieWeb module and Indigenous for Android.

* Discovery of the endpoint (as in, it exists), happens through the query for supported queries, see https://github.com/indieweb/micropub-extensions/issues/7
* q=contact&search=aaron would do a search for any field which matches .*aaron.* thereby allowing the client application to autosuggest and insert links.
* q=contact would return the complete list, which should only be so that clients (e.g. Indigenous) can cache all contacts locally.
* The response in JSON is a list of h-cards

**Example response**

``q=contact``

Note: the _internal_url can be used for updating the contacts via micropub

```
"contacts": [
{
"name": "Kevin Marks",
"photo": "http://known.kevinmarks.com/file/9255656669173b7867ab839ee6556f9e",
"url": "http://known.kevinmarks.com/profile/kevinmarks",
"nickname": "kevinmarks",
"_internal_url": "https://example.com/contact/1",
},
{
"name": "Kristof De Jaeger",
"photo": "https://realize.be/vue/images/swentel-200.png",
"url": "https://realize.be",
"nickname": "swentel",
"_internal_url": "https://example.com/contact/2",
},
]
```

**Implementations**

Clients:

* Indigenous for Android - see https://realize.be/notes/1970 - it fetches the full list, filtering happens in the client. Create, update and delete are also possible using micropub so you can manage your contacts.

Servers:

* IndieWeb for Drupal

Contributor guide

Open the contributing guide

Research direction

Read the linked query-for-supported-queries issue first, then compare the requested q=contact behavior and h-card JSON example with the Drupal IndieWeb module and Indigenous for Android implementations mentioned here. Done means agreeing on and documenting endpoint discovery, search and full-list responses, and the role of _internal_url.

Written by the indexing model from the issue text.

Assessment

Domain
api
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.