Skip to content

Commit de929bb

Browse files
committed
WebAPI samples (#1423)
Based on previous work by @nickevansuk - Replace Google Knowledge Graph API with YouTube API (#2635) - Some minor bugfixes to end up with compliant json Closes: #1423 Superseedes: #2635
1 parent 4264743 commit de929bb

File tree

2 files changed

+15
-24
lines changed

2 files changed

+15
-24
lines changed

data/ext/pending/issue-1423-examples.txt

Lines changed: 15 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@ JSON:
1818
{
1919
"@context": "https://schema.org/",
2020
"@type": "WebAPI",
21-
"name": "Google Knowledge Graph Search API",
22-
"description": "The Knowledge Graph Search API lets you find entities in the Google Knowledge Graph. The API uses standard schema.org types and is compliant with the JSON-LD specification.",
23-
"url": "https://developers.google.com/knowledge-graph/",
24-
"documentation": "https://developers.google.com/knowledge-graph/reference/rest/v1",
25-
"termsOfService": "https://developers.google.com/knowledge-graph/terms",
21+
"name": "YouTube API",
22+
"description": "The YouTube Data API lets you incorporate functions normally executed on the YouTube website into your own website or application. The following sections identify the different types of resources that you can retrieve using the API. The API also supports methods to insert, update, or delete many of these resources.",
23+
"url": "https://www.googleapis.com/youtube/v3",
24+
"documentation": "https://developers.google.com/youtube/v3/docs",
25+
"termsOfService": "https://developers.google.com/youtube/terms/api-services-terms-of-service",
2626
"provider": {
2727
"@type": "Organization",
2828
"name": "Google Inc."
@@ -51,25 +51,20 @@ JSON:
5151
{
5252
"@context": "https://schema.org/",
5353
"@type": "WebAPI",
54-
"name": "Google Knowledge Graph Search API",
55-
"description": "The Knowledge Graph Search API lets you find entities in the Google Knowledge Graph. The API uses standard schema.org types and is compliant with the JSON-LD specification.",
56-
"documentation": "https://developers.google.com/knowledge-graph/reference/rest/v1",
54+
"name": "YouTube API",
55+
"description": "The YouTube Data API lets you incorporate functions normally executed on the YouTube website into your own website or application. The following sections identify the different types of resources that you can retrieve using the API. The API also supports methods to insert, update, or delete many of these resources.",
56+
"documentation": "https://developers.google.com/youtube/v3/docs",
5757
"endpointDescription": [
5858
{
5959
"@type": "CreativeWork",
6060
"encodingFormat": "application/json",
61-
"url": "https://kgsearch.googleapis.com/$discovery/rest?version=v1"
62-
},
63-
{
64-
"@type": "CreativeWork",
65-
"encodingFormat": "application/vnd.oai.openapi+json;version=3.0",
66-
"url": "https://api.apis.guru/v2/specs/googleapis.com/kgsearch/v1/openapi.json"
61+
"url": "https://www.googleapis.com/youtube/v3"
6762
}
6863
],
69-
"url": "https://developers.google.com/knowledge-graph/",
70-
"termsOfService": "https://developers.google.com/knowledge-graph/terms",
64+
"url": "https://developers.google.com/youtube/v3",
65+
"termsOfService": "https://developers.google.com/youtube/terms/api-services-terms-of-service",
7166
"logo": "https://www.google.com/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png",
72-
"license": "https://creativecommons.org/licenses/by/3.0/",
67+
"license": "https://creativecommons.org/licenses/by/4.0/",
7368
"provider": {
7469
"@type": "Organization",
7570
"name": "Google Inc.",
@@ -79,9 +74,9 @@ JSON:
7974
"name": "Google",
8075
"url": "https://google.com"
8176
}
82-
],
77+
]
8378
},
84-
"version": "1.0.0",
79+
"version": "3.0.0",
8580
"apiTransport": [
8681
"HTTP",
8782
"HTTPS"
@@ -93,7 +88,7 @@ JSON:
9388
{
9489
"@type": "ConsumeAction",
9590
"name": "API Client Registration",
96-
"target": "https://developers.google.com/knowledge-graph/how-tos/authorizing"
91+
"target": "https://console.cloud.google.com/apis/credentials"
9792
}
9893
]
9994
}

data/ext/pending/issue-1423.ttl

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ The [[documentation]] and [[endpointDescription]] properties give specific detai
2727
rdfs:label "endpointDescription" ;
2828
:category "issue-1423" ;
2929
:domainIncludes :WebAPI ;
30-
:isPartOf <http://pending.schema.org> ;
3130
:rangeIncludes :CreativeWork ;
3231
:source <https://github.com/schemaorg/schemaorg/issues/1423> ;
3332
rdfs:comment """Machine-readable API definition of the services available via the [[WebAPI]], including their operations, parameters etc.
@@ -49,7 +48,6 @@ Machine-readable formats include OpenAPI (Swagger) description, an OGC GetCapabi
4948
:category "issue-1423" ;
5049
:domainIncludes :CreativeWork,
5150
:WebAPI ;
52-
:isPartOf <http://pending.schema.org> ;
5351
:rangeIncludes :URL ;
5452
:source <https://github.com/schemaorg/schemaorg/issues/1423> ;
5553
rdfs:comment """The URL reference of an established standard to which the [[Thing]] described conforms.
@@ -60,7 +58,6 @@ Machine-readable formats include OpenAPI (Swagger) description, an OGC GetCapabi
6058
:category "issue-1423" ;
6159
:domainIncludes :Dataset,
6260
:DataDownload ;
63-
:isPartOf <http://pending.schema.org> ;
6461
:rangeIncludes :WebAPI ;
6562
:source <https://github.com/schemaorg/schemaorg/issues/1423> ;
6663
rdfs:comment "An API that provides access to the dataset." .
@@ -69,7 +66,6 @@ Machine-readable formats include OpenAPI (Swagger) description, an OGC GetCapabi
6966
rdfs:label "apiTransport" ;
7067
:category "issue-1423" ;
7168
:domainIncludes :WebAPI ;
72-
:isPartOf <http://pending.schema.org> ;
7369
:rangeIncludes :Text ;
7470
:source <https://github.com/schemaorg/schemaorg/issues/1423> ;
7571
rdfs:comment "The type of transport used for the API, such as `HTTP`, `HTTPS`, `SMTP`, `MQTT`, `WS`, `WSS`, `gRPC`." .

0 commit comments

Comments
 (0)