Anda di halaman 1dari 26

PENGEMBANGAN TEKONOLOGI WEB

API DALAM PLATFORM WEB

Dosen Pengampu: Agus Hermanto, S.Kom.,M.MT.,ITIL

Nama:
Ardian Permana Putera 1461600119

FAKULTAS TEKNIK INFORMATIKA


UNIVERSITAS 17 AGUSTUS 1945
SURABAYA
2018
Daftar Api :
No Nama Web Api
1 Google Maps Distance Matrix API
2 Google Maps Elevation API
3 Google Maps Directions API
4 Google Maps Geocoding API
5 Google Maps Geolocation API
6 Google Maps Roads API ( Jalan Terdekat )
7 Google Maps Time Zone API
8 Google Places API Web Service
9 Google Cloud Translation API
10 Github.com (Request The Authenticated User )
11 Google Shortener ( Shortener Url Api )
12 Google Shortener ( Expand Url Api )
13 Google Book ( Book Search Api )
14 Blogger (Retrieving blog with blog id Api )
15 Blogger (Retrieving blog with url blog Api )
16 Blogger (Retrieving a specific post Api )
17 Blogger (Adding a post Api )
18 Blogger (Delete a post Api )
19 Facebook Graph Api (Get Fans Page Name)
20 Facebook Graph Api (Get Feed Post Page)
21 domainsdb.info api (Check Status of registered domain)
1. Google Maps Distance Matrix API
Google Maps Distance Matrix API Adalah layanan yang menyediakan waktu dan
jarak perjalanan untuk matriks tempat asal dan tujuan, berdasarkan rute yang
direkomendasikan di antara titik awal dan akhir.

Berikut merupakan contoh cara request api pada Google Distance Matrix Api :

https://maps.googleapis.com/maps/api/distancematrix/json?units=i
mperial&origins=Washington,DC&destinations=New+York+City,NY&key=
YOUR_API_KEY

NB : penggunaan Api pada Google Maps Distance Matrix API harus disertai Api
key yang di dapat dari google agar bisa menggunakannya

Berikut merupakan contoh respon api pada Google Distance Matrix Api :

{
"destination_addresses" : [ "New York, NY, USA" ],
"origin_addresses" : [ "Washington, DC, USA" ],
"rows" : [
{
"elements" : [
{
"distance" : {
"text" : "225 mi",
"value" : 361715
},
"duration" : {
"text" : "3 hours 49 mins",
"value" : 13725
},
"status" : "OK"
}
]
}
],
"status" : "OK"
}
2. Google Maps Elevation API
Google Maps Elevation API menyediakan data elevasi untuk semua lokasi di
permukaan bumi, termasuk lokasi kedalaman di dasar laut (yang akan
mengembalikan nilai negatif).

Berikut merupakan contoh cara request api pada Google Maps Elevation API:

https://maps.googleapis.com/maps/api/elevation/json?locations=39.
7391536,-104.9847034&key= YOUR_API_KEY

NB : penggunaan Api pada Google Maps Elevation API harus disertai Api key yang
di dapat dari google agar bisa menggunakannya

Berikut merupakan contoh respon api pada Google Maps Elevation API:

{
"results" : [
{
"elevation" : 1608.637939453125,
"location" : {
"lat" : 39.73915360,
"lng" : -104.98470340
},
"resolution" : 4.771975994110107
}
],
"status" : "OK"
}

3. Google Maps Directions API


Google Maps Directions API Adalah layanan yang menghitung arah antar lokasi.
Anda bisa menelusuri arah untuk beberapa moda transportasi, termasuk angkutan
umum, mengemudi, berjalan atau bersepeda.

Berikut merupakan contoh cara request api pada Google Maps Elevation API:

https://maps.googleapis.com/maps/api/directions/json?origin=Disn
eyland&destination=Universal+Studios+Hollywood4&key= YOUR_API_KEY
NB : penggunaan Api pada Google Maps Directions API harus disertai Api key
yang di dapat dari google agar bisa menggunakannya

Berikut merupakan contoh respon api pada Google Maps Directions API:

{
"geocoded_waypoints" : [
{
"geocoder_status" : "OK",
"place_id" : "ChIJRVY_etDX3IARGYLVpoq7f68",
"types" : [
"bus_station",
"transit_station",
"point_of_interest",
"establishment"
]
},
{
"geocoder_status" : "OK",
"partial_match" : true,
"place_id" : "ChIJp2Mn4E2-woARQS2FILlxUzk",
"types" : [ "route" ]
}
],
"routes" : [
{
"bounds" : {
"northeast" : {
"lat" : 34.1330949,
"lng" : -117.9143879
},
"southwest" : {
"lat" : 33.8068768,
"lng" : -118.3527671
}
},
"copyrights" : "Map data ©2016 Google",
"legs" : [
{
"distance" : {
"text" : "35.9 mi",
"value" : 57824
},
"duration" : {
"text" : "51 mins",
"value" : 3062
},
"end_address" : "Universal Studios Blvd, Los
Angeles, CA 90068, USA",
"end_location" : {
"lat" : 34.1330949,
"lng" : -118.3524442
},
"start_address" : "Disneyland (Harbor Blvd.), S
Harbor Blvd, Anaheim, CA 92802, USA",
"start_location" : {
"lat" : 33.8098177,
"lng" : -117.9154353
},

... Additional results truncated in this example[] ...


"overview_polyline" : {
"points" :
"knjmEnjunUbKCfEA?_@]@kMBeE@qIIoF@wH@eFFk@WOUI_@?u@j@k@`@EXLTZHh@
Y`AgApAaCrCUd@cDpDuAtAoApA{YlZiBdBaIhGkFrDeCtBuFxFmIdJmOjPaChDeBl
DiAdD}ApGcDxU}@hEmAxD}[tt@yNb\\yBdEqFnJqB~DeFxMgK~VsMr[uKzVoCxEsE
tG}BzCkHhKWh@]t@{AxEcClLkCjLi@`CwBfHaEzJuBdEyEhIaBnCiF|K_Oz\\
{MdZwAbDaKbUiB|CgCnDkDbEiE|FqBlDsLdXqQra@kX|m@aF|KcHt
Lm@pAaE~JcTxh@w\\`v@gQv`@}F`MqK`PeGzIyGfJiG~GeLhLgIpIcE~FsDrHcFfL
qDzH{CxEwAbBgC|B}F|DiQzKsbBdeA{k@~\\oc@bWoKjGaEzCoEzEwDxFsUh^wJfO
ySx[uBnCgCbCoFlDmDvAiCr@eRzDuNxC_EvAiFpCaC|AqGpEwHzFoQnQoTrTqBlCy
DnGmCfEmDpDyGzGsIzHuZzYwBpBsC`CqBlAsBbAqCxAoBrAqDdDcNfMgHbHiPtReB
tCkD|GqAhBwBzBsG~FoAhAaCbDeBvD_BlEyM``@uBvKiA~DmAlCkA|B}@lBcChHoJ
nXcB`GoAnIS~CIjFDd]A|QMlD{@jH[vAk@`CoGxRgPzf@aBbHoB~HeMx^eDtJ}BnG
{DhJU`@mBzCoCjDaAx@mAnAgCnBmAp@uAj@{Cr@wBPkB@kBSsEW{GV}BEeCWyAWwH
s@qH?
cIHkDXuDn@mCt@mE`BsH|CyAp@}AdAaAtAy@lBg@pCa@jE]fEcBhR
q@pJKlCk@hLFrB@lD_@xCeA`DoBxDaHvM_FzImDzFeCpDeC|CkExDiJrHcBtAkDpD
wObVuCpFeCdHoIl\\uBjIuClJsEvMyDbMqAhEoDlJ{C|J}FlZuBfLyDlXwB~QkArG
_AnDiAxC{G|OgEdLaE`LkBbEwG~KgHnLoEjGgDxCaC`BuJdFkFtCgCnBuClD_HdMq
EzHcBpB_C|BuEzCmPlIuE|B_EtDeBhCgAdCw@rCi@|DSfECrCAdCS~Di@jDYhA_Al
C{AxCcL`U{GvM_DjFkBzBsB`BqDhBaEfAsTvEmEr@iCr@qDrAiFnCcEzCaE~D_@Jm
FdGQDwBvCeErEoD|BcFjC}DbEuD~D`@Zr@h@?d@Wr@}@vAgCbEaHfMqA`Cy@dAg@b
AO`@gCi@w@W"
},
"summary" : "I-5 N and US-101 N",
"warnings" : [],
"waypoint_order" : []
}
],
"status" : "OK"
}
4. Google Maps Geocoding API
Google Maps Geocoding API Adalah layanan yang menyediakan geocoding dan
geocoding terbalik dari alamat.
Geocoding adalah proses mengonversi alamat (seperti alamat jalan) menjadi
koordinat geografis (seperti lintang dan bujur), yang bisa Anda gunakan untuk
menempatkan marker pada peta, atau memosisikan peta.

Berikut merupakan contoh cara request api pada Google Maps Geocoding API:

https://maps.googleapis.com/maps/api/geocode/json?address=1600+Am
phitheatre+Parkway,+Mountain+View,+CA&key= YOUR_API_KEY

NB : penggunaan Api pada Google Maps Geocoding API harus disertai Api key
yang di dapat dari google agar bisa menggunakannya

Berikut merupakan contoh respon api pada Google Maps Geocoding API:

{
"results" : [
{
"address_components" : [
{
"long_name" : "1600",
"short_name" : "1600",
"types" : [ "street_number" ]
},
{
"long_name" : "Amphitheatre Pkwy",
"short_name" : "Amphitheatre Pkwy",
"types" : [ "route" ]
},
{
"long_name" : "Mountain View",
"short_name" : "Mountain View",
"types" : [ "locality", "political" ]
},
{
"long_name" : "Santa Clara County",
"short_name" : "Santa Clara County",
"types" : [ "administrative_area_level_2",
"political" ]
},
{
"long_name" : "United States",
"short_name" : "US",
"types" : [ "country", "political" ]
},
{
"long_name" : "94043",
"short_name" : "94043",
"types" : [ "postal_code" ]
}
],
"formatted_address" : "1600 Amphitheatre Parkway,
Mountain View, CA 94043, USA",
"geometry" : {
"location" : {
"lat" : 37.4224764,
"lng" : -122.0842499
},
"location_type" : "ROOFTOP",
"viewport" : {
"northeast" : {
"lat" : 37.4238253802915,
"lng" : -122.0829009197085
},
"southwest" : {
"lat" : 37.4211274197085,
"lng" : -122.0855988802915
}
}
},
"place_id" : "ChIJ2eUgeAK6j4ARbn5u_wAGqWA",
"types" : [ "street_address" ]
}
],
"status" : "OK"
}
5. Google Maps Geolocation API
Google Maps Geolocation API mengembalikan radius akurasi dan lokasi
berdasarkan informasi tentang menara BTS dan simpul WiFi yang bisa dideteksi
oleh ponsel klien. Dokumen ini menjelaskan protokol yang digunakan untuk
mengirimkan data ini ke server dan mengembalikan respons kepada klien.

Berikut merupakan contoh cara request api pada Google Maps Geolocation:

https://www.googleapis.com/geolocation/v1/geolocate?key= YOUR_API
_KEY

NB : penggunaan Api pada Google Maps Geocoding API harus disertai Api key
yang di dapat dari google agar bisa menggunakannya

Berikut merupakan contoh respon api pada Google Maps Geolocation:

{
"homeMobileCountryCode": 310,
"homeMobileNetworkCode": 410,
"radioType": "gsm",
"carrier": "Vodafone",
"considerIp": "true",
"cellTowers": [
// See the Cell Tower Objects section below.
],
"wifiAccessPoints": [
// See the WiFi Access Point Objects section below.
]
}

6. Google Maps Roads API ( Jalan Terdekat )


Google Maps Roads API mengambil sampai 100 koordinat independen, dan
mengembalikan segmen jalan terdekat untuk setiap titik. Titik yang diteruskan
tidak harus menjadi bagian dari jalur yang berkelanjutan.

Berikut merupakan contoh cara request api pada Google Maps Roads API:
https://roads.googleapis.com/v1/nearestRoads?points=60.170880,24.
942795|60.170879,24.942796|60.170877,24.942796&key= YOUR_API_KEY

NB : penggunaan Api pada Google Maps Roads API harus disertai Api key yang
di dapat dari google agar bisa menggunakannya

Berikut merupakan contoh respon api pada Google Maps Roads API:

{
"snappedPoints": [
{
"location": {
"latitude": 60.170877918672588,
"longitude": 24.942699821922421
},
"originalIndex": 0,
"placeId": "ChIJNX9BrM0LkkYRIM-cQg265e8"
},
{
"location": {
"latitude": 60.170876898776406,
"longitude": 24.942699912064771
},
"originalIndex": 1,
"placeId": "ChIJNX9BrM0LkkYRIM-cQg265e8"
},
{
"location": {
"latitude": 60.170874902634374,
"longitude": 24.942700088491474
},
"originalIndex": 2,
"placeId": "ChIJNX9BrM0LkkYRIM-cQg265e8"
}
]
}
7. Google Maps Time Zone API
Google Maps Time Zone API menyediakan data perbedaan waktu untuk semua
lokasi di permukaan bumi. Anda meminta informasi zona waktu untuk pasangan
garis lintang/bujur tertentu dan tanggalnya. API mengembalikan nama zona waktu,
perbedaan waktu dari UTC, dan perbedaan waktu di musim panas.

Berikut merupakan contoh cara request api pada Google Maps Time Zone API :

https://maps.googleapis.com/maps/api/timezone/json?location=38.90
8133,-77.047119&timestamp=1458000000&key= YOUR_API_KEY

NB : penggunaan Api pada Google Maps Time Zone API harus disertai Api key
yang di dapat dari google agar bisa menggunakannya

Berikut merupakan contoh respon api pada Google Maps Time Zone API:

{
"dstOffset" : 3600,
"rawOffset" : -18000,
"status" : "OK",
"timeZoneId" : "America/New_York",
"timeZoneName" : "Eastern Daylight Time"
}

8. Google Places API Web Service


Google Places API Web Service adalah layanan yang mengembalikan informasi
tentang tempat — yang didefinisikan dalam API ini sebagai tempat usaha, lokasi
geografis, atau tempat menarik yang menonjol — dengan menggunakan
permintaan HTTP.

Berikut merupakan contoh cara request api pada Google Places API Web Service:

https://maps.googleapis.com/maps/api/place/nearbysearch/json?locatio
n=-
33.8670,151.1957&radius=500&types=food&name=cruise&key=YOUR_API_KEY
{
"debug_log" : {
"line" : []
},
"html_attributions" : [],
"logging_info" : {
"experiment_id" : [],
"query_geographic_location" : "AU"
},
"results" : [
{
"geometry" : {
"location" : {
"lat" : -33.86879,
"lng" : 151.194217
}
},
"icon" : "http://maps.gstatic.com/mapfiles/place_api/icons/restaurant-71.png",
"id" : "21a0b251c9b8392186142c798263e289fe45b4aa",
"name" : "Rhythmboat Cruises",
"opening_hours" : {
"open_now" : false,
"weekday_text" : []
},
"photos" : [
{
"height" : 426,
"html_attributions" : [
"\u003ca
href=\"https://www.google.com/maps/views/profile/104066891898402903288\"\u003eRhythmbo
at Cruises\u003c/a\u003e"
],
"photo_reference" : "CmRdAAAA-YL_I ...photo_reference truncated in this example",
"width" : 640
}
],
"place_id" : "ChIJyWEHuEmuEmsRm9hTkapTCrk",
"reference" : "CnRmAAAAvQl ...reference truncated in this example",
"scope" : "GOOGLE",
"types" : [ "restaurant", "food", "point_of_interest", "establishment" ],
"vicinity" : "Pyrmont Bay Wharf (Near Australia Maritime Museum), Pyrmont, NSW 2009"
},
{
"geometry" : {
"location" : {
"lat" : -33.867591,
"lng" : 151.201196
}
},
"icon" : "http://maps.gstatic.com/mapfiles/place_api/icons/restaurant-71.png",
{
"geometry" : {
"location" : {
"lat" : -33.867591,
"lng" : 151.201196
}
},
"icon" : "http://maps.gstatic.com/mapfiles/place_api/icons/restaurant-71.png",
"id" : "a97f9fb468bcd26b68a23072a55af82d4b325e0d",
"name" : "Australian Cruise Group",
"opening_hours" : {
"open_now" : false,
"weekday_text" : []
},
"photos" : [
{
"height" : 1331,
"html_attributions" : [
"\u003ca
href=\"https://www.google.com/maps/views/profile/110751364053842618118\"\u003eAustralian
Cruise Group\u003c/a\u003e"
],
"photo_reference" : "CmRdAAAAtEo ...photo_reference truncated in this example",
"width" : 2000
}
],
"place_id" : "ChIJrTLr-GyuEmsRBfy61i59si0",
"reference" : "CnRqAAAAFbuk ...reference truncated in this example",
"scope" : "GOOGLE",
"types" : [
"restaurant",
"travel_agency",
"food",
"point_of_interest",
"establishment"
],
"vicinity" : "32 The Promenade, King Street Wharf 5, Sydney"
},
{
"geometry" : {
"location" : {
"lat" : -33.870943,
"lng" : 151.190311
}
},
"icon" : "http://maps.gstatic.com/mapfiles/place_api/icons/bar-71.png",
"id" : "e644f7f34cf875b9919c6548f1b721947362850a",
"icon" : "http://maps.gstatic.com/mapfiles/place_api/icons/bar-71.png",
"id" : "e644f7f34cf875b9919c6548f1b721947362850a",
"name" : "Lunch Cruise with Jazz on Sydney Harbour",
"opening_hours" : {
"open_now" : false,
"weekday_text" : []
},
"photos" : [
{
"height" : 292,
"html_attributions" : [
"\u003ca
href=\"https://www.google.com/maps/views/profile/105423912060796272053\"\u003eFrom a
Google User\u003c/a\u003e"
],
"photo_reference" : "CmRdAAAAR4bq ...photo_reference truncated in this example",
"width" : 438
}
],
"place_id" : "ChIJLfySpTOuEmsRPCRKrzl8ZEY",
"reference" : "CoQBewAAAFd2 ...reference truncated in this example",
"scope" : "GOOGLE",
"types" : [ "bar", "restaurant", "food", "point_of_interest", "establishment" ],
"vicinity" : "37 Bank St, Pyrmont"
}
],
"status" : "OK"
}

9. Google Cloud Translation API


Google Cloud Translation API adalah layanan dari Google Cloud Platform yang
dapat menerjemahkan berbagai bahasa melalui Web Api.

Berikut merupakan contoh cara request api pada Google Cloud Translation API :
curl -s -X POST -H "Content-Type: application/json" \
-H "Authorization: Bearer "$(gcloud auth print-access-token) \
--data "{
'q': 'The Great Pyramid of Giza (also known as the Pyramid of Khufu or the
Pyramid of Cheops) is the oldest and largest of the three pyramids in
the Giza pyramid complex.',
'source': 'en',
'target': 'es',
'format': 'text'
}" "https://translation.googleapis.com/language/translate/v2"

Berikut merupakan contoh respon api pada Google Cloud Translation API:

{ "data": {

"translations": [ {

"translatedText": "La Gran Pirámide de Giza (también conocida como la

Pirámide de Khufu o la Pirámide de Keops) es la más antigua y más

grande de las tres pirámides en el complejo de la pirámide de Giza."

} ] }}

10. Github.com (Request The Authenticated User )


Web Api yang digunakan untuk memvalidasi user login ke dalam situs github.com
Berikut merupakan contoh cara request api pada saat Autentikasi user :

curl -i -u username:$token -H "Accept:application/vnd.github.jean-grey-


preview+json" \
https://api.github.com/user
Berikut merupakan contoh respon api Github Autentikasi User :

Status: 200 OK

{
"login": "octocat", "id": 1,
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "",
"url": "https://api.github.com/users/octocat",
"html_url": "https://github.com/octocat",
"followers_url": "https://api.github.com/users/octocat/followers",
"following_url": "https://api.github.com/users/octocat/following{/other_user}",
"gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
"starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
"organizations_url": "https://api.github.com/users/octocat/orgs",
"repos_url": "https://api.github.com/users/octocat/repos",
"events_url": "https://api.github.com/users/octocat/events{/privacy}",
"received_events_url": "https://api.github.com/users/octocat/received_events",
"type": "User", "site_admin": false, "name": "monalisa octocat",
"company": "GitHub", "blog": "https://github.com/blog", "location": "San
Francisco", "email": "octocat@github.com", "hireable": false,
"bio": "There once was...", "public_repos": 2, "public_gists": 1,
"followers": 20, "following": 0,
"created_at": "2008-01-14T04:33:35Z",
"updated_at": "2008-01-14T04:33:35Z",
"total_private_repos": 100, "owned_private_repos": 100,
"private_gists": 81, "disk_usage": 10000,
"collaborators": 8, "two_factor_authentication": true,
"plan": {
"name": "Medium",
"space": 400,
"private_repos": 20,
"collaborators": 0
}, "node_id": "MDQ6VXNlcjU4MzIzMQ==" }
11. Google Shortener ( Shortener Url Api )
Google Shortener Url API adalah layanan dari Google yang dapat
memperpendek/meringkas url yang panjang menjadi url pendek dan mudah di
ingat/dibagikan.

Berikut merupakan contoh cara request api pada Google Shortener Url API :

curl https://www.googleapis.com/urlshortener/v1/url \

-H 'Content-Type: application/json' \

-d '{"longUrl": "http://www.google.com/"}'

Berikut Responnya :

"kind": "urlshortener#url",

"id": "http://goo.gl/fbsS",

"longUrl": "http://www.google.com/"

12. Google Shortener ( Expand Url Api )


Google Expand Url API adalah layanan dari Google yang dapat mengembalikan
url yang sudah diperpendek dengan Google Shortener tadi.
Berikut merupakan contoh cara request api pada Google Expand Url API :

curl 'https://www.googleapis.com/urlshortener/v1/url?shortUrl=http://goo.gl/fbsS'

Berikut Responnya :

{ "kind": "urlshortener#url",

"id": "http://goo.gl/fbsS",

"longUrl": "http://www.google.com/",

"status": "OK"}
13. Google Book ( Book Search Api )
Google Book Search API adalah layanan Api dari Google yang dapat
mengembalikan detail buku dari parameter judul yang diikirm.
Berikut merupakan contoh cara request api pada Google Book Search API :

GET https://www.googleapis.com/books/v1/volumes?q=flowers+inauthor:keyes&key=yourAPIK
ey

Berikut Responnya :

200 OK
{

"kind": "books#volumes",

"items": [ {

"kind": "books#volume", "id": "_ojXNuzgHRcC", "etag": "OTD2tB19qn4",

"selfLink": "https://www.googleapis.com/books/v1/volumes/_ojXNuzgHRcC",

"volumeInfo": { "title": "Flowers", "authors": [ "Vijaya Khisty Bodach" ], ... },

{ "kind": "books#volume", "id": "RJxWIQOvoZUC", "etag": "NsxMT6kCCVs",

"selfLink": "https://www.googleapis.com/books/v1/volumes/RJxWIQOvoZUC",

"volumeInfo": { "title": "Flowers", "authors": [ "Gail Saunders-Smith"

], ... }, {

"kind": "books#volume", "id": "zaRoX10_UsMC", "etag": "pm1sLMgKfMA",

"selfLink": "https://www.googleapis.com/books/v1/volumes/zaRoX10_UsMC",

"volumeInfo": { "title": "Flowers", "authors": [ "Paul McEvoy" ], ... },

"totalItems": 3

}
14. Blogger (Retrieving blog with blog id Api )
Api ini digunakan untuk mendapatakan detail informasi blog dengan mengirimkan
id blog sebagai parameternya.
Berikut merupakan contoh cara request apinya :

GET https://www.googleapis.com/blogger/v3/blogs/2399953?key=YOUR-API-KEY

ey
Berikut Responnya :

"kind": "blogger#blog", "id": "2399953", "name": "Blogger Buzz",

"description": "The Official Buzz from Blogger at Google",

"published": "2007-04-23T22:17:29.261Z", "updated": "2011-08-02T06:01:15.941Z",

"url": "http://buzz.blogger.com/",

"selfLink": "https://www.googleapis.com/blogger/v3/blogs/2399953",

"posts": {

"totalItems": 494, "selfLink": "https://www.googleapis.com/blogger/v3/blogs/2399953/posts"

},

"pages": {

"totalItems": 2, "selfLink": "https://www.googleapis.com/blogger/v3/blogs/2399953/pages"

},

"locale": {

"language": "en", "country": "", "variant": "" } }


15. Blogger (Retrieving blog with url blog Api )
Api ini digunakan untuk mendapatakan detail informasi blog dengan mengirimkan
url blog sebagai parameternya.
Berikut merupakan contoh cara request apinya :

https://www.googleapis.com/blogger/v3/blogs/byurl?url=http://code.blogger.com/

ey
Berikut Responnya :

"kind": "blogger#blog", "id": "3213900", "name": "Blogger Developers Network",

"description": "The official Blogger Developers Network weblog.",

"published": "2007-02-09T10:13:10-08:00",

"updated": "2012-04-15T19:38:01-07:00",

"url": "http://code.blogger.com/",

"selfLink": "https://www.googleapis.com/blogger/v3/blogs/3213900",

"posts": {

"totalItems": 55, "selfLink": "https://www.googleapis.com/blogger/v3/blogs/3213900/posts"

},

"pages": {

"totalItems": 1, "selfLink": "https://www.googleapis.com/blogger/v3/blogs/3213900/pages"

},

"locale": {

"language": "en", "country": "US", "variant": "" } }


16. Blogger (Retrieving a specific post Api )
Api ini digunakan untuk mendapatakan sebuah postingan blogger tertentu
mengirimkan blog id dan post id sebagai parameternya.
Berikut merupakan contoh cara request apinya :

GET
https://www.googleapis.com/blogger/v3/blogs/2399953/posts/7706273476706534553?key=YO
UR-API-KEY

ey
Berikut Responnya :

"kind": "blogger#post", "id": "7706273476706534553",

"blog": { "id": "2399953" },

"published": "2011-08-01T19:58:00.000Z", "updated": "2011-08-01T19:58:51.947Z",

"url": "http://buzz.blogger.com/2011/08/latest-updates-august-1st.html",

"selfLink":
"https://www.googleapis.com/blogger/v3/blogs/2399953/posts/7706273476706534553",

"title": "Latest updates, August 1st", "content": "elided for readability",

"author": {

"id": "401465483996", "displayName": "Brett Wiltshire",

"url": "http://www.blogger.com/profile/01430672582309320414",

"image": { "url": "http://4.bp.blogspot.com/_YA50adQ-


7vQ/S1gfR_6ufpI/AAAAAAAAAAk/1ErJGgRWZDg/S45/brett.png" } },

"replies": {

"totalItems": "0", "selfLink":


"https://www.googleapis.com/blogger/v3/blogs/2399953/posts/7706273476706534553/comments
"

}}
17. Blogger (Adding a post Api )
Api ini digunakan untuk mengirimkan sebuah postingan ke blog.
Berikut merupakan contoh cara request apinya :

POST https://www.googleapis.com/blogger/v3/blogs/8070105920543249955/posts/

Authorization: /* OAuth 2.0 token here */

Content-Type: application/json

"kind": "blogger#post", "blog": { "id": "8070105920543249955" },

"title": "A new post", "content": "With <b>exciting</b> content..."

Berikut Responnya :

{ "kind": "blogger#post", "id": "6819100329896798058", "blog": {

"id": "8070105920543249955" },

"published": "2012-05-20T20:08:00-07:00", "updated": "2012-05-20T20:08:35-07:00",

"url": "http://brettmorgan-test2.blogspot.com/2012/05/new-post.html",

"selfLink":
"https://www.googleapis.com/blogger/v3/blogs/8070105920543249955/posts/68191003298967980
58",

"title": "A new post", "content": "With <b>exciting</b> content...",

"author": { "id": "16258312240222542576", "displayName": "Brett Morgan",

"url": "http://www.blogger.com/profile/16258312240222542576",

"image": { "url": "https://resources.blogblog.com/img/b16-rounded.gif" } },

"replies": { "totalItems": "0", "selfLink":


"https://www.googleapis.com/blogger/v3/blogs/8070105920543249955/posts/68191003298967980
58/comments" } }
18. Blogger (Delete a post Api )
Api ini digunakan untuk mengahapus sebuah postingan di blog.
Berikut merupakan contoh cara request apinya :

DELETE
https://www.googleapis.com/blogger/v3/blogs/8070105920543249955/posts/68191003298967980
58

Authorization: /* OAuth 2.0 token here */

Berikut Responnya jika berhasil :

HTTP 200 OK

19. Facebook Graph Api (Get Fans Page Name)


Api ini digunakan untuk mendapatkan nama dari fans page facebook dengan
menggunakan id page sebagai parameternya.
Berikut merupakan contoh cara request apinya :

GET https://graph.facebook.com/v2.11 /820882001277849

Berikut Responnya :

{ "name": "Coca-Cola", "id": "820882001277849" }

20. Facebook Graph Api (Get Feed Post Page)


Api ini digunakan untuk mendapatkan nama postingan fans page facebook dengan
menggunakan id page sebagai parameternya.
Berikut merupakan contoh cara request apinya

GET https://graph.facebook.com/v2.11 /820882001277849 /feed


Berikut Responnya :

{ "name": "Coca-Cola", "id": "820882001277849" }{

"data": [

"created_time": "2017-12-08T01:08:57+0000",

"message": "Love this puzzle. One of my four coke puzzles",

"id": "820882001277849_1805191182846921"

},

"created_time": "2017-12-07T20:06:14+0000",

"message": "You need to add grape as a flavor for Coke in your


freestyle machines.",

"id": "820882001277849_1804966026202770"

},

"created_time": "2017-12-07T01:29:12+0000",

"message": "Plz play the old commercial’s with the polar bears.
Would be nice to see them this holiday",

"id": "820882001277849_1804168469615859"

}
21. domainsdb.info api (Check Status of registered domain)
Api ini digunakan untuk mendapatkan mengecek status dan detail dari domain
yang teresgritasi dengan mengirimkan nama domainnya sebagai parameternya.
Berikut merupakan contoh cara request apinya :

GET https://api.domainsdb.info/search?query=ganool.movie&tld=all

Berikut Responnya :

{
"total": 1,
"time": 12,
"domains": [
{
"hasWhois": 0,
"country": null,
"NS": "lars.ns.cloudflare.com,sharon.ns.cloudflare.com",
"domain": "ganool.movie",
"expiry_date": null,
"create_date": null,
"update_date": "2018-01-11T07:10:22.286Z",
"isDead": false
}
]
}
Daftar Pustaka

 https://developers.google.com/maps/documentation/?hl=id
 https://cloud.google.com/translate/docs/quickstart
 https://developers.google.com/url-shortener/v1/getting_started
 https://developers.google.com/books/docs/v1/using
 https://developers.facebook.com/docs/graph-api/using-graph-api/
 https://any-api.com/
 https://developers.google.com/blogger/docs/3.0/using

Anda mungkin juga menyukai