{"id":762,"date":"2024-10-01T16:37:48","date_gmt":"2024-10-01T16:37:48","guid":{"rendered":"http:\/\/localhost:10023\/?page_id=762"},"modified":"2024-10-01T16:39:59","modified_gmt":"2024-10-01T16:39:59","slug":"api-euromilhoes-2","status":"publish","type":"page","link":"https:\/\/filipedemacedo.com\/pt\/api-euromilhoes-2\/","title":{"rendered":"Api Euromilh\u00f5es"},"content":{"rendered":"<div class=\"wp-block-greenshift-blocks-row gspb_row gspb_row-id-gsbp-03e6aba\" id=\"gspb_row-id-gsbp-03e6aba\"><div class=\"gspb_row__content\"> \n<div class=\"wp-block-greenshift-blocks-row-column gspb_row__col--6 gspb_col-id-gsbp-a496378\" id=\"gspb_col-id-gsbp-a496378\">\n<h2 id=\"gspb_heading-id-gsbp-d82a591\" class=\"gspb_heading gspb_heading-id-gsbp-d82a591\">What type of project is it?<\/h2>\n\n\n\n<div id=\"gspb_text-id-gsbp-cbf7b92\" class=\"gspb_text gspb_text-id-gsbp-cbf7b92\">This is a personal project that arose from the need within a group of friends who play Euromillions twice a week. I realized that there was no public API available that provided the results of the draws in real time, and since we, in our WhatsApp group, wanted to receive the results as soon as the draws were made, I decided to develop my own API. Using this API, I created a script that compares the numbers drawn with our numbers played and sends us the result directly on WhatsApp, making the process more practical and automatic.<\/div>\n\n\n\n<div class=\"gspb_button_wrapper gspb_button-id-gsbp-5b435f5\" id=\"gspb_button-id-gsbp-5b435f5\"><a class=\"wp-block-greenshift-blocks-buttonbox gspb-buttonbox wp-element-button\" href=\"https:\/\/github.com\/filipegdemacedo\/api_euromilhoes\" target=\"_blank\" rel=\"noopener nofollow\"><span class=\"gspb-buttonbox-textwrap\"><span class=\"gspb-buttonbox-text\"><span class=\"gspb-buttonbox-title\">Euromilh\u00f5es repository<\/span><\/span><\/span><\/a><\/div>\n<\/div>\n\n\n\n<div class=\"wp-block-greenshift-blocks-row-column gspb_row__col--6 gspb_col-id-gsbp-1e23594\" id=\"gspb_col-id-gsbp-1e23594\">\n<h2 id=\"gspb_heading-id-gsbp-58112f4\" class=\"gspb_heading gspb_heading-id-gsbp-58112f4\">Technologies I Used<\/h2>\n\n\n\n<div class=\"wp-block-greenshift-blocks-iconlist gspb_iconsList gspb_iconsList-id-gsbp-4b880b4\" id=\"gspb_iconsList-id-gsbp-4b880b4\"><div class=\"gspb_iconsList__item\" data-id=\"0\"><svg class=\"\" style=\"display:inline-block;vertical-align:middle\" width=\"18\" height=\"18\" viewbox=\"0 0 1024 1024\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\"><path style=\"fill:#565D66\" d=\"M965.392 598.552l-65.22-37.654c1.958-14.684 3.075-31.661 3.075-48.899s-1.117-34.215-3.284-50.863l0.209 1.964 65.22-37.654c19.152-11.056 28.39-33.804 22.092-55.002-22.428-75.498-62.35-143.456-115.070-199.19-15.268-16.14-39.634-19.672-58.874-8.564l-65.124 37.596c-24.475-18.797-52.351-35.208-82.151-47.995l-2.527-0.965v-75.228c0-22.26-15.304-41.608-36.968-46.734-75.288-17.818-154.236-17.82-229.54 0-21.662 5.126-36.968 24.472-36.968 46.734v75.228c-32.327 13.752-60.203 30.162-85.603 49.641l0.925-0.681-65.124-37.596c-19.242-11.108-43.608-7.576-58.874 8.564-52.72 55.734-92.642 123.694-115.070 199.19-6.298 21.198 2.94 43.944 22.092 55.002l65.22 37.654c-1.958 14.684-3.075 31.661-3.075 48.899s1.117 34.215 3.284 50.863l-0.209-1.964-65.22 37.654c-19.152 11.056-28.39 33.804-22.092 55.002 22.428 75.496 62.35 143.456 115.070 199.19 15.268 16.14 39.634 19.672 58.874 8.566l65.124-37.596c24.474 18.798 52.351 35.207 82.151 47.994l2.527 0.964v75.228c0 22.26 15.304 41.608 36.968 46.734 75.29 17.818 154.236 17.82 229.54 0 21.662-5.126 36.968-24.472 36.968-46.734v-75.228c32.326-13.752 60.203-30.162 85.604-49.64l-0.926 0.682 65.124 37.596c19.24 11.108 43.606 7.576 58.874-8.566 52.72-55.734 92.642-123.694 115.070-199.19 6.298-21.198-2.94-43.944-22.092-55.002zM834.434 799.474l-92.618-53.48c-53.976 46.142-73.118 57.752-142.078 82.118v106.958c-26.375 5.694-56.676 8.955-87.738 8.955s-61.363-3.261-90.578-9.459l2.84 0.504v-106.958c-67.242-23.758-86.71-34.79-142.078-82.118l-92.618 53.48c-39.42-44.18-69.378-95.978-87.858-151.916l92.658-53.48c-13.070-70.834-13.076-93.288 0-164.158l-92.658-53.48c18.48-55.938 48.44-107.738 87.858-151.938l92.618 53.52c54.754-46.868 74.126-58.13 142.078-82.138v-106.956c26.376-5.703 56.675-8.97 87.738-8.97s61.363 3.267 90.575 9.475l-2.837-0.505v106.958c67.956 24.010 87.33 35.274 142.078 82.138l92.618-53.52c39.418 44.198 69.378 95.998 87.858 151.938l-92.658 53.48c13.072 70.852 13.076 93.288 0 164.158l92.658 53.48c-18.48 55.936-48.438 107.736-87.858 151.914zM512 320c-105.87 0-192 86.13-192 192s86.13 192 192 192 192-86.13 192-192-86.13-192-192-192zM512 640c-70.58 0-128-57.42-128-128s57.42-128 128-128 128 57.42 128 128-57.42 128-128 128z\"><\/path><\/svg><span class=\"gspb_iconsList__item__text\">Python<\/span><\/div><div class=\"gspb_iconsList__item\" data-id=\"1\"><svg class=\"\" style=\"display:inline-block;vertical-align:middle\" width=\"18\" height=\"18\" viewbox=\"0 0 1024 1024\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\"><path style=\"fill:#565D66\" d=\"M965.392 598.552l-65.22-37.654c1.958-14.684 3.075-31.661 3.075-48.899s-1.117-34.215-3.284-50.863l0.209 1.964 65.22-37.654c19.152-11.056 28.39-33.804 22.092-55.002-22.428-75.498-62.35-143.456-115.070-199.19-15.268-16.14-39.634-19.672-58.874-8.564l-65.124 37.596c-24.475-18.797-52.351-35.208-82.151-47.995l-2.527-0.965v-75.228c0-22.26-15.304-41.608-36.968-46.734-75.288-17.818-154.236-17.82-229.54 0-21.662 5.126-36.968 24.472-36.968 46.734v75.228c-32.327 13.752-60.203 30.162-85.603 49.641l0.925-0.681-65.124-37.596c-19.242-11.108-43.608-7.576-58.874 8.564-52.72 55.734-92.642 123.694-115.070 199.19-6.298 21.198 2.94 43.944 22.092 55.002l65.22 37.654c-1.958 14.684-3.075 31.661-3.075 48.899s1.117 34.215 3.284 50.863l-0.209-1.964-65.22 37.654c-19.152 11.056-28.39 33.804-22.092 55.002 22.428 75.496 62.35 143.456 115.070 199.19 15.268 16.14 39.634 19.672 58.874 8.566l65.124-37.596c24.474 18.798 52.351 35.207 82.151 47.994l2.527 0.964v75.228c0 22.26 15.304 41.608 36.968 46.734 75.29 17.818 154.236 17.82 229.54 0 21.662-5.126 36.968-24.472 36.968-46.734v-75.228c32.326-13.752 60.203-30.162 85.604-49.64l-0.926 0.682 65.124 37.596c19.24 11.108 43.606 7.576 58.874-8.566 52.72-55.734 92.642-123.694 115.070-199.19 6.298-21.198-2.94-43.944-22.092-55.002zM834.434 799.474l-92.618-53.48c-53.976 46.142-73.118 57.752-142.078 82.118v106.958c-26.375 5.694-56.676 8.955-87.738 8.955s-61.363-3.261-90.578-9.459l2.84 0.504v-106.958c-67.242-23.758-86.71-34.79-142.078-82.118l-92.618 53.48c-39.42-44.18-69.378-95.978-87.858-151.916l92.658-53.48c-13.070-70.834-13.076-93.288 0-164.158l-92.658-53.48c18.48-55.938 48.44-107.738 87.858-151.938l92.618 53.52c54.754-46.868 74.126-58.13 142.078-82.138v-106.956c26.376-5.703 56.675-8.97 87.738-8.97s61.363 3.267 90.575 9.475l-2.837-0.505v106.958c67.956 24.010 87.33 35.274 142.078 82.138l92.618-53.52c39.418 44.198 69.378 95.998 87.858 151.938l-92.658 53.48c13.072 70.852 13.076 93.288 0 164.158l92.658 53.48c-18.48 55.936-48.438 107.736-87.858 151.914zM512 320c-105.87 0-192 86.13-192 192s86.13 192 192 192 192-86.13 192-192-86.13-192-192-192zM512 640c-70.58 0-128-57.42-128-128s57.42-128 128-128 128 57.42 128 128-57.42 128-128 128z\"><\/path><\/svg><span class=\"gspb_iconsList__item__text\">CSS<\/span><\/div><div class=\"gspb_iconsList__item\" data-id=\"2\"><svg class=\"\" style=\"display:inline-block;vertical-align:middle\" width=\"18\" height=\"18\" viewbox=\"0 0 1024 1024\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\"><path style=\"fill:#565D66\" d=\"M965.392 598.552l-65.22-37.654c1.958-14.684 3.075-31.661 3.075-48.899s-1.117-34.215-3.284-50.863l0.209 1.964 65.22-37.654c19.152-11.056 28.39-33.804 22.092-55.002-22.428-75.498-62.35-143.456-115.070-199.19-15.268-16.14-39.634-19.672-58.874-8.564l-65.124 37.596c-24.475-18.797-52.351-35.208-82.151-47.995l-2.527-0.965v-75.228c0-22.26-15.304-41.608-36.968-46.734-75.288-17.818-154.236-17.82-229.54 0-21.662 5.126-36.968 24.472-36.968 46.734v75.228c-32.327 13.752-60.203 30.162-85.603 49.641l0.925-0.681-65.124-37.596c-19.242-11.108-43.608-7.576-58.874 8.564-52.72 55.734-92.642 123.694-115.070 199.19-6.298 21.198 2.94 43.944 22.092 55.002l65.22 37.654c-1.958 14.684-3.075 31.661-3.075 48.899s1.117 34.215 3.284 50.863l-0.209-1.964-65.22 37.654c-19.152 11.056-28.39 33.804-22.092 55.002 22.428 75.496 62.35 143.456 115.070 199.19 15.268 16.14 39.634 19.672 58.874 8.566l65.124-37.596c24.474 18.798 52.351 35.207 82.151 47.994l2.527 0.964v75.228c0 22.26 15.304 41.608 36.968 46.734 75.29 17.818 154.236 17.82 229.54 0 21.662-5.126 36.968-24.472 36.968-46.734v-75.228c32.326-13.752 60.203-30.162 85.604-49.64l-0.926 0.682 65.124 37.596c19.24 11.108 43.606 7.576 58.874-8.566 52.72-55.734 92.642-123.694 115.070-199.19 6.298-21.198-2.94-43.944-22.092-55.002zM834.434 799.474l-92.618-53.48c-53.976 46.142-73.118 57.752-142.078 82.118v106.958c-26.375 5.694-56.676 8.955-87.738 8.955s-61.363-3.261-90.578-9.459l2.84 0.504v-106.958c-67.242-23.758-86.71-34.79-142.078-82.118l-92.618 53.48c-39.42-44.18-69.378-95.978-87.858-151.916l92.658-53.48c-13.070-70.834-13.076-93.288 0-164.158l-92.658-53.48c18.48-55.938 48.44-107.738 87.858-151.938l92.618 53.52c54.754-46.868 74.126-58.13 142.078-82.138v-106.956c26.376-5.703 56.675-8.97 87.738-8.97s61.363 3.267 90.575 9.475l-2.837-0.505v106.958c67.956 24.010 87.33 35.274 142.078 82.138l92.618-53.52c39.418 44.198 69.378 95.998 87.858 151.938l-92.658 53.48c13.072 70.852 13.076 93.288 0 164.158l92.658 53.48c-18.48 55.936-48.438 107.736-87.858 151.914zM512 320c-105.87 0-192 86.13-192 192s86.13 192 192 192 192-86.13 192-192-86.13-192-192-192zM512 640c-70.58 0-128-57.42-128-128s57.42-128 128-128 128 57.42 128 128-57.42 128-128 128z\"><\/path><\/svg><span class=\"gspb_iconsList__item__text\">Scheduler by GitHub<\/span><\/div><\/div>\n<\/div>\n <\/div><\/div>\n\n\n\n<h2 id=\"gspb_heading-id-gsbp-7770712\" class=\"gspb_heading gspb_heading-id-gsbp-7770712\">What I learned<\/h2>\n\n\n\n<p>Although I had already had some contact with Python during my undergraduate degree, I didn&#8217;t have much practical experience with the language. This project was an excellent opportunity to improve my knowledge of Python and, more importantly, learn how to create and host a functional API. I also learned how to set up automated routines using GitHub Scheduler, which was a new experience for me. In addition, I acquired skills in integrating APIs with external services, such as WhatsApp, to notify the results of the draws.<\/p>\n\n\n\n<h2 id=\"gspb_heading-id-gsbp-aa3ff4b\" class=\"gspb_heading gspb_heading-id-gsbp-aa3ff4b\">Biggest Difficulties<\/h2>\n\n\n\n<div id=\"gspb_text-id-gsbp-704d9b7\" class=\"gspb_text gspb_text-id-gsbp-704d9b7\">The biggest challenge of this project was developing everything using free platforms and services, which brought some limitations and technical difficulties. For example, configuring the scheduler on GitHub to run correctly and ensure that the messages were sent without errors required a lot of time and adjustments. In addition, since my experience with Python was limited, I needed to dedicate some time to learn and solve the integration and automation problems. However, overcoming these obstacles was a rewarding experience, as I was able to achieve the goal efficiently.<\/div>","protected":false},"excerpt":{"rendered":"<p>Although I had already had some contact with Python during my undergraduate degree, I didn&#8217;t have much practical experience with the language. This project was an excellent opportunity to improve my knowledge of Python and, more importantly, learn how to create and host a functional API. I also learned how to set up automated routines [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_gspb_post_css":"#gspb_row-id-gsbp-03e6aba{justify-content:space-between;display:flex;flex-wrap:wrap;margin-top:50px;margin-bottom:46px}#gspb_row-id-gsbp-03e6aba>.gspb_row__content{display:flex;justify-content:space-between;margin:0 auto;width:100%;flex-wrap:wrap}.gspb_row{position:relative}div[id^=gspb_col-id]{box-sizing:border-box;position:relative;padding:15px min(3vw,20px)}body.gspb-bodyfront #gspb_row-id-gsbp-03e6aba>.gspb_row__content{width:var(--theme-container-width, 1200px);max-width:var(--theme-normal-container-max-width, 1200px)}#gspb_col-id-gsbp-a496378.gspb_row__col--6{width:50%}@media (max-width:575.98px){#gspb_col-id-gsbp-a496378.gspb_row__col--6{width:100%}}.gspb_text-id-gsbp-cbf7b92{margin-bottom:24px!important}#gspb_button-id-gsbp-5b435f5{display:flex;justify-content:flex-start}#gspb_button-id-gsbp-5b435f5 .gspb-buttonbox-text{display:flex;flex-direction:column}#gspb_button-id-gsbp-5b435f5>.gspb-buttonbox{box-sizing:border-box}#gspb_col-id-gsbp-1e23594.gspb_row__col--6{width:50%}@media (max-width:575.98px){#gspb_col-id-gsbp-1e23594.gspb_row__col--6{width:100%}}#gspb_iconsList-id-gsbp-4b880b4.gspb_iconsList .gspb_iconsList__item__text{margin-left:15px}#gspb_iconsList-id-gsbp-4b880b4.gspb_iconsList .gspb_iconsList__item{display:flex;flex-direction:row;align-items:center;position:relative}#gspb_iconsList-id-gsbp-4b880b4.gspb_iconsList .gspb_iconsList__item svg path{fill:var(--theme-link-initial-color, #2184f9)!important}#gspb_iconsList-id-gsbp-4b880b4.gspb_iconsList [data-id='0'] svg,#gspb_iconsList-id-gsbp-4b880b4.gspb_iconsList [data-id='1'] svg,#gspb_iconsList-id-gsbp-4b880b4.gspb_iconsList [data-id='2'] svg,body #gspb_iconsList-id-gsbp-4b880b4.gspb_iconsList .gspb_iconsList__item img,body #gspb_iconsList-id-gsbp-4b880b4.gspb_iconsList .gspb_iconsList__item svg{margin:0!important}#gspb_heading-id-gsbp-7770712{margin-top:0}#gspb_heading-id-gsbp-aa3ff4b{margin-top:50px}.gspb_text-id-gsbp-704d9b7{color:var(--wp--preset--color--palette-color-2, var(--theme-palette-color-2, #24417C))}","footnotes":""},"class_list":["post-762","page","type-page","status-publish","hentry"],"blocksy_meta":[],"_links":{"self":[{"href":"https:\/\/filipedemacedo.com\/pt\/wp-json\/wp\/v2\/pages\/762","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/filipedemacedo.com\/pt\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/filipedemacedo.com\/pt\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/filipedemacedo.com\/pt\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/filipedemacedo.com\/pt\/wp-json\/wp\/v2\/comments?post=762"}],"version-history":[{"count":3,"href":"https:\/\/filipedemacedo.com\/pt\/wp-json\/wp\/v2\/pages\/762\/revisions"}],"predecessor-version":[{"id":765,"href":"https:\/\/filipedemacedo.com\/pt\/wp-json\/wp\/v2\/pages\/762\/revisions\/765"}],"wp:attachment":[{"href":"https:\/\/filipedemacedo.com\/pt\/wp-json\/wp\/v2\/media?parent=762"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}