{"id":21078635,"url":"https://github.com/bchoubert/wine-api","last_synced_at":"2025-07-06T15:37:54.302Z","repository":{"id":78232826,"uuid":"78427543","full_name":"bchoubert/wine-api","owner":"bchoubert","description":null,"archived":false,"fork":false,"pushed_at":"2017-01-10T16:18:49.000Z","size":29,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-11T13:53:01.390Z","etag":null,"topics":["polytech-lyon"],"latest_commit_sha":null,"homepage":null,"language":"PHP","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/bchoubert.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-01-09T12:39:43.000Z","updated_at":"2017-08-28T21:45:01.000Z","dependencies_parsed_at":"2023-04-22T03:46:00.416Z","dependency_job_id":null,"html_url":"https://github.com/bchoubert/wine-api","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/bchoubert%2Fwine-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bchoubert%2Fwine-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bchoubert%2Fwine-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bchoubert%2Fwine-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bchoubert","download_url":"https://codeload.github.com/bchoubert/wine-api/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243521287,"owners_count":20304187,"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":["polytech-lyon"],"created_at":"2024-11-19T19:41:10.696Z","updated_at":"2025-03-14T04:13:33.203Z","avatar_url":"https://github.com/bchoubert.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# wine-api\n\n## Description\nThis API was made for a school project.\n\nWhen you call this API with a GET parameter called 'plat' (french), \nit forwards you a JSON file that permits you to print a carousel message in Facebook,\ncomposed of wines that can go with that plate.\nEach element have the name of the wine, a picture (got with file_get_html on bing), \nand a link to our website, http://produitsdutiroir.fr\n\n## Params Inc file\nThe 'params.inc.php' is missing : you need to create one with your server credentials :\n```php\n  $servername = \"hostExample.com\";\n  $username = \"username\";\n  $password = \"password\";\n  $dbname = \"DatabaseName\";\n```\n\n## Database \nThis project uses the provided wines.sql database.\nThis database comes from [here](https://www.data.gouv.fr/fr/datasets/accords-mets-et-vins/) and was parsed from the CSV file.\nThe columns used for this projects are 'Nom du mets' (plate name) and 'Nom du vin' (wine name).\n\n## Example\nFor example, for the call : getwine.php?plat=oeuf, it returns you the folowwing JSON : \n```json\n{\n  \"messages\":\n  [\n    {\n      \"attachment\":\n      {\n        \"type\":\"template\",\n        \"payload\":\n        {\n          \"template_type\":\"generic\",\n          \"elements\":\n          [\n            {\n              \"title\":\"+Aloxe+Corton\",\n              \"image_url\":\"http:\\/\\/tse3.mm.bing.net\\/th?id=OIP.M730e1b075318f48163d3e36dc899df06o0\u0026w=230\u0026h=170\u0026rs=1\u0026pcl=dddddd\u0026pid=1.1\",\n              \"buttons\":\n              [\n                {\n                  \"type\":\"web_url\",\n                  \"url\":\"http:\\/\\/produitsdutiroir.fr\\/\",\n                  \"title\":\"Voir sur le site\"\n                }\n              ]\n            },\n            {\n              \"title\":\"Pauillac\",\n              \"image_url\":\"http:\\/\\/tse4.mm.bing.net\\/th?id=OIP.M437407ec080e19d91c1d9dec0ff88d64o0\u0026w=230\u0026h=170\u0026rs=1\u0026pcl=dddddd\u0026pid=1.1\",\n              \"buttons\":\n              [\n                {\n                  \"type\":\"web_url\",\n                  \"url\":\"http:\\/\\/produitsdutiroir.fr\\/\",\n                  \"title\":\"Voir sur le site\"\n                }\n              ]\n            },\n            {\n              \"title\":\"Ch%E2teauneuf+du+Pape\",\n              \"image_url\":\"http:\\/\\/tse1.mm.bing.net\\/th?id=OIP.M8621b027dc5a94fe6db6c3ccf2b85080o0\u0026w=230\u0026h=170\u0026rs=1\u0026pcl=dddddd\u0026pid=1.1\",\n              \"buttons\":\n              [\n                {\n                  \"type\":\"web_url\",\n                  \"url\":\"http:\\/\\/produitsdutiroir.fr\\/\",\n                  \"title\":\"Voir sur le site\"\n                }\n              ]\n            },\n            {\n              \"title\":\"Santenay\",\n              \"image_url\":\"http:\\/\\/tse3.mm.bing.net\\/th?id=OIP.M037b89254b90ba1a2be818cbf07e74f2o0\u0026w=230\u0026h=170\u0026rs=1\u0026pcl=dddddd\u0026pid=1.1\",\n              \"buttons\":\n              [\n                {\n                  \"type\":\"web_url\",\n                  \"url\":\"http:\\/\\/produitsdutiroir.fr\\/\",\n                  \"title\":\"Voir sur le site\"\n                }\n              ]\n            },\n            {\n              \"title\":\"Pommard\",\n              \"image_url\":\"http:\\/\\/tse1.mm.bing.net\\/th?id=OIP.Ma9bda2d089a5c3c31f1990d066509aa0o0\u0026w=230\u0026h=170\u0026rs=1\u0026pcl=dddddd\u0026pid=1.1\",\n              \"buttons\":\n              [\n                {\n                  \"type\":\"web_url\",\n                  \"url\":\"http:\\/\\/produitsdutiroir.fr\\/\",\n                  \"title\":\"Voir sur le site\"\n                }\n              ]\n            }\n          ]\n        }\n      }\n    }\n  ]\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbchoubert%2Fwine-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbchoubert%2Fwine-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbchoubert%2Fwine-api/lists"}