Mercurial > libervia-backend
comparison sat/plugins/plugin_comp_ap_gateway/constants.py @ 3846:cc13efdd8360
component AP gateway: return item when `item` URL is used:
a request on an `item` type URL will return the suitable cached item.
rel 370
author | Goffi <goffi@goffi.org> |
---|---|
date | Thu, 14 Jul 2022 12:55:30 +0200 |
parents | 65e5718e7710 |
children | 59fbb66b2923 |
comparison
equal
deleted
inserted
replaced
3845:4f9d4650eab5 | 3846:cc13efdd8360 |
---|---|
28 TYPE_FOLLOWING = "following" | 28 TYPE_FOLLOWING = "following" |
29 TYPE_ITEM = "item" | 29 TYPE_ITEM = "item" |
30 TYPE_TOMBSTONE = "Tombstone" | 30 TYPE_TOMBSTONE = "Tombstone" |
31 TYPE_MENTION = "Mention" | 31 TYPE_MENTION = "Mention" |
32 MEDIA_TYPE_AP = "application/activity+json" | 32 MEDIA_TYPE_AP = "application/activity+json" |
33 NS_AP_PUBLIC = "https://www.w3.org/ns/activitystreams#Public" | 33 NS_AP = "https://www.w3.org/ns/activitystreams" |
34 NS_AP_PUBLIC = f"{NS_AP}#Public" | |
34 # 3 values can be used, see https://www.w3.org/TR/activitypub/#public-addressing | 35 # 3 values can be used, see https://www.w3.org/TR/activitypub/#public-addressing |
35 PUBLIC_TUPLE = (NS_AP_PUBLIC, "as:Public", "Public") | 36 PUBLIC_TUPLE = (NS_AP_PUBLIC, "as:Public", "Public") |
36 AP_REQUEST_TYPES = { | 37 AP_REQUEST_TYPES = { |
37 "GET": {TYPE_ACTOR, TYPE_OUTBOX, TYPE_FOLLOWERS, TYPE_FOLLOWING}, | 38 "GET": {TYPE_ACTOR, TYPE_OUTBOX, TYPE_FOLLOWERS, TYPE_FOLLOWING}, |
38 "POST": {"inbox"}, | 39 "POST": {"inbox"}, |