-
Notifications
You must be signed in to change notification settings - Fork 0
/
__main__.py
69 lines (67 loc) · 1.28 KB
/
__main__.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
from pdp_graphql import PDPGraphQL
pdp = PDPGraphQL("a7e5d1e9-4d50-454e-9fd0-2a95263e06da", "3sL8Q~VAtiwAkfPmGlRlJ2~QZH3rJOk.-.XWiaf1")
response = pdp.query(
"""{
assets(
identifiers: [
"urn:srf:video:ca14da25-614e-4614-b08d-bba715b33205"
"urn:srf:article:20097176"
]
) {
identifier
hasProvenance
hasType
... on Item {
duration
dateModified
hasProvenance
title
hasProductionType
hasProducer
hasUsageRestrictions
hasParentEditorialObject {
dateBroadcast
dateProduced
dateModified
}
}
... on Document {
title
dateReleased
commentsAllowed
isLongForm
kicker
abstract
hasPublisher
hasRelatedTextLine
hasContributor {
hasType
... on Person {
hasRole
givenName
familyName
agentName
}
... on Department {
agentName
}
... on Team {
agentName
}
}
hasRelatedEditorialObject {
identifier
title
duration
}
hasGenre {
identifier
prefLabel
}
}
}
}
"""
)
# Prints the response of the pdp api
print(response)