{"id":20755452,"url":"https://github.com/hrz8/go-seeding-omdb","last_synced_at":"2025-03-11T15:42:02.136Z","repository":{"id":46456585,"uuid":"415641746","full_name":"hrz8/go-seeding-omdb","owner":"hrz8","description":null,"archived":false,"fork":false,"pushed_at":"2021-10-11T09:39:22.000Z","size":50,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-18T04:27:00.530Z","etag":null,"topics":["go","omdb","omdb-api","rest-api"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hrz8.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-10-10T16:37:07.000Z","updated_at":"2021-10-12T02:06:37.000Z","dependencies_parsed_at":"2022-08-02T22:46:19.734Z","dependency_job_id":null,"html_url":"https://github.com/hrz8/go-seeding-omdb","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hrz8%2Fgo-seeding-omdb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hrz8%2Fgo-seeding-omdb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hrz8%2Fgo-seeding-omdb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hrz8%2Fgo-seeding-omdb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hrz8","download_url":"https://codeload.github.com/hrz8/go-seeding-omdb/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243061307,"owners_count":20229967,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["go","omdb","omdb-api","rest-api"],"created_at":"2024-11-17T09:25:41.135Z","updated_at":"2025-03-11T15:42:02.094Z","avatar_url":"https://github.com/hrz8.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# go-seeding-omdb/ayo-bibit-omdb\n\n## What's going on here?\n- [Setup](#01_Setup)\n- [Request](#02_Request-Response)\n\n## 01_Setup\n- Create a config file named `config.yml` in root folder with same format with `config.sample.yml`\n\n```yml\nSERVICE:\n  RESTPORT: 5000\n  GRPCPORT: 6000\n  APIKEY: yourapi\nDATABASE: \n  HOST: localhost\n  PORT: 3306\n  USER: root\n  PASSWORD: root\n  NAME: db_name\n```\n\n- Create the Database with name align as in the configuration file\n\n```bash\n$ mysql -u root -p\nmsql\u003e CREATE DATABASE omdb;\n```\n\n- Create `.pb.go` for gRPC models\n\n```bash\n$ cd go-seeding-omdb/models\n$ protoc --go-grpc_out=. *.proto\n```\n\n## 02_Request-Response\n\n- Available Endpoints\n\n```txt\nGET: {BASE_URL}/api/v1/movie?pagination={page}\u0026searchword={query}\nGET: {BASE_URL}/api/v1/movie/:imdbID\n```\n\n- Success Response\n\n\u003e List: {BASE_URL}/api/v1/movie?pagination={page}\u0026searchword={query}\n```json\n{\n    \"data\": [\n        {\n            \"title\": \"Batman: The Killing Joke\",\n            \"year\": \"2016\",\n            \"imdbID\": \"tt4853102\",\n            \"type\": \"movie\",\n            \"poster\": \"https://example.com/images/image.jpg\"\n        },\n        ...\n    ],\n    \"message\": \"success fetch movies list\",\n    \"status\": 200,\n    \"meta\": {\n        \"count\": 10,\n        \"total\": 463\n    }\n}\n```\n\u003e Detail: {BASE_URL}/api/v1/movie/:imdbID\n```json\n{\n    \"data\": {\n        \"title\": \"Naruto: The Lost Story - Mission: Protect the Waterfall Village\",\n        \"year\": \"2003\",\n        \"imdbID\": \"tt3634858\",\n        \"type\": \"movie\",\n        \"poster\": \"https://example.com/images/image.jpg\",\n        \"released\": \"12 Jun 2007\",\n        \"runtime\": \"40 min\",\n        \"director\": \"Masahiko Murata, Hayato Date\",\n        \"writer\": \"Masashi Kishimoto (original manga), Katsuyuki Sumizawa (screenplay)\",\n        \"actors\": \"Junko Takeuchi, Noriaki Sugiyama, Chie Nakamura, Kazuhiko Inoue\",\n        \"plot\": \"Naruto and his friends must get back a jug of stolen holy water from a band of higher class ninjas.\",\n        \"language\": \"Japanese\",\n        \"country\": \"Japan\",\n        \"imdbRating\": \"6.6\"\n    },\n    \"message\": \"success fetch movie detail\",\n    \"status\": 200,\n    \"meta\": {}\n}\n```\n\n- Error Response\n\n```json\n{\n    \"data\": {\n        \"reason\": \"searchword doesn't match with any of available data\"\n    },\n    \"message\": \"failed to fetch movies list\",\n    \"status\": 400,\n    \"errorCode\": \"MOVIE-001\",\n    \"meta\": {}\n}\n```\n```json\n{\n    \"data\": {\n        \"reason\": \"imdb id not found\"\n    },\n    \"message\": \"failed to fetch movie detail\",\n    \"status\": 400,\n    \"errorCode\": \"MOVIE-002\",\n    \"meta\": {}\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhrz8%2Fgo-seeding-omdb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhrz8%2Fgo-seeding-omdb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhrz8%2Fgo-seeding-omdb/lists"}