- Beranda
- Komunitas
- Tech
- Programmer Forum
[Share] IMDb Simple Movie RESTful API Server
TS
f4ri5s
[Share] IMDb Simple Movie RESTful API Server
Selamat siang, kali ini ane mau share hasil kerja untuk ngisi waktu luang ane. Program IMDBSMWS (IMDb Simple Movies WebService) ini adalah program server yang bisa melakukan scrapping ke IMDb, kemudian menyimpan data tersebut dalam database dan kemudian anda bisa melakukan pengambilan data pilem2 yang tercrawling (dengan http method GET) atau operasi lainnya seperti POST, PUT atau DELETE. Program ini ane buat pake bahasa pemrograman Go dan sudah ane lengkapin fiturnya dengan admin panel (walaupun belum semua fiturnya ane selesaikan)
Sangat cocok untuk anda yang ingin belajar REST API baik untuk ngetest bikin client ataupun bikin server (yup, program ini ane open-source kan loh ).
Download source code di repo github. Untuk yang gak punya compiler Go dan GCC untuk build dari source code, ane sediain binary releasenya.
Untuk penggunaan, pastikan anda sudah melakukan setting seperti pada readme di repo tsb.
Jika sudah, coba jalankan:
Hasil responsenya kira2 seperti ini:
* Code sudah di beautify biar cantik
Atau bisa juga informasi untuk film tertentu (dengan id title yang sama di IMDb):
Hasil:
Maaf ane gak sempat bikin panduan lengkapnya, dan ane gak sempat rampungkan programnya, karena ini cuma program iseng2 buat ngasah skill ane jg
Caci maki ane terima, tapi ane menerima apresiasi dari agan berupa cendol dari agan, atau paling gak memberi star pada repo github ane jika dirasa berfaedah
Sangat cocok untuk anda yang ingin belajar REST API baik untuk ngetest bikin client ataupun bikin server (yup, program ini ane open-source kan loh ).
Spoiler for Penampakan Panel:
Download source code di repo github. Untuk yang gak punya compiler Go dan GCC untuk build dari source code, ane sediain binary releasenya.
Untuk penggunaan, pastikan anda sudah melakukan setting seperti pada readme di repo tsb.
Jika sudah, coba jalankan:
Code:
http://localhost:33666/movies
Hasil responsenya kira2 seperti ini:
Spoiler for Respon:
Code:
{
"status": "success",
"count": 20,
"totalCount": 15734,
"page": 1,
"maxResult": 20,
"maxPage": 787,
"data": [
{
"id": "tt5255986",
"lastUpdate": "2019-04-12 00:38:04.618074 +0700 +07 m=+24.504247801",
"type": "movie",
"title": "#66",
"originalTitle": "#66",
"genres": "Action",
"year": 2015,
"releaseDate": "",
"runtimeMinutes": 116,
"isAdult": false,
"rating": 5.4,
"description": "#66 is a movie starring Asun Mawardi, Donita, and Yayu A.W. Unru. 66 tells the story of an assassin-for-hire, who is hired to kill a police informant, but instead steals the money and runs, igniting the spark that leads a criminal...",
"imageUrl": "https://m.media-amazon.com/images/M/MV5BMzE2NmI2NGYtYWVkMS00OGEwLWFhYjUtZTliMjBkMDQ3ZjUzXkEyXkFqcGdeQXVyMjAyODIyMTc@._V1_.jpg"
},
{
"id": "tt5335198",
"lastUpdate": "2019-04-12 00:38:04.6730425 +0700 +07 m=+24.559216301",
"type": "movie",
"title": "#Selfieparty",
"originalTitle": "#Selfieparty",
"genres": "Action,Comedy,Thriller",
"year": 2016,
"releaseDate": "2016-03-01",
"runtimeMinutes": 90,
"isAdult": false,
"rating": 5.3,
"description": "#Selfieparty is a movie starring Mishina Ksenia, Olena Lavrenyuk, and Pavlo Li. Four friends who are all students, wake up at the police station, not remembering the events of yesterday. To figure out what happened, the boys decide...",
"imageUrl": "https://m.media-amazon.com/images/M/MV5BMTkwMDJkYzQtNjI2MC00ZDM1LWExNDItOTg4OWRkZDJkN2FiL2ltYWdlL2ltYWdlXkEyXkFqcGdeQXVyNjU0NDEzNzc@._V1_.jpg"
},
{
"id": "tt5654204",
"lastUpdate": "2019-04-12 00:38:04.8989175 +0700 +07 m=+24.785091301",
"type": "movie",
"title": "#Slaughterhouse",
"originalTitle": "#Slaughterhouse",
"genres": "Action,Horror",
"year": 2017,
"releaseDate": "",
"runtimeMinutes": 0,
"isAdult": false,
"rating": 7.5,
"description": "#Slaughterhouse is a movie starring Nicholas Saenz, Shayla Bagir, and Karina Clark. A romantic spring getaway turns sinister when unexpected visitors join the party in a high-tech house that no one can escape.",
"imageUrl": "https://m.media-amazon.com/images/M/MV5BNGNhZTk5M2MtMzUzYy00NmZkLTljZmItZTU5MDU4Y2M0N2I4XkEyXkFqcGdeQXVyMjM1NTY3Njk@._V1_.jpg"
},
{
"id": "tt3743246",
"lastUpdate": "2019-04-12 00:38:03.6627251 +0700 +07 m=+23.548898901",
"type": "movie",
"title": "#Victoria",
"originalTitle": "#Victoria",
"genres": "Action,Drama",
"year": 2018,
"releaseDate": "2018-01-02",
"runtimeMinutes": 119,
"isAdult": false,
"rating": 0,
"description": "#Victoria is a movie starring Jason Barkley, Mark K. Buddington, and Elsi Burgos. Victoria moves from out of town into the poor inner city of New York with her father, the neighborhood drug dealer. She goes on a journey, seeking...",
"imageUrl": "https://m.media-amazon.com/images/M/MV5BNDI3ODRmYzctZWYyYy00ZjQzLWIyMTAtMTMxZDczMzUyYjYxXkEyXkFqcGdeQXVyNTI4NTczNTA@._V1_.jpg"
},
{
"id": "tt2607968",
"lastUpdate": "2019-04-12 00:38:02.7732747 +0700 +07 m=+22.659448501",
"type": "movie",
"title": "#chicagoGirl: The Social Network Takes on a Dictator",
"originalTitle": "#chicagoGirl: The Social Network Takes on a Dictator",
"genres": "Action,Biography,Documentary",
"year": 2013,
"releaseDate": "2013-11-21",
"runtimeMinutes": 74,
"isAdult": false,
"rating": 7.1,
"description": "#chicagoGirl: The Social Network Takes on a Dictator is a movie starring Ala'a Basatneh, Aous Al-Mubarak, and Bassel Shehadeh. From the Chicago suburbs, an American teenager helps run the Syrian revolution. With social media, she...",
"imageUrl": "https://m.media-amazon.com/images/M/MV5BMTgwODIxMjM3NV5BMl5BanBnXkFtZTgwMzYzODA2NjE@._V1_.jpg"
},
{
"id": "tt2106284",
"lastUpdate": "2019-04-12 00:38:02.2865735 +0700 +07 m=+22.172747301",
"type": "movie",
"title": "$50K and a Call Girl: A Love Story",
"originalTitle": "$50K and a Call Girl: A Love Story",
"genres": "Action,Adventure,Comedy",
"year": 2014,
"releaseDate": "2014-01-14",
"runtimeMinutes": 90,
"isAdult": false,
"rating": 6.8,
"description": "$50K and a Call Girl: A Love Story is a movie starring Ross Patterson, Jessie Wiseman, and Seth Grossman. When Ross is diagnosed with terminal brain cancer and given six weeks to live, his newly engaged older brother Seth offers to...",
"imageUrl": "https://m.media-amazon.com/images/M/MV5BMTY3OTI0NjY0Ml5BMl5BanBnXkFtZTgwMjUzNjQ2MDE@._V1_.jpg"
},
{
"id": "tt2614684",
"lastUpdate": "2019-04-12 00:38:02.7772702 +0700 +07 m=+22.663444001",
"type": "movie",
"title": "'71",
"originalTitle": "'71",
"genres": "Action,Drama,Thriller",
"year": 2014,
"releaseDate": "2014-10-10",
"runtimeMinutes": 99,
"isAdult": false,
"rating": 7.2,
"description": "'71 is a movie starring Jack O'Connell, Sam Reid, and Sean Harris. In 1971, a young and disorientated British soldier is accidentally abandoned by his unit following a riot on the deadly streets of Belfast.",
"imageUrl": "https://m.media-amazon.com/images/M/MV5BMTg1NjE5Njg4M15BMl5BanBnXkFtZTgwMzEyODAzNDE@._V1_.jpg"
},
{
"id": "tt1136822",
"lastUpdate": "2019-04-12 00:38:00.9259667 +0700 +07 m=+20.812140501",
"type": "movie",
"title": "'79 Parts",
"originalTitle": "'79 Parts",
"genres": "Action,Comedy,Romance",
"year": 2016,
"releaseDate": "2019-05-07",
"runtimeMinutes": 90,
"isAdult": false,
"rating": 6.6,
"description": "'79 Parts is a movie starring Eric Roberts, Sandra Bernhard, and Kathrine Narducci. Jack's left with a debt with the mob that will be hard to repay. Marrying the car dealer's illegal immigrant girlfriend may be the only way out.",
"imageUrl": "https://m.media-amazon.com/images/M/MV5BODI3YTlkMTMtOTMyMy00MWRlLThkMmMtODlhMjA2NWE2YzVkXkEyXkFqcGdeQXVyNDkzNjcxNA@@._V1_.jpg"
},
{
"id": "tt0346585",
"lastUpdate": "2019-04-12 00:37:59.6315923 +0700 +07 m=+19.517766101",
"type": "movie",
"title": "'Bayolente'",
"originalTitle": "'Bayolente'",
"genres": "Action",
"year": 1999,
"releaseDate": "1999-10-20",
"runtimeMinutes": 0,
"isAdult": false,
"rating": 3.2,
"description": "",
"imageUrl": "https://m.media-amazon.com/images/M/MV5BNjgzOWQ0MmUtNDgyYi00YjMwLTlkYmQtNzI5ODA5Mzg4OGIwXkEyXkFqcGdeQXVyMzMzMTQ2MzI@._V1_.jpg"
},
{
"id": "tt0336281",
"lastUpdate": "2019-04-12 00:37:59.6165997 +0700 +07 m=+19.502773501",
"type": "movie",
"title": "'Di puwedeng hindi puwede!",
"originalTitle": "'Di puwedeng hindi puwede!",
"genres": "Action,Comedy",
"year": 1999,
"releaseDate": "1999-05-12",
"runtimeMinutes": 0,
"isAdult": false,
"rating": 6.8,
"description": "'Di puwedeng hindi puwede! is a movie starring Robin Padilla, Vina Morales, and Bayani Agbayani. my pets name is rudy castro",
"imageUrl": "https://m.media-amazon.com/images/M/MV5BMGUyN2RhZGQtYzA1ZS00NGJhLThkMTctN2E5ZmQ1MGYwNmZhXkEyXkFqcGdeQXVyNDkwMzY5NjQ@._V1_.jpg"
},
{
"id": "tt1562401",
"lastUpdate": "2019-04-12 00:38:01.4756354 +0700 +07 m=+21.361809201",
"type": "movie",
"title": "'This Is Not an American Movie'",
"originalTitle": "Ova ne e amerikanski film",
"genres": "Action,Comedy,Crime",
"year": 2011,
"releaseDate": "2011-02-25",
"runtimeMinutes": 86,
"isAdult": false,
"rating": 5.4,
"description": "Ova ne e amerikanski film is a movie starring Senko Velinov, Ky Evans, and Tanya Mickov. A gang of small-time criminals dream of glamor like in an American movies and plan their biggest heist - the secret room of CIA.",
"imageUrl": "https://m.media-amazon.com/images/M/MV5BMTg2OTgxNjg5MF5BMl5BanBnXkFtZTgwNjQyNzg5NjE@._V1_.jpg"
},
{
"id": "tt2151834",
"lastUpdate": "2019-04-12 00:38:02.3465366 +0700 +07 m=+22.232710401",
"type": "movie",
"title": "...and the old man fired.",
"originalTitle": "...and the old man fired.",
"genres": "Action,Crime,Drama",
"year": 2011,
"releaseDate": "",
"runtimeMinutes": 73,
"isAdult": false,
"rating": 0,
"description": "...and the old man fired. is a movie starring Anthony Cardosa, Edgar Guevara, and Kevan Paul Hewett. A senior cartel enforcer named Herminio living in Northern California's agricultural valley comes to terms with old age and...",
"imageUrl": ""
},
{
"id": "tt2506748",
"lastUpdate": "2019-04-12 00:38:02.7213055 +0700 +07 m=+22.607479201",
"type": "movie",
"title": ".357",
"originalTitle": ".357",
"genres": "Action,Drama",
"year": 2013,
"releaseDate": "2013-04-06",
"runtimeMinutes": 97,
"isAdult": false,
"rating": 4.9,
"description": ".357 is a movie starring Laurie Love, Fred Williamson, and Brian Ames. On her wedding night, Jade wakes up holding the hand of her dead husband after she narrowly survived a murder attempt by the criminal family she fled from only...",
"imageUrl": "https://m.media-amazon.com/images/M/MV5BMzgwMzg3OTIxNV5BMl5BanBnXkFtZTgwOTY4ODI1MTE@._V1_.jpg"
},
{
"id": "tt2064704",
"lastUpdate": "2019-04-12 00:38:02.2341681 +0700 +07 m=+22.120341901",
"type": "movie",
"title": ".Hack//The Movie",
"originalTitle": "Dotto hakku: Sekai no mukou ni",
"genres": "Action,Animation,Sci-Fi",
"year": 2012,
"releaseDate": "2012-01-21",
"runtimeMinutes": 112,
"isAdult": false,
"rating": 6.5,
"description": "Dotto hakku: Sekai no mukou ni is a movie starring Saki Fujita, Yukari Fukui, and Nobuyuki Hiyama. In 2024, the computer network prevails throughout daily life. Sora Yuuki is a 14-year-old girl. One day, she is invited to an online...",
"imageUrl": "https://m.media-amazon.com/images/M/MV5BZjBmNmIwOTQtMzU4NC00MDk0LWI3ZmYtOWUzMjFiMTY5ZTc2XkEyXkFqcGdeQXVyMzA3NDI5NTQ@._V1_.jpg"
},
{
"id": "tt1164545",
"lastUpdate": "2019-04-12 00:38:00.9589465 +0700 +07 m=+20.845120301",
"type": "movie",
"title": ".hack//G.U. Trilogy",
"originalTitle": ".hack//G.U. Trilogy",
"genres": "Action,Adventure,Animation",
"year": 2007,
"releaseDate": "2007-12-22",
"runtimeMinutes": 93,
"isAdult": false,
"rating": 5.8,
"description": ".hack//G.U. Trilogy is a movie starring Takahiro Sakurai, Ayako Kawasumi, and Sanae Kobayashi. After one of his friends falls into a coma playing an online game called The World, Haseo logs in to find the man responsible. But before...",
"imageUrl": "https://m.media-amazon.com/images/M/MV5BODU4Nzk4NjE4Ml5BMl5BanBnXkFtZTgwODI4NTQxNjE@._V1_.jpg"
},
{
"id": "tt3283768",
"lastUpdate": "2019-04-12 00:38:03.2419867 +0700 +07 m=+23.128160501",
"type": "movie",
"title": "006 kaçis",
"originalTitle": "006 kaçis",
"genres": "Action,Comedy",
"year": 2014,
"releaseDate": "2014-05-16",
"runtimeMinutes": 0,
"isAdult": false,
"rating": 3.4,
"description": "",
"imageUrl": "https://m.media-amazon.com/images/M/MV5BNDk3NTE1OTEtZmNlYy00Yjg0LWFlYWMtYmM4MmY2OTNhNzRiXkEyXkFqcGdeQXVyMjc3MTMyMjA@._V1_.jpg"
},
{
"id": "tt2078523",
"lastUpdate": "2019-04-12 00:38:02.2535945 +0700 +07 m=+22.139768301",
"type": "movie",
"title": "009 Re: Cyborg",
"originalTitle": "009 Re:Cyborg",
"genres": "Action,Animation,Sci-Fi",
"year": 2012,
"releaseDate": "2012-10-27",
"runtimeMinutes": 103,
"isAdult": false,
"rating": 5.9,
"description": "009 Re:Cyborg is a movie starring Chiwa Saitô, Daisuke Ono, and Hiroyuki Yoshino. Anime adventure from 'Ghost in the Shell - Stand Alone Complex' (2002) director Kenji Kamiyama. Nine cyborgs created for destructive purposes...",
"imageUrl": "https://m.media-amazon.com/images/M/MV5BMTQ5NjMxNzQ5MV5BMl5BanBnXkFtZTgwNTMyMDkxMjE@._V1_.jpg"
},
{
"id": "tt3008816",
"lastUpdate": "2019-04-12 00:38:03.0411122 +0700 +07 m=+22.927286001",
"type": "movie",
"title": "009-1: The End of the Beginning",
"originalTitle": "009-1: The End of the Beginning",
"genres": "Action,Crime,Drama",
"year": 2013,
"releaseDate": "2013-09-07",
"runtimeMinutes": 82,
"isAdult": false,
"rating": 4.6,
"description": "009-1: The End of the Beginning is a movie starring Mayuko Iwasa, Minehiro Kinomoto, and Nao Nagasawa. Marking the 75th anniversary of his birth, Shotaro Ishinomori's classic spy heroine manga "009-1" has been adapted into a...",
"imageUrl": "https://m.media-amazon.com/images/M/MV5BMTkxNTUyMDE1N15BMl5BanBnXkFtZTgwMDM0NDY0NTE@._V1_.jpg"
},
{
"id": "tt0294237",
"lastUpdate": "2019-04-12 00:37:59.5656319 +0700 +07 m=+19.451805701",
"type": "movie",
"title": "01412 pasasingeum",
"originalTitle": "01412 pasasingeum",
"genres": "Action,Fantasy",
"year": 2000,
"releaseDate": "2000-04-24",
"runtimeMinutes": 95,
"isAdult": false,
"rating": 4.7,
"description": "01412 pasasingeum is a movie starring Ji-tae Yu, Yeong-jin Lee, and Rang Ha. A computer game leads the way to a world of fantasy and adventure.",
"imageUrl": "https://m.media-amazon.com/images/M/MV5BZTZlM2U5NTctNGE3Yy00YmM3LWI2ODAtZWQ3NGUxODU1ZDk1XkEyXkFqcGdeQXVyNDUxNjc5NjY@._V1_.jpg"
},
{
"id": "tt1192862",
"lastUpdate": "2019-04-12 00:38:00.9919247 +0700 +07 m=+20.878098501",
"type": "movie",
"title": "07-y menyaet kurs",
"originalTitle": "07-y menyaet kurs",
"genres": "Action",
"year": 2007,
"releaseDate": "2007-04-12",
"runtimeMinutes": 91,
"isAdult": false,
"rating": 5.7,
"description": "",
"imageUrl": "https://m.media-amazon.com/images/M/MV5BNzU5OTY2NWMtNTRkNS00ZWJiLTgzYjEtN2ZjNzBjZTZkNmFkXkEyXkFqcGdeQXVyNzg5OTk2OA@@._V1_.jpg"
}
]
}
* Code sudah di beautify biar cantik
Atau bisa juga informasi untuk film tertentu (dengan id title yang sama di IMDb):
Code:
http://localhost:33666/movies/tt0448115
Hasil:
Spoiler for Respon:
Code:
{
"status": "success",
"data": {
"id": "tt0448115",
"lastUpdate": "2019-04-12 00:37:59.7555161 +0700 +07 m=+19.641689901",
"type": "movie",
"title": "Shazam!",
"originalTitle": "Shazam!",
"genres": "Action,Adventure,Comedy",
"year": 2019,
"releaseDate": "2019-04-02",
"runtimeMinutes": 132,
"isAdult": false,
"rating": 7.7,
"description": "Shazam! is a movie starring Zachary Levi, Mark Strong, and Asher Angel. We all have a superhero inside us, it just takes a bit of magic to bring it out. In Billy Batson's case, by shouting out one word - SHAZAM. - this streetwise...",
"imageUrl": "https://m.media-amazon.com/images/M/MV5BYTE0Yjc1NzUtMjFjMC00Y2I3LTg3NGYtNGRlMGJhYThjMTJmXkEyXkFqcGdeQXVyNTI4MzE4MDU@._V1_.jpg"
}
}
Maaf ane gak sempat bikin panduan lengkapnya, dan ane gak sempat rampungkan programnya, karena ini cuma program iseng2 buat ngasah skill ane jg
Caci maki ane terima, tapi ane menerima apresiasi dari agan berupa cendol dari agan, atau paling gak memberi star pada repo github ane jika dirasa berfaedah
Diubah oleh f4ri5s 12-04-2019 08:45
nona212 memberi reputasi
1
1.2K
Kutip
2
Balasan
Komentar yang asik ya
Urutan
Terbaru
Terlama
Komentar yang asik ya
Komunitas Pilihan