From API directory to Semantic web

Post on 13-Apr-2017

39 views 0 download

Transcript of From API directory to Semantic web

https://www.ted.com/talks/tim_berners_lee_on_the_next_web

Google Knowledge Graph

Twitter?Instagram?

Gmail?Uber?

AirBnB?...

API version

Supported protocols

Method

Method description

Link to response description

required?

Argument type

API characteristics

Method characteristics

Response

Arguments

Nobody Ever Got Fired for Buying IBMGenerating Docs & SDKs

DATA

METADATA

No changes to payload

SPEC

https://paw.cloud/

“JSON-LD and Why I Hate the Semantic Web” by Manu Spornyhttp://manu.sporny.org/2014/json-ld-origins-2/

If you want to make the Semantic Web a reality, stop making the case for it and spend your time doing something more useful, like actually making machines smarter or helping people publish data in a way that’s useful to them.

SemanticWeb

https://www.youtube.com/user/msporny/videos

http://json-ld.org/playground/

{ “First name”: “John”, “Surname”: “Smith”}

{ “Name”: “John”, “Surname”: “Smith”}

{ “Full name”: “John Smith”}

Data incompatibility

Schema incompatibility{ “type”: “object”, “properties”: { “First name”: { “type”: “string” }, “Surname”: { “type”: “string” } }}

{ “type”: “object”, “properties”: { “Name”: { “type”: “string” }, “Surname”: { “type”: “string” } }}

{ “type”: “object”, “properties”: { “Full name”: { “type”: “string” } }}

Stage #1: Scalar types

{ “type”: “object”, “properties”: { “First name”: { “type”: “string” }, “Surname”: { “type”: “string” } }}

{ “type”: “object”, “properties”: { “First name”: { “$ref”:

“http://apis.guru/types/name#” }, “Surname”: { “$ref”:

“http://apis.guru/types/surname#” } }}

● List of countries● Language codes● Postal codes● Phone codes● MIME types● etc.

{ “type”: “object”, “properties”: { “First name”: { “$ref”: “http://apis.guru/ types/name#” }, “Surname”: { “$ref”: “http://apis.guru/ types/surname#” } }}

{ “$ref”: “http://apis.guru/ types/fullname/15#”}

Stage #2: Complex types

Stage #3: type converters

function (data) { return { “Full name”: data[“First name”] + data[“Surname”] };}

{ “First name”: “John”, “Surname”: “Smith”}

{ “Full name”: “John Smith”}

ivan.goncharov.ua@gmail.com ivangon4arovhttps://git.io/APIs.guru

@APIs_guru

Join the movement