kopia lustrzana https://github.com/dgtlmoon/changedetection.io
API - Adding page title link, bumping docs (#3431)
rodzic
b74b76c9f9
commit
6e1f5a8503
|
@ -88,6 +88,8 @@ class Watch(Resource):
|
||||||
# attr .last_changed will check for the last written text snapshot on change
|
# attr .last_changed will check for the last written text snapshot on change
|
||||||
watch['last_changed'] = watch.last_changed
|
watch['last_changed'] = watch.last_changed
|
||||||
watch['viewed'] = watch.viewed
|
watch['viewed'] = watch.viewed
|
||||||
|
watch['link'] = watch.link,
|
||||||
|
|
||||||
return watch
|
return watch
|
||||||
|
|
||||||
@auth.check_token
|
@auth.check_token
|
||||||
|
@ -273,6 +275,8 @@ class CreateWatch(Resource):
|
||||||
'last_changed': watch.last_changed,
|
'last_changed': watch.last_changed,
|
||||||
'last_checked': watch['last_checked'],
|
'last_checked': watch['last_checked'],
|
||||||
'last_error': watch['last_error'],
|
'last_error': watch['last_error'],
|
||||||
|
'link': watch.link,
|
||||||
|
'page_title': watch['page_title'],
|
||||||
'title': watch['title'],
|
'title': watch['title'],
|
||||||
'url': watch['url'],
|
'url': watch['url'],
|
||||||
'viewed': watch.viewed
|
'viewed': watch.viewed
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
openapi: 3.0.4
|
openapi: 3.1.0
|
||||||
info:
|
info:
|
||||||
title: ChangeDetection.io API
|
title: ChangeDetection.io API
|
||||||
description: |
|
description: |
|
||||||
|
@ -28,7 +28,7 @@ info:
|
||||||
|
|
||||||
For example: `x-api-key: YOUR_API_KEY`
|
For example: `x-api-key: YOUR_API_KEY`
|
||||||
|
|
||||||
version: 0.1.0
|
version: 0.1.1
|
||||||
contact:
|
contact:
|
||||||
name: ChangeDetection.io
|
name: ChangeDetection.io
|
||||||
url: https://github.com/dgtlmoon/changedetection.io
|
url: https://github.com/dgtlmoon/changedetection.io
|
||||||
|
@ -129,7 +129,7 @@ components:
|
||||||
maxLength: 5000
|
maxLength: 5000
|
||||||
title:
|
title:
|
||||||
type: string
|
type: string
|
||||||
description: Custom title for the web page change monitor (watch)
|
description: Custom title for the web page change monitor (watch), not to be confused with page_title
|
||||||
maxLength: 5000
|
maxLength: 5000
|
||||||
tag:
|
tag:
|
||||||
type: string
|
type: string
|
||||||
|
@ -255,6 +255,11 @@ components:
|
||||||
type: integer
|
type: integer
|
||||||
description: Unix timestamp in seconds of the last time the watch was viewed. Setting it to a value higher than `last_changed` in the "Update watch" endpoint marks the watch as viewed.
|
description: Unix timestamp in seconds of the last time the watch was viewed. Setting it to a value higher than `last_changed` in the "Update watch" endpoint marks the watch as viewed.
|
||||||
minimum: 0
|
minimum: 0
|
||||||
|
link:
|
||||||
|
type: string
|
||||||
|
format: string
|
||||||
|
description: The watch URL rendered in case of any Jinja2 markup, always use this for listing.
|
||||||
|
readOnly: true
|
||||||
|
|
||||||
CreateWatch:
|
CreateWatch:
|
||||||
allOf:
|
allOf:
|
||||||
|
@ -395,9 +400,10 @@ paths:
|
||||||
example:
|
example:
|
||||||
"095be615-a8ad-4c33-8e9c-c7612fbf6c9f":
|
"095be615-a8ad-4c33-8e9c-c7612fbf6c9f":
|
||||||
uuid: "095be615-a8ad-4c33-8e9c-c7612fbf6c9f"
|
uuid: "095be615-a8ad-4c33-8e9c-c7612fbf6c9f"
|
||||||
url: "http://example.com"
|
url: "http://example.com?id={{1+1}} - the raw URL"
|
||||||
title: "Example Website Monitor"
|
link: "http://example.com?id=2 - the rendered URL, always use this for listing."
|
||||||
tag: "550e8400-e29b-41d4-a716-446655440000"
|
title: "Example Website Monitor - manually entered title/description"
|
||||||
|
page_title: "The HTML <title> from the page"
|
||||||
tags: ["550e8400-e29b-41d4-a716-446655440000"]
|
tags: ["550e8400-e29b-41d4-a716-446655440000"]
|
||||||
paused: false
|
paused: false
|
||||||
muted: false
|
muted: false
|
||||||
|
@ -407,9 +413,10 @@ paths:
|
||||||
last_changed: 1640995200
|
last_changed: 1640995200
|
||||||
"7c9e6b8d-f2a1-4e5c-9d3b-8a7f6e4c2d1a":
|
"7c9e6b8d-f2a1-4e5c-9d3b-8a7f6e4c2d1a":
|
||||||
uuid: "7c9e6b8d-f2a1-4e5c-9d3b-8a7f6e4c2d1a"
|
uuid: "7c9e6b8d-f2a1-4e5c-9d3b-8a7f6e4c2d1a"
|
||||||
url: "https://news.example.org"
|
url: "http://example.com?id={{1+1}} - the raw URL"
|
||||||
title: "News Site Tracker"
|
link: "http://example.com?id=2 - the rendered URL, always use this for listing."
|
||||||
tag: "330e8400-e29b-41d4-a716-446655440001"
|
title: "News Site Tracker - manually entered title/description"
|
||||||
|
page_title: "The HTML <title> from the page"
|
||||||
tags: ["330e8400-e29b-41d4-a716-446655440001"]
|
tags: ["330e8400-e29b-41d4-a716-446655440001"]
|
||||||
paused: false
|
paused: false
|
||||||
muted: true
|
muted: true
|
||||||
|
@ -1215,7 +1222,6 @@ paths:
|
||||||
uuid: "095be615-a8ad-4c33-8e9c-c7612fbf6c9f"
|
uuid: "095be615-a8ad-4c33-8e9c-c7612fbf6c9f"
|
||||||
url: "http://example.com"
|
url: "http://example.com"
|
||||||
title: "Example Website Monitor"
|
title: "Example Website Monitor"
|
||||||
tag: "550e8400-e29b-41d4-a716-446655440000"
|
|
||||||
tags: ["550e8400-e29b-41d4-a716-446655440000"]
|
tags: ["550e8400-e29b-41d4-a716-446655440000"]
|
||||||
paused: false
|
paused: false
|
||||||
muted: false
|
muted: false
|
||||||
|
|
Ładowanie…
Reference in New Issue