586
edits
| m (moved Tobias W. (APIs, JSON) to IFD:WApplications/Vortraege/APIs JSON: Proper subpage) | |||
| (10 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
| =API – Application Programming Interface= | =API – Application Programming Interface= | ||
| [http://www.slideshare.net/augentier/api-vortrag Präsentation auf slideshare.net] | |||
| ==Übersicht== | ==Übersicht== | ||
| * Facebook – Graph API | * Facebook – Graph API | ||
| Line 5: | Line 6: | ||
| * YouTube – Data API | * YouTube – Data API | ||
| ==[[JSON]]== | ==[[JSON]]== | ||
| ===Struktur  | ===Struktur von JSON=== | ||
| <source lang="javascript" > | <source lang="javascript" > | ||
| { | { | ||
| Line 19: | Line 20: | ||
| } | } | ||
| </source> | </source> | ||
| '' | ''Size: 169 Bytes'' | ||
| ===Vergleich zu XML=== | ===Vergleich zu XML=== | ||
| <source lang="xml"> | <source lang="xml"> | ||
| Line 34: | Line 36: | ||
| </object> | </object> | ||
| </source> | </source> | ||
| '' | ''Size: 226 Bytes'' | ||
| ===Vorteile gegenüber XML=== | |||
| Kleinere Datei, verschiedene Daten-Typen (string, number, object, array, boolean, empty), einfaches Parsing in JavaScript, PHP, Objective-C usw. | |||
| ==Parsing JSON== | ==Parsing JSON== | ||
| ===jQuery=== | ===jQuery=== | ||
| Line 76: | Line 79: | ||
| } | } | ||
| </source> | </source> | ||
| '' | ''Size: 1.16 KB'' | ||
| ===Albums=== | ===Albums=== | ||
| [http://graph.facebook.com/mercedesbenzdeutschland/albums graph.facebook.com/mercedesbenzdeutschland/albums] | [http://graph.facebook.com/mercedesbenzdeutschland/albums graph.facebook.com/mercedesbenzdeutschland/albums] | ||
| Line 120: | Line 123: | ||
| } | } | ||
| </source> | </source> | ||
| '' | ''Size: 1.16 KB'' | ||
| ===Album Photos=== | ===Album Photos=== | ||
| Line 208: | Line 211: | ||
| ===Reference=== | ===Reference=== | ||
| [http://developers.facebook.com/docs/reference/api/ developers.facebook.com/docs/reference/api/] | [http://developers.facebook.com/docs/reference/api/ developers.facebook.com/docs/reference/api/] | ||
| ===Example=== | |||
| [[File:Example_facebook_api.zip|Download Example]] | |||
| ==Twitter== | ==Twitter== | ||
| [http://api.twitter.com/1/statuses/user_timeline.json?screen_name=saschalobo api.twitter.com/1/statuses/user_timeline.json?screen_name=saschalobo] | [http://api.twitter.com/1/statuses/user_timeline.json?screen_name=saschalobo api.twitter.com/1/statuses/user_timeline.json?screen_name=saschalobo] | ||
| Line 273: | Line 279: | ||
| ===Reference=== | ===Reference=== | ||
| [http://code.google.com/intl/en-UK/apis/youtube/2.0/reference.html code.google.com/intl/en-UK/apis/youtube/2.0/reference.html] | [http://code.google.com/intl/en-UK/apis/youtube/2.0/reference.html code.google.com/intl/en-UK/apis/youtube/2.0/reference.html] | ||
| ===Example=== | |||
| [[File:Example_youtube_api.zip|Download Example]] | |||
edits