ntfy.sh

Convert ntfy.sh publish JSON format into Atom entry

{
	"type": "object",
	"xml": {
		"name": "entry",
		"namespace": "http://www.w3.org/2005/Atom"
	},
	"properties": {
		"title": { "type": "string" },
		"message": {
			"type": "string",
			"xml": { "name": "content" }
		},
		"tags": {
			"type": "array",
			"items": {
				"type": "string",
				"xml": {
					"name": "category",
					"x_single_attribute": "term"
				}
			}
		},
		"attach": {
			"type": "string",
			"xml": {
				"name": "link",
				"x_single_attribute": "href"
			}
		},
		"click": {
			"type": "string",
			"xml": {
				"name": "link",
				"x_single_attribute": "href"
			}
		},
		"actions": {
			"type": "array",
			"items": {
				"type": "object",
				"xml": { "name": "link" },
				"properties": {
					"label": {
						"type": "string",
						"xml": {
							"name": "title",
							"attribute": true
						}
					},
					"url": {
						"type": "string",
						"xml": {
							"name": "href",
							"attribute": true
						}
					}
				}
			}
		}
	}
}

builds.sr.ht

Not quite working yet due to https://lists.sr.ht/~sircmpwn/sr.ht-discuss/%3CZFcbdOBEGfhA1gI1%40singpolyma-beefy.lan%3E

{
	"type": "object",
	"xml": {
		"name": "entry",
		"namespace": "http://www.w3.org/2005/Atom"
	},
	"properties": {
		"id": { "type": "integer" },
		"tags": {
			"type": "string",
			"xml": { "name": "title" }
		},
		"owner": {
			"type": "object",
			"xml": { "name": "author" },
			"properties": {
				"name": { "type": "string" }
			}
		},
		"note": {
			"type": "string",
			"xml": { "name": "content" }
		},
		"setup_log": {
			"type": "string",
			"xml": {
				"name": "link",
				"x_single_attribute": "href"
			}
		},
		"status": {
			"type": "string",
			"xml": {
				"name": "category",
				"x_single_attribute": "term"
			}
		}
	}
}

DatamapperSchemas (last edited 2023-127 03:34:27 by Singpolyma)