Differences between revisions 1 and 2
Revision 1 as of 2023-127 02:59:37
Size: 1114
Editor: Singpolyma
Comment: add schema for ntfy.sh json
Revision 2 as of 2023-127 03:34:14
Size: 1949
Editor: Singpolyma
Comment: add builds.sr.ht webhook mapping
Deletions are marked like this. Additions are marked like this.
Line 68: Line 68:

# 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"
   }
  }
 }
}
}}}

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
						}
					}
				}
			}
		}
	}
}
  1. 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)