Re: [w3c/manifest] Add field: note_taking { new_note_url: <URL> } (#965)

I like how this is expanding & generalizing. One of the other things we’ve discussed in the past is the ability of sites to advertise their ability to participate as consumers or providers of information like this. It would probably make sense to define a system that worked in both ways as an addendum to the Manifest in its own spec, much like [Share Target](https://w3c.github.io/web-share-target/) and [App Info](https://www.w3.org/TR/manifest-app-info/). Maybe something like this (based on @phoglenix’s concept):

```json
"integrations": {
  "notes": {
    "create": "<URL>",    // creates a new note via POST
    "read":   "<URL>",    // all provided notes via GET (JSON? XML?)
    "update": "<URL>",    // updates existing note via POST/PUT/PATCH
    "delete": "<URL>"     // removes a note via POST or DELETE
  },
  "calendar": {
    "create": "<URL>",    // creates a new note via POST
    "read":   "<URL>",    // all provided notes via GET (iCal format?)
    "update": "<URL>",    // updates calendar item via POST/PUT/PATCH
    "delete": "<URL>"     // removes a calendar item via POST or DELETE
  },
  …
}
```

Each URL could be a URL and each key would be optional, so if you only wanted to offer creation, you just define `create`, but if you want r/w you could do `create`, `read`, and `update`. I think most apps would shy away from `delete`, but it wouldn’t hurt to offer it. It might even be possible to allow for more configuration of the fetch by turning the URL into an object (like Share Target does) so devs could define params, verbs, etc.

To me, this feels much more manageable in the long term because it’s a one member extension to the manifest that can evolve independently, with each integration defining it’s own data contract (like Share Target does). Honestly, a generalized approach like this could have worked well for Share Target too:

```json
"integrations": {
  "share": {
    "create": {
      "action": "share.html",
      "params": {
        "title": "name",
        "text":  "description",
        "url":   "link"
      }
    }
  }
}
```

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/manifest/issues/965#issuecomment-796988182

Received on Thursday, 11 March 2021 19:31:23 UTC