{"id":9524844,"url":"https://github.com/carpedeum-fr/geomesse-api","last_synced_at":"2025-04-10T19:04:27.903Z","repository":{"id":239498514,"uuid":"73723221","full_name":"carpedeum-fr/geomesse-api","owner":"carpedeum-fr","description":"GeoMesse, an app to get mass time in your country (starting with France 🇫🇷🥖🧀🍷🚬)","archived":false,"fork":false,"pushed_at":"2018-05-28T19:49:42.000Z","size":3077,"stargazers_count":12,"open_issues_count":3,"forks_count":3,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-24T16:45:01.418Z","etag":null,"topics":["catholic","chatbot","php","symfony","symfony-api","symfony-application","symfony3"],"latest_commit_sha":null,"homepage":"https://api.geomesse.com","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/carpedeum-fr.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":"2016-11-14T16:13:05.000Z","updated_at":"2025-02-05T02:27:50.000Z","dependencies_parsed_at":null,"dependency_job_id":"1ef2d3ca-314f-4493-8d0b-81c53bc99a05","html_url":"https://github.com/carpedeum-fr/geomesse-api","commit_stats":{"total_commits":96,"total_committers":2,"mean_commits":48.0,"dds":"0.10416666666666663","last_synced_commit":"ea53c9d80b69d4c732dd2761acbb97d782e63e5d"},"previous_names":["carpedeum-fr/geomesse-api"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/carpedeum-fr%2Fgeomesse-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/carpedeum-fr%2Fgeomesse-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/carpedeum-fr%2Fgeomesse-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/carpedeum-fr%2Fgeomesse-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/carpedeum-fr","download_url":"https://codeload.github.com/carpedeum-fr/geomesse-api/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248279198,"owners_count":21077405,"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":["catholic","chatbot","php","symfony","symfony-api","symfony-application","symfony3"],"created_at":"2024-05-12T22:13:49.390Z","updated_at":"2025-04-10T19:04:27.861Z","avatar_url":"https://github.com/carpedeum-fr.png","language":"PHP","funding_links":[],"categories":["API"],"sub_categories":[],"readme":"carpedeum\n=========\n\n[![CircleCI](https://circleci.com/gh/carpedeum-fr/geomesse-api/tree/master.svg?style=svg)](https://circleci.com/gh/carpedeum-fr/geomesse-api/tree/master)\n\n[![SensioLabsInsight](https://insight.sensiolabs.com/projects/80e5ae43-8a1c-40da-896b-183f398227b3/big.png)](https://insight.sensiolabs.com/projects/80e5ae43-8a1c-40da-896b-183f398227b3)\n\n## Routes\n\nFirst run `php bin/console server:start`\n\n### API\n\nAvailable API routes (from `php bin/console debug:router`):\n\n```\n -------------------------- -------- -------- ------ -----------------------------------\n  Name                       Method   Scheme   Host   Path\n -------------------------- -------- -------- ------ -----------------------------------\n  api_place_index            ANY      ANY      ANY    /api/place/.{_format}\n  api_place_show             ANY      ANY      ANY    /api/place/{id}.{_format}\n```\n\nExample:\n\n```\nhttp://127.0.0.1:8000/place/\n```\n\n#### oAuth2\n\nTo create a client:\n\n```\n[0] % php bin/console cd:oauth-server:client-create facebook --grant-type=password\nAdded a new client with name facebook and public id 3_2786j2vc3gn4g80o4s8o0g0ws84ow0440gkoo80g4wwk4gsgkk.\n```\n\nWarning, in DB, the client `random_id` is stored without the `2_`. But if you forgot it, it will not work.\n\nTo retrieve an access token :\n\nhttp://127.0.0.1:8000/oauth/v2/token?client_id=[RANDOM_ID]\u0026client_secret=[SECRET]\u0026grant_type=password\u0026username=[USERNAME]\u0026password=[PASSWORD]\nhttp://127.0.0.1:8000/oauth/v2/token?client_id=3_2786j2vc3gn4g80o4s8o0g0ws84ow0440gkoo80g4wwk4gsgkk\u0026client_secret=4hpy482lklmo8w0gocwocs84wksc844w8cc0848okwsk8c8wgc\u0026grant_type=password\u0026username=lolo\u0026password=lolo\n\nIt return something like:\n\n```\n{\"access_token\":\"N2RmYTM3ODkyNjU2ODA0MGFlM2UzODAwNTliNTMxYjI3YjZiMTk5MWI0NDFiMmY1MTEwMTkyYzhlY2JlZmM1Zg\",\"expires_in\":3600,\"token_type\":\"bearer\",\"scope\":null,\"refresh_token\":\"ODcwOTQ5ZTcxMmRmOGUyZGE1ZTZhMjJiOGJiMTUzYWU2NDE4MDFmMjVhYThkNGY1NzFjZjhkNDQ5NGM0NDBhMw\"}\n```\n\nThen you can access api with the token like:\n\nhttp://127.0.0.1:8000/api/place/?access_token=[ACCESS_TOKEN]\nhttp://127.0.0.1:8000/api/place/?access_token=N2RmYTM3ODkyNjU2ODA0MGFlM2UzODAwNTliNTMxYjI3YjZiMTk5MWI0NDFiMmY1MTEwMTkyYzhlY2JlZmM1Zg\n\nFor an hour only, then the token will be too old.\n\nDon't forget to add the `fos:oauth-server:clean` command to remove old tokens.\n\n### Front\n\nAvailable API routes (from `php bin/console debug:router`):\n\n```\n -------------------------- -------- -------- ------ -----------------------------------\n  Name                       Method   Scheme   Host   Path\n -------------------------- -------- -------- ------ -----------------------------------\n  place_index                ANY      ANY      ANY    /place/\n  place_show                 ANY      ANY      ANY    /place/{id}\n```\n\nExample:\n\n```\nhttp://127.0.0.1:8000/api/place/\n```\n\n## Assets\n\nOn a new server :\n\n```\nnpm install -g gulp\nAPACHEUSER=`ps aux | grep -E '[a]pache|[h]ttpd' | grep -v root | head -1 | cut -d\\  -f1`\nsudo setfacl -R -m u:$APACHEUSER:rwX -m u:`whoami`:rwX var/cache var/logs var/sessions\nsudo setfacl -dR -m u:$APACHEUSER:rwX -m u:`whoami`:rwX var/cache var/logs var/sessions\n```\n\nAfter each release :\n\n```\nphp bin/console assets:install --symlink\nnpm install\ngulp\n```\n\n## Importing existing schema\n\n### Reverse engineering\n\nHere is [the doc for reverse engineering](http://symfony.com/doc/current/doctrine/reverse_engineering.html).\n\nAs explained in the documentation, we can follow these steps:\n\n```\nphp bin/console doctrine:mapping:import --force CarpeDeumBundle yml\nphp bin/console doctrine:mapping:convert annotation ./src\n```\n\nAnd `php bin/console doctrine:generate:entities CarpeDeumBundle` can be replaced by PhpStorm Getter/Setter generation.\n\nIf `doctrine:mapping:import` fail like that:\n\n```\n  [Symfony\\Component\\Debug\\Exception\\ContextErrorException]\n  Warning: class_parents(): Class Place does not exist and could not be loaded\n```\n\nThen you need to comment `SyliusResourceBundle` in `AppKernel.php`.\n\n### Move to InnoDB\n\nTo generate the engine switch :\n\n```\nSELECT CONCAT('ALTER TABLE ',table_schema,'.',table_name,' engine=InnoDB;') \nFROM information_schema.tables \nWHERE engine = 'MyISAM';\n```\n\nand run the resulting requests that look like :\n\n```\nALTER TABLE geomesse.PLACES engine=InnoDB;\nALTER TABLE geomesse.PLACESCHEDULE engine=InnoDB;\n```\n\n### Update accents\n\n```\nUPDATE place SET name = REPLACE(name, 'Ã©', 'é'), address = REPLACE(address, 'Ã©', 'é'), address_1 = REPLACE(address_1, 'Ã©', 'é'), address_2 = REPLACE(address_2, 'Ã©', 'é'), city = REPLACE(city, 'Ã©', 'é'), history = REPLACE(history, 'Ã©', 'é'), schedule_notes = REPLACE(schedule_notes, 'Ã©', 'é'), schedule_eucharist = REPLACE(schedule_eucharist, 'Ã©', 'é');\nUPDATE place SET name = REPLACE(name, 'Ã¨', 'è'), address = REPLACE(address, 'Ã¨', 'è'), address_1 = REPLACE(address_1, 'Ã¨', 'è'), address_2 = REPLACE(address_2, 'Ã¨', 'è'), city = REPLACE(city, 'Ã¨', 'è'), history = REPLACE(history, 'Ã¨', 'è'), schedule_notes = REPLACE(schedule_notes, 'Ã¨', 'è'), schedule_eucharist = REPLACE(schedule_eucharist, 'Ã¨', 'è');\nUPDATE place SET name = REPLACE(name, 'Ã§', 'ç'), address = REPLACE(address, 'Ã§', 'ç'), address_1 = REPLACE(address_1, 'Ã§', 'ç'), address_2 = REPLACE(address_2, 'Ã§', 'ç'), city = REPLACE(city, 'Ã§', 'ç'), history = REPLACE(history, 'Ã§', 'ç'), schedule_notes = REPLACE(schedule_notes, 'Ã§', 'ç'), schedule_eucharist = REPLACE(schedule_eucharist, 'Ã§', 'ç');\nUPDATE place SET name = REPLACE(name, 'Å“', 'œ'), address = REPLACE(address, 'Å“', 'œ'), address_1 = REPLACE(address_1, 'Å“', 'œ'), address_2 = REPLACE(address_2, 'Å“', 'œ'), city = REPLACE(city, 'Å“', 'œ'), history = REPLACE(history, 'Å“', 'œ'), schedule_notes = REPLACE(schedule_notes, 'Å“', 'œ'), schedule_eucharist = REPLACE(schedule_eucharist, 'Å“', 'œ');\nUPDATE place SET name = REPLACE(name, 'Ã¢', 'â'), address = REPLACE(address, 'Ã¢', 'â'), address_1 = REPLACE(address_1, 'Ã¢', 'â'), address_2 = REPLACE(address_2, 'Ã¢', 'â'), city = REPLACE(city, 'Ã¢', 'â'), history = REPLACE(history, 'Ã¢', 'â'), schedule_notes = REPLACE(schedule_notes, 'Ã¢', 'â'), schedule_eucharist = REPLACE(schedule_eucharist, 'Ã¢', 'â');\nUPDATE place SET name = REPLACE(name, 'Ã‰', 'É'), address = REPLACE(address, 'Ã‰', 'É'), address_1 = REPLACE(address_1, 'Ã‰', 'É'), address_2 = REPLACE(address_2, 'Ã‰', 'É'), city = REPLACE(city, 'Ã‰', 'É'), history = REPLACE(history, 'Ã‰', 'É'), schedule_notes = REPLACE(schedule_notes, 'Ã‰', 'É'), schedule_eucharist = REPLACE(schedule_eucharist, 'Ã‰', 'É');\nUPDATE place SET name = REPLACE(name, 'Ã´', 'ô'), address = REPLACE(address, 'Ã´', 'ô'), address_1 = REPLACE(address_1, 'Ã´', 'ô'), address_2 = REPLACE(address_2, 'Ã´', 'ô'), city = REPLACE(city, 'Ã´', 'ô'), history = REPLACE(history, 'Ã´', 'ô'), schedule_notes = REPLACE(schedule_notes, 'Ã´', 'ô'), schedule_eucharist = REPLACE(schedule_eucharist, 'Ã´', 'ô');\nUPDATE place SET name = REPLACE(name, 'Ã®', 'î'), address = REPLACE(address, 'Ã®', 'î'), address_1 = REPLACE(address_1, 'Ã®', 'î'), address_2 = REPLACE(address_2, 'Ã®', 'î'), city = REPLACE(city, 'Ã®', 'î'), history = REPLACE(history, 'Ã®', 'î'), schedule_notes = REPLACE(schedule_notes, 'Ã®', 'î'), schedule_eucharist = REPLACE(schedule_eucharist, 'Ã®', 'î');\nUPDATE place SET name = REPLACE(name, 'Ì‚', 'â'), address = REPLACE(address, 'Ì‚', 'â'), address_1 = REPLACE(address_1, 'Ì‚', 'â'), address_2 = REPLACE(address_2, 'Ì‚', 'â'), city = REPLACE(city, 'Ì‚', 'â'), history = REPLACE(history, 'Ì‚', 'â'), schedule_notes = REPLACE(schedule_notes, 'Ì‚', 'â'), schedule_eucharist = REPLACE(schedule_eucharist, 'Ì‚', 'â');\nUPDATE place SET name = REPLACE(name, 'aâ', 'â'), address = REPLACE(address, 'aâ', 'â'), address_1 = REPLACE(address_1, 'aâ', 'â'), address_2 = REPLACE(address_2, 'aâ', 'â'), city = REPLACE(city, 'aâ', 'â'), history = REPLACE(history, 'aâ', 'â'), schedule_notes = REPLACE(schedule_notes, 'aâ', 'â'), schedule_eucharist = REPLACE(schedule_eucharist, 'aâ', 'â');\n```\n\n### Old stuff\n\n— prerequisites :\n```\nSET sql_mode=(SELECT REPLACE(@@sql_mode,'NO_ZERO_DATE',''));\n```\n\n— \n\nAllow missing private key : \n- http://stackoverflow.com/questions/6547319/importing-tables-from-external-database-in-symfony2-with-doctrine/15766666#15766666\n- https://github.com/albertvolkman/doctrine2/compare/override-primary-key-req.patch\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcarpedeum-fr%2Fgeomesse-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcarpedeum-fr%2Fgeomesse-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcarpedeum-fr%2Fgeomesse-api/lists"}