{"id":38229,"date":"2023-08-25T09:24:08","date_gmt":"2023-08-25T15:24:08","guid":{"rendered":"https:\/\/iieg.gob.mx\/ns\/?page_id=38229"},"modified":"2024-12-10T12:32:24","modified_gmt":"2024-12-10T18:32:24","slug":"api-iieg-2-3","status":"publish","type":"page","link":"https:\/\/iieg.gob.mx\/ns\/?page_id=38229","title":{"rendered":"API IIEG MiBici"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-post\" data-elementor-id=\"38229\" class=\"elementor elementor-38229\">\n\t\t\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-f2f19a2 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"f2f19a2\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-a4b1704\" data-id=\"a4b1704\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-9666d30 elementor-widget elementor-widget-heading\" data-id=\"9666d30\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\"><a href=\"https:\/\/iieg.gob.mx\/ns\/?page_id=25290\">MiBici<\/a><\/h2>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-8641269 elementor-widget elementor-widget-spacer\" data-id=\"8641269\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"spacer.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"elementor-spacer\">\n\t\t\t<div class=\"elementor-spacer-inner\"><\/div>\n\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-f8078e1 animated-slow elementor-invisible elementor-widget elementor-widget-text-editor\" data-id=\"f8078e1\" data-element_type=\"widget\" data-e-type=\"widget\" data-settings=\"{&quot;_animation&quot;:&quot;fadeIn&quot;}\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<blockquote><p style=\"text-align: left;\"><strong><span style=\"font-size: 14pt;\">Conjuntos de datos<\/span><\/strong><\/p><\/blockquote>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-39014ae elementor-align-start animated-slow elementor-icon-list--layout-traditional elementor-list-item-link-full_width elementor-invisible elementor-widget elementor-widget-icon-list\" data-id=\"39014ae\" data-element_type=\"widget\" data-e-type=\"widget\" data-settings=\"{&quot;_animation&quot;:&quot;fadeIn&quot;}\" data-widget_type=\"icon-list.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<ul class=\"elementor-icon-list-items\">\n\t\t\t\t\t\t\t<li class=\"elementor-icon-list-item\">\n\t\t\t\t\t\t\t\t\t\t\t<span class=\"elementor-icon-list-icon\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<i class=\"fa fa-database\" aria-hidden=\"true\"><\/i>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<\/span>\n\t\t\t\t\t\t\t\t\t\t<span class=\"elementor-icon-list-text\">CSV<\/span>\n\t\t\t\t\t\t\t\t\t<\/li>\n\t\t\t\t\t\t\t\t<li class=\"elementor-icon-list-item\">\n\t\t\t\t\t\t\t\t\t\t\t<span class=\"elementor-icon-list-icon\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<i class=\"fa fa-file-excel-o\" aria-hidden=\"true\"><\/i>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<\/span>\n\t\t\t\t\t\t\t\t\t\t<span class=\"elementor-icon-list-text\">Diccionario de datos<\/span>\n\t\t\t\t\t\t\t\t\t<\/li>\n\t\t\t\t\t\t\t\t<li class=\"elementor-icon-list-item\">\n\t\t\t\t\t\t\t\t\t\t\t<span class=\"elementor-icon-list-icon\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<i class=\"fa fa-file-excel-o\" aria-hidden=\"true\"><\/i>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<\/span>\n\t\t\t\t\t\t\t\t\t\t<span class=\"elementor-icon-list-text\">Metadato<\/span>\n\t\t\t\t\t\t\t\t\t<\/li>\n\t\t\t\t\t\t<\/ul>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-976b1d6 elementor-widget elementor-widget-spacer\" data-id=\"976b1d6\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"spacer.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"elementor-spacer\">\n\t\t\t<div class=\"elementor-spacer-inner\"><\/div>\n\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-f668f82 animated-slow elementor-invisible elementor-widget elementor-widget-text-editor\" data-id=\"f668f82\" data-element_type=\"widget\" data-e-type=\"widget\" data-settings=\"{&quot;_animation&quot;:&quot;fadeIn&quot;}\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<blockquote><p><strong><span style=\"font-size: 14pt;\">API<\/span><\/strong><\/p><\/blockquote>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-ef92297 elementor-align-start animated-slow elementor-icon-list--layout-traditional elementor-list-item-link-full_width elementor-invisible elementor-widget elementor-widget-icon-list\" data-id=\"ef92297\" data-element_type=\"widget\" data-e-type=\"widget\" data-settings=\"{&quot;_animation&quot;:&quot;fadeIn&quot;}\" data-widget_type=\"icon-list.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<ul class=\"elementor-icon-list-items\">\n\t\t\t\t\t\t\t<li class=\"elementor-icon-list-item\">\n\t\t\t\t\t\t\t\t\t\t\t<a href=\"http:\/\/apiiieg.jalisco.gob.mx\/api\/acumuladomb?page=1&#038;year=2014\" target=\"_blank\">\n\n\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"elementor-icon-list-icon\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<i class=\"fa fa-gear\" aria-hidden=\"true\"><\/i>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<\/span>\n\t\t\t\t\t\t\t\t\t\t<span class=\"elementor-icon-list-text\">API<\/span>\n\t\t\t\t\t\t\t\t\t\t\t<\/a>\n\t\t\t\t\t\t\t\t\t<\/li>\n\t\t\t\t\t\t<\/ul>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-e796164 elementor-widget elementor-widget-spacer\" data-id=\"e796164\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"spacer.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"elementor-spacer\">\n\t\t\t<div class=\"elementor-spacer-inner\"><\/div>\n\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-4615367 animated-slow elementor-invisible elementor-widget elementor-widget-text-editor\" data-id=\"4615367\" data-element_type=\"widget\" data-e-type=\"widget\" data-settings=\"{&quot;_animation&quot;:&quot;fadeIn&quot;}\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<blockquote><p><strong><span style=\"font-size: 14pt;\">M\u00e9todo<\/span><\/strong><\/p><\/blockquote>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-63033e2 animated-slow elementor-invisible elementor-widget elementor-widget-text-editor\" data-id=\"63033e2\" data-element_type=\"widget\" data-e-type=\"widget\" data-settings=\"{&quot;_animation&quot;:&quot;fadeIn&quot;}\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p style=\"text-align: justify;\">El M\u00e9todo de conexi\u00f3n tiene <span style=\"font-size: 14pt;\"><strong>dos par\u00e1metros:<\/strong><\/span> la p\u00e1gina de consulta (page) y el a\u00f1o (year), por ejemplo:\u00a0http:\/\/apiiieg.jalisco.gob.mx\/api\/acumuladomb?page=1&amp;year=2014 En cada p\u00e1gina se muestran <span style=\"font-size: 14pt;\"><b>2,000<\/b><\/span> registros de un total de <span style=\"font-size: 14pt;\"><b>16, 285,027<\/b><\/span><\/p><table style=\"height: 198px; width: 0%; border-collapse: collapse; margin-left: auto; margin-right: auto;\" border=\"0\"><tbody><tr style=\"height: 18px;\"><td style=\"width: 10.9763%; height: 18px; text-align: center;\"><strong>A\u00f1o<\/strong><\/td><td style=\"width: 15.4824%; height: 18px; text-align: center;\"><strong>Registros<\/strong><\/td><td style=\"width: 62.2297%; height: 18px; text-align: center;\"><strong>P\u00e1ginas<\/strong><\/td><\/tr><tr style=\"height: 18px;\"><td style=\"width: 10.9763%; height: 18px; text-align: center;\">2014<\/td><td style=\"width: 15.4824%; height: 18px; text-align: center;\">18,423<\/td><td style=\"width: 62.2297%; height: 18px; text-align: center;\">9.2<\/td><\/tr><tr style=\"height: 18px;\"><td style=\"width: 10.9763%; height: 18px; text-align: center;\">2015<\/td><td style=\"width: 15.4824%; height: 18px; text-align: center;\">363,000<\/td><td style=\"width: 62.2297%; height: 18px; text-align: center;\">181.5<\/td><\/tr><tr style=\"height: 18px;\"><td style=\"width: 10.9763%; height: 18px; text-align: center;\">2016<\/td><td style=\"width: 15.4824%; height: 18px; text-align: center;\">698,294<\/td><td style=\"width: 62.2297%; height: 18px; text-align: center;\">349.1<\/td><\/tr><tr style=\"height: 18px;\"><td style=\"width: 10.9763%; height: 18px; text-align: center;\">2017<\/td><td style=\"width: 15.4824%; height: 18px; text-align: center;\">1,721,902<\/td><td style=\"width: 62.2297%; height: 18px; text-align: center;\">861<\/td><\/tr><tr style=\"height: 18px;\"><td style=\"width: 10.9763%; height: 18px; text-align: center;\">2018<\/td><td style=\"width: 15.4824%; height: 18px; text-align: center;\">2,169,659<\/td><td style=\"width: 62.2297%; height: 18px; text-align: center;\">1,084.8<\/td><\/tr><tr style=\"height: 18px;\"><td style=\"width: 10.9763%; height: 18px; text-align: center;\">2019<\/td><td style=\"width: 15.4824%; height: 18px; text-align: center;\">2,857,285<\/td><td style=\"width: 62.2297%; height: 18px; text-align: center;\">1,428.6<\/td><\/tr><tr style=\"height: 18px;\"><td style=\"width: 10.9763%; height: 18px; text-align: center;\">2020<\/td><td style=\"width: 15.4824%; height: 18px; text-align: center;\">1,955,846<\/td><td style=\"width: 62.2297%; height: 18px; text-align: center;\">977.9<\/td><\/tr><tr style=\"height: 18px;\"><td style=\"width: 10.9763%; height: 18px; text-align: center;\">2021<\/td><td style=\"width: 15.4824%; height: 18px; text-align: center;\">2,192,418<\/td><td style=\"width: 62.2297%; height: 18px; text-align: center;\">1,096.2<\/td><\/tr><tr style=\"height: 18px;\"><td style=\"width: 10.9763%; height: 18px; text-align: center;\">2022<\/td><td style=\"width: 15.4824%; height: 18px; text-align: center;\">2,704,758<\/td><td style=\"width: 62.2297%; height: 18px; text-align: center;\">1,352.4<\/td><\/tr><tr style=\"height: 18px;\"><td style=\"width: 10.9763%; height: 18px; text-align: center;\">2023<\/td><td style=\"width: 15.4824%; height: 18px; text-align: center;\">1,603,441<\/td><td style=\"width: 62.2297%; height: 18px; text-align: center;\">801.7<\/td><\/tr><\/tbody><\/table>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-012fde9 elementor-widget elementor-widget-spacer\" data-id=\"012fde9\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"spacer.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"elementor-spacer\">\n\t\t\t<div class=\"elementor-spacer-inner\"><\/div>\n\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-46a4787 animated-slow elementor-tabs-view-horizontal elementor-invisible elementor-widget elementor-widget-tabs\" data-id=\"46a4787\" data-element_type=\"widget\" data-e-type=\"widget\" data-settings=\"{&quot;_animation&quot;:&quot;fadeIn&quot;}\" data-widget_type=\"tabs.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"elementor-tabs\">\n\t\t\t<div class=\"elementor-tabs-wrapper\" role=\"tablist\" >\n\t\t\t\t\t\t\t\t\t<div id=\"elementor-tab-title-7401\" class=\"elementor-tab-title elementor-tab-desktop-title\" aria-selected=\"true\" data-tab=\"1\" role=\"tab\" tabindex=\"0\" aria-controls=\"elementor-tab-content-7401\" aria-expanded=\"false\">Python<\/div>\n\t\t\t\t\t\t\t\t\t<div id=\"elementor-tab-title-7402\" class=\"elementor-tab-title elementor-tab-desktop-title\" aria-selected=\"false\" data-tab=\"2\" role=\"tab\" tabindex=\"-1\" aria-controls=\"elementor-tab-content-7402\" aria-expanded=\"false\">R<\/div>\n\t\t\t\t\t\t\t\t\t<div id=\"elementor-tab-title-7403\" class=\"elementor-tab-title elementor-tab-desktop-title\" aria-selected=\"false\" data-tab=\"3\" role=\"tab\" tabindex=\"-1\" aria-controls=\"elementor-tab-content-7403\" aria-expanded=\"false\">Node<\/div>\n\t\t\t\t\t\t\t\t\t<div id=\"elementor-tab-title-7404\" class=\"elementor-tab-title elementor-tab-desktop-title\" aria-selected=\"false\" data-tab=\"4\" role=\"tab\" tabindex=\"-1\" aria-controls=\"elementor-tab-content-7404\" aria-expanded=\"false\">Java<\/div>\n\t\t\t\t\t\t\t\t\t<div id=\"elementor-tab-title-7405\" class=\"elementor-tab-title elementor-tab-desktop-title\" aria-selected=\"false\" data-tab=\"5\" role=\"tab\" tabindex=\"-1\" aria-controls=\"elementor-tab-content-7405\" aria-expanded=\"false\">Go<\/div>\n\t\t\t\t\t\t\t\t\t<div id=\"elementor-tab-title-7406\" class=\"elementor-tab-title elementor-tab-desktop-title\" aria-selected=\"false\" data-tab=\"6\" role=\"tab\" tabindex=\"-1\" aria-controls=\"elementor-tab-content-7406\" aria-expanded=\"false\">Ruby<\/div>\n\t\t\t\t\t\t\t\t\t<div id=\"elementor-tab-title-7407\" class=\"elementor-tab-title elementor-tab-desktop-title\" aria-selected=\"false\" data-tab=\"7\" role=\"tab\" tabindex=\"-1\" aria-controls=\"elementor-tab-content-7407\" aria-expanded=\"false\">PHP<\/div>\n\t\t\t\t\t\t\t\t\t<div id=\"elementor-tab-title-7408\" class=\"elementor-tab-title elementor-tab-desktop-title\" aria-selected=\"false\" data-tab=\"8\" role=\"tab\" tabindex=\"-1\" aria-controls=\"elementor-tab-content-7408\" aria-expanded=\"false\">C#<\/div>\n\t\t\t\t\t\t\t\t\t<div id=\"elementor-tab-title-7409\" class=\"elementor-tab-title elementor-tab-desktop-title\" aria-selected=\"false\" data-tab=\"9\" role=\"tab\" tabindex=\"-1\" aria-controls=\"elementor-tab-content-7409\" aria-expanded=\"false\">JavaScript<\/div>\n\t\t\t\t\t\t\t\t\t<div id=\"elementor-tab-title-74010\" class=\"elementor-tab-title elementor-tab-desktop-title\" aria-selected=\"false\" data-tab=\"10\" role=\"tab\" tabindex=\"-1\" aria-controls=\"elementor-tab-content-74010\" aria-expanded=\"false\">MATLAB<\/div>\n\t\t\t\t\t\t\t<\/div>\n\t\t\t<div class=\"elementor-tabs-content-wrapper\" role=\"tablist\" aria-orientation=\"vertical\">\n\t\t\t\t\t\t\t\t\t<div class=\"elementor-tab-title elementor-tab-mobile-title\" aria-selected=\"true\" data-tab=\"1\" role=\"tab\" tabindex=\"0\" aria-controls=\"elementor-tab-content-7401\" aria-expanded=\"false\">Python<\/div>\n\t\t\t\t\t<div id=\"elementor-tab-content-7401\" class=\"elementor-tab-content elementor-clearfix\" data-tab=\"1\" role=\"tabpanel\" aria-labelledby=\"elementor-tab-title-7401\" tabindex=\"0\" hidden=\"false\"><p><span style=\"color: #797979;\"># ===========================================================================<\/span><\/p><p><span style=\"color: #797979;\"># Instituto de Informaci\u00f3n Estad\u00edstica y Geogr\u00e1fica de Jalisco<\/span><\/p><p><span style=\"color: #797979;\"># Direcci\u00f3n de Informaci\u00f3n Estad\u00edstica de Gobierno, Seguridad P\u00fablica e Impartici\u00f3n de Justicia<\/span><\/p><p><span style=\"color: #797979;\"># ===========================================================================<\/span><\/p><p><span style=\"color: #b05279;\">import<\/span> requests<\/p><p><span style=\"color: #797979;\"># URL de la API a la que deseas conectarte<\/span><br \/>url <span style=\"color: #b05279;\">=<\/span>\u00a0<span style=\"color: #e5b567;\">&#8220;http:\/\/apiiieg.jalisco.gob.mx\/api\/acumuladomb?page=1&amp;year=2014&#8221;<\/span><\/p><p><span style=\"color: #797979;\"># Realizar una solicitud GET a la API<\/span><br \/>response <span style=\"color: #b05279;\">=<\/span> requests.get(url)<\/p><p><span style=\"color: #797979;\"># Verificar el c\u00f3digo de respuesta de la solicitud<\/span><br \/><span style=\"color: #b05279;\">if<\/span> response.status_code<span style=\"color: #b05279;\"> ==<\/span> <span style=\"color: #9e86c8;\">200<\/span>:<br \/><span style=\"color: #797979;\"># La solicitud fue exitosa<\/span><br \/>data <span style=\"color: #b05279;\">=<\/span> response.json()<br \/><span style=\"color: #797979;\"># Hacer algo con los datos recibidos<\/span><br \/><span style=\"color: #6c99bb;\">print<\/span>(data)<br \/><span style=\"color: #b05279;\">else<\/span>:<br \/><span style=\"color: #797979;\"># La solicitud no fue exitosa<\/span><br \/><span style=\"color: #6c99bb;\">print<\/span>(<span style=\"color: #e5b567;\">&#8220;Error al realizar la solicitud. C\u00f3digo de respuesta:&#8221;<\/span>, response.status_code)<\/p><\/div>\n\t\t\t\t\t\t\t\t\t<div class=\"elementor-tab-title elementor-tab-mobile-title\" aria-selected=\"false\" data-tab=\"2\" role=\"tab\" tabindex=\"-1\" aria-controls=\"elementor-tab-content-7402\" aria-expanded=\"false\">R<\/div>\n\t\t\t\t\t<div id=\"elementor-tab-content-7402\" class=\"elementor-tab-content elementor-clearfix\" data-tab=\"2\" role=\"tabpanel\" aria-labelledby=\"elementor-tab-title-7402\" tabindex=\"0\" hidden=\"hidden\"><p><span style=\"color: #797979;\"># ===========================================================================<\/span><\/p><p><span style=\"color: #797979;\"># Instituto de Informaci\u00f3n Estad\u00edstica y Geogr\u00e1fica de Jalisco<\/span><\/p><p><span style=\"color: #797979;\"># Direcci\u00f3n de Informaci\u00f3n Estad\u00edstica de Gobierno, Seguridad P\u00fablica e Impartici\u00f3n de Justicia<\/span><\/p><p><span style=\"color: #797979;\"># ===========================================================================<\/span><\/p><p><span style=\"color: #6c99bb;\">library<\/span>(httr)<\/p><p><span style=\"color: #797979;\"># URL de la API a la que deseas conectarte<\/span><br \/><span style=\"color: #d6d6d6;\">url<\/span> <span style=\"color: #b05279;\">&lt;-<\/span> <span style=\"color: #e5b567;\">&#8220;http:\/\/apiiieg.jalisco.gob.mx\/api\/acumuladomb?page=1&amp;year=2014&#8221;<\/span><\/p><p><span style=\"color: #797979;\"># Realizar una solicitud GET<\/span><br \/><span style=\"color: #d6d6d6;\">response<\/span> <span style=\"color: #b05279;\">&lt;-<\/span> GET(url)<\/p><p><span style=\"color: #797979;\"># Obtener el c\u00f3digo de respuesta<\/span><br \/>response_code <span style=\"color: #b05279;\">&lt;-<\/span> status_code(response)<\/p><p><span style=\"color: #797979;\"># Verificar el c\u00f3digo de respuesta<\/span><br \/><span style=\"color: #b05279;\">if<\/span> (response_code <span style=\"color: #b05279;\">==<\/span> <span style=\"color: #9e86c8;\">200<\/span>) {<br \/><span style=\"color: #797979;\"># La solicitud fue exitosa<\/span><br \/>data <span style=\"color: #b05279;\">&lt;-<\/span> content(response, <span style=\"color: #e5b567;\">&#8220;text&#8221;<\/span>)<br \/><span style=\"color: #797979;\"># Hacer algo con los datos recibidos<\/span><br \/><span style=\"color: #6c99bb;\">print<\/span>(data)<br \/>} <span style=\"color: #b05279;\">else<\/span> {<br \/><span style=\"color: #797979;\"># La solicitud no fue exitosa<\/span><br \/><span style=\"color: #6c99bb;\">print<\/span>(<span style=\"color: #6c99bb;\">paste<\/span>(<span style=\"color: #e5b567;\">&#8220;Error al realizar la solicitud. C\u00f3digo de respuesta:&#8221;<\/span>, response_code))<br \/>}<\/p><\/div>\n\t\t\t\t\t\t\t\t\t<div class=\"elementor-tab-title elementor-tab-mobile-title\" aria-selected=\"false\" data-tab=\"3\" role=\"tab\" tabindex=\"-1\" aria-controls=\"elementor-tab-content-7403\" aria-expanded=\"false\">Node<\/div>\n\t\t\t\t\t<div id=\"elementor-tab-content-7403\" class=\"elementor-tab-content elementor-clearfix\" data-tab=\"3\" role=\"tabpanel\" aria-labelledby=\"elementor-tab-title-7403\" tabindex=\"0\" hidden=\"hidden\"><p><span style=\"color: #797979;\"># ===========================================================================<\/span><\/p><p><span style=\"color: #797979;\"># Instituto de Informaci\u00f3n Estad\u00edstica y Geogr\u00e1fica de Jalisco<\/span><\/p><p><span style=\"color: #797979;\"># Direcci\u00f3n de Informaci\u00f3n Estad\u00edstica de Gobierno, Seguridad P\u00fablica e Impartici\u00f3n de Justicia<\/span><\/p><p><span style=\"color: #797979;\"># ===========================================================================<\/span><\/p><p><span style=\"color: #6c99bb;\">const<\/span> https = require(&#8216;https&#8217;);<\/p><p><span style=\"color: #797979;\">\/\/ Opciones de la solicitud HTTP<\/span><br \/><span style=\"color: #6c99bb;\">const<\/span> options = {<br \/>hostname: <span style=\"color: #e5b567;\">&#8216;http:\/\/apiiieg.jalisco.gob.mx\/api\/acumuladomb?page=1&amp;year=2014&#8217;<\/span>,<br \/>path: &#8216;\/&#8217;,<br \/>method: &#8216;GET&#8217;<br \/>};<\/p><p><span style=\"color: #797979;\">\/\/ Realizar la solicitud HTTP<\/span><br \/>const req = https.request(options, (res) =&gt; {<br \/><span style=\"color: #6c99bb;\">let<\/span> data = &#8221;;<\/p><p><span style=\"color: #797979;\">\/\/ Recibir los datos de la respuesta<\/span><br \/>res.on(&#8216;data&#8217;, (chunk) =&gt; {<br \/>data += chunk;<br \/>});<\/p><p><span style=\"color: #797979;\">\/\/ El evento &#8216;end&#8217; se dispara cuando se han recibido todos los datos<\/span><br \/>res.on(&#8216;end&#8217;, () =&gt; {<br \/><span style=\"color: #797979;\">\/\/ Hacer algo con los datos recibidos<\/span><br \/><span style=\"color: #6c99bb;\">console<\/span>.log(data);<br \/>});<br \/>});<\/p><p><span style=\"color: #797979;\">\/\/ Manejar errores en la solicitud<\/span><br \/>req.on(&#8216;error&#8217;, (error) =&gt; {<br \/><span style=\"color: #6c99bb;\">console<\/span>.error(&#8216;Error al realizar la solicitud:&#8217;, error);<br \/>});<\/p><p><span style=\"color: #797979;\">\/\/ Finalizar la solicitud<\/span><br \/>req.end();<\/p><\/div>\n\t\t\t\t\t\t\t\t\t<div class=\"elementor-tab-title elementor-tab-mobile-title\" aria-selected=\"false\" data-tab=\"4\" role=\"tab\" tabindex=\"-1\" aria-controls=\"elementor-tab-content-7404\" aria-expanded=\"false\">Java<\/div>\n\t\t\t\t\t<div id=\"elementor-tab-content-7404\" class=\"elementor-tab-content elementor-clearfix\" data-tab=\"4\" role=\"tabpanel\" aria-labelledby=\"elementor-tab-title-7404\" tabindex=\"0\" hidden=\"hidden\"><p><span style=\"color: #797979;\"># ===========================================================================<\/span><\/p><p><span style=\"color: #797979;\"># Instituto de Informaci\u00f3n Estad\u00edstica y Geogr\u00e1fica de Jalisco<\/span><\/p><p><span style=\"color: #797979;\"># Direcci\u00f3n de Informaci\u00f3n Estad\u00edstica de Gobierno, Seguridad P\u00fablica e Impartici\u00f3n de Justicia<\/span><\/p><p><span style=\"color: #797979;\"># ===========================================================================<\/span><\/p><p><span style=\"color: #6c99bb;\">import<\/span> java.io.BufferedReader;<br \/><span style=\"color: #6c99bb;\">import<\/span> java.io.InputStreamReader;<br \/><span style=\"color: #6c99bb;\">import<\/span> java.net.HttpURLConnection;<br \/><span style=\"color: #6c99bb;\">import<\/span> java.net.URL;<\/p><p><span style=\"color: #6c99bb;\">public class<\/span> <span style=\"color: #b4d273;\">HttpClientExample<\/span> {<br \/><span style=\"color: #6c99bb;\">public static<\/span> <span style=\"color: #b4d273;\">void<\/span> <span style=\"color: #e5b567;\">main<\/span><span style=\"color: #9e86c8;\">(<\/span><span style=\"color: #b4d273;\">String<\/span><span style=\"color: #6c99bb;\">[]<\/span> args<span style=\"color: #9e86c8;\">) {<\/span><br \/><span style=\"color: #9e86c8;\">try<\/span> <span style=\"color: #6c99bb;\">{<\/span><br \/>\/\/ URL de la API a la que deseas conectarte<br \/><span style=\"color: #b4d273;\">URL<\/span> <span style=\"color: #6c99bb;\">url<\/span> = <span style=\"color: #9e86c8;\">new<\/span> URL(&#8220;http:\/\/apiiieg.jalisco.gob.mx\/api\/acumuladomb?page=1&amp;year=2014&#8221;);<\/p><p>\/\/ Abrir una conexi\u00f3n HTTP<br \/><span style=\"color: #b4d273;\">HttpURLConnection<\/span> connection = (HttpURLConnection) url.<span style=\"color: #e5b567;\">openConnection<\/span>();<\/p><p>\/\/ Establecer el m\u00e9todo de la solicitud HTTP (GET en este caso)<br \/><span style=\"color: #6c99bb;\">connection<\/span>.<span style=\"color: #e5b567;\">setRequestMethod<\/span>(&#8220;GET&#8221;);<\/p><p>\/\/ Obtener el c\u00f3digo de respuesta de la solicitud<br \/><span style=\"color: #b4d273;\">int<\/span> <span style=\"color: #6c99bb;\">responseCode<\/span> = <span style=\"color: #6c99bb;\">connection<\/span>.<span style=\"color: #e5b567;\">getResponseCode<\/span>();<\/p><p><span style=\"color: #9e86c8;\">if<\/span> (responseCode == <span style=\"color: #6c99bb;\">HttpURLConnection.HTTP_OK<\/span>) {<br \/>\/\/ La solicitud fue exitosa<br \/><span style=\"color: #b4d273;\">BufferedReader<\/span> reader = <span style=\"color: #9e86c8;\">new<\/span> <span style=\"color: #e5b567;\">BufferedReader<\/span><span style=\"color: #9e86c8;\">(new<\/span> <span style=\"color: #e5b567;\">InputStreamReader<\/span>(<span style=\"color: #6c99bb;\">connection<\/span>.getInputStream())<span style=\"color: #9e86c8;\">)<\/span>;<br \/><span style=\"color: #b4d273;\">String<\/span> line;<br \/><span style=\"color: #b4d273;\">StringBuilder<\/span> response = <span style=\"color: #9e86c8;\">new<\/span> <span style=\"color: #e5b567;\">StringBuilder<\/span><span style=\"color: #9e86c8;\">()<\/span>;<\/p><p>\/\/ Leer la respuesta l\u00ednea por l\u00ednea<br \/><span style=\"color: #9e86c8;\">while<\/span> <span style=\"color: #9e86c8;\">(<\/span>(<span style=\"color: #6c99bb;\">line<\/span> = reader.<span style=\"color: #e5b567;\">readLine<\/span>()) != null<span style=\"color: #9e86c8;\">) {<\/span><br \/><span style=\"color: #6c99bb;\">response<\/span>.<span style=\"color: #e5b567;\">append<\/span>(line);<br \/><span style=\"color: #9e86c8;\">}<\/span><br \/><span style=\"color: #6c99bb;\">reader<\/span>.<span style=\"color: #e5b567;\">close<\/span><span style=\"color: #9e86c8;\">()<\/span>;<\/p><p>\/\/ Hacer algo con los datos recibidos<br \/><span style=\"color: #6c99bb;\">System.out<\/span>.<span style=\"color: #e5b567;\">println<\/span>(response.<span style=\"color: #e5b567;\">toString<\/span>()<span style=\"color: #9e86c8;\">)<\/span>;<br \/>} <span style=\"color: #9e86c8;\">else<\/span> {<br \/>\/\/ La solicitud no fue exitosa<br \/><span style=\"color: #6c99bb;\">System.out<\/span>.<span style=\"color: #e5b567;\">println<\/span><span style=\"color: #9e86c8;\">(<\/span>&#8220;Error al realizar la solicitud. C\u00f3digo de respuesta: &#8221; + responseCode<span style=\"color: #9e86c8;\">)<\/span>;<br \/>}<\/p><p>\/\/ Cerrar la conexi\u00f3n<br \/><span style=\"color: #6c99bb;\">connection<\/span>.<span style=\"color: #e5b567;\">disconnect<\/span>();<br \/>} <span style=\"color: #9e86c8;\">catch<\/span> (<span style=\"color: #b4d273;\">Exception<\/span> e) {<br \/><span style=\"color: #6c99bb;\">e<\/span>.<span style=\"color: #e5b567;\">printStackTrace<\/span>();<br \/>}<br \/><span style=\"color: #9e86c8;\">}<\/span><br \/>}<\/p><\/div>\n\t\t\t\t\t\t\t\t\t<div class=\"elementor-tab-title elementor-tab-mobile-title\" aria-selected=\"false\" data-tab=\"5\" role=\"tab\" tabindex=\"-1\" aria-controls=\"elementor-tab-content-7405\" aria-expanded=\"false\">Go<\/div>\n\t\t\t\t\t<div id=\"elementor-tab-content-7405\" class=\"elementor-tab-content elementor-clearfix\" data-tab=\"5\" role=\"tabpanel\" aria-labelledby=\"elementor-tab-title-7405\" tabindex=\"0\" hidden=\"hidden\"><div><p><span style=\"color: #797979;\"># ===========================================================================<\/span><\/p><p><span style=\"color: #797979;\"># Instituto de Informaci\u00f3n Estad\u00edstica y Geogr\u00e1fica de Jalisco<\/span><\/p><p><span style=\"color: #797979;\"># Direcci\u00f3n de Informaci\u00f3n Estad\u00edstica de Gobierno, Seguridad P\u00fablica e Impartici\u00f3n de Justicia<\/span><\/p><p><span style=\"color: #797979;\"># ===========================================================================<\/span><\/p><\/div><div><span style=\"color: #6c99bb;\">package<\/span> main<\/div><div>\u00a0<\/div><div><span style=\"color: #6c99bb;\">import<\/span> <span style=\"color: #e5b567;\">(<\/span><\/div><div><span style=\"color: #e87d3e;\">&#8220;fmt&#8221;<\/span><\/div><div><span style=\"color: #e87d3e;\">&#8220;io\/ioutil&#8221;<\/span><\/div><div><span style=\"color: #e87d3e;\">&#8220;net\/http&#8221;<\/span><\/div><div><span style=\"color: #e5b567;\">)<\/span><\/div><div>\u00a0<\/div><div><span style=\"color: #6c99bb;\">func<\/span> <span style=\"color: #e5b567;\">main()<\/span> {<\/div><div><span style=\"color: #797979;\">\/\/ URL de la API a la que deseas conectarte<\/span><\/div><div><span style=\"color: #b4d273;\">http:\/\/apiiieg.jalisco.gob.mx\/api\/acumuladomb?page=1&amp;year=2014<\/span><\/div><\/div>\n\t\t\t\t\t\t\t\t\t<div class=\"elementor-tab-title elementor-tab-mobile-title\" aria-selected=\"false\" data-tab=\"6\" role=\"tab\" tabindex=\"-1\" aria-controls=\"elementor-tab-content-7406\" aria-expanded=\"false\">Ruby<\/div>\n\t\t\t\t\t<div id=\"elementor-tab-content-7406\" class=\"elementor-tab-content elementor-clearfix\" data-tab=\"6\" role=\"tabpanel\" aria-labelledby=\"elementor-tab-title-7406\" tabindex=\"0\" hidden=\"hidden\"><p><span style=\"color: #797979;\"># ===========================================================================<\/span><\/p><p><span style=\"color: #797979;\"># Instituto de Informaci\u00f3n Estad\u00edstica y Geogr\u00e1fica de Jalisco<\/span><\/p><p><span style=\"color: #797979;\"># Direcci\u00f3n de Informaci\u00f3n Estad\u00edstica de Gobierno, Seguridad P\u00fablica e Impartici\u00f3n de Justicia<\/span><\/p><p><span style=\"color: #797979;\"># ===========================================================================<\/span><\/p><p><span style=\"color: #6c99bb;\">require<\/span> <span style=\"color: #e87d3e;\">&#8216;net\/http&#8217;<\/span><br \/><span style=\"color: #6c99bb;\">require<\/span> <span style=\"color: #e87d3e;\">&#8216;json&#8217;<\/span><\/p><p><span style=\"color: #797979;\"># URL de la API a la que deseas conectarte<\/span><br \/><span style=\"color: #6c99bb;\">url<\/span> = <span style=\"color: #b4d273;\">URI<\/span>.<span style=\"color: #e5b567;\">parse<\/span>(<span style=\"color: #e87d3e;\">&#8216;http:\/\/apiiieg.jalisco.gob.mx\/api\/acumuladomb?page=1&amp;year=2014&#8217;<\/span>)<\/p><p><span style=\"color: #797979;\"># Crear una nueva instancia de Net::HTTP para establecer la conexi\u00f3n<\/span><br \/><span style=\"color: #6c99bb;\">http<\/span> = <span style=\"color: #b4d273;\">Net<\/span>::<span style=\"color: #b4d273;\">HTTP<\/span>.<span style=\"color: #6c99bb;\">new<\/span>(<span style=\"color: #6c99bb;\">url<\/span>.<span style=\"color: #e5b567;\">host<\/span>, <span style=\"color: #6c99bb;\">url<\/span>.<span style=\"color: #e5b567;\">port<\/span>)<br \/><span style=\"color: #6c99bb;\">http<\/span>.<span style=\"color: #e5b567;\">use_ssl<\/span> = <span style=\"color: #6c99bb;\">true<\/span> # Habilitar SSL si la API utiliza HTTPS<\/p><p><span style=\"color: #797979;\"># Realizar una solicitud GET<\/span><br \/>request = <span style=\"color: #b4d273;\">Net<\/span>::<span style=\"color: #b4d273;\">HTTP<\/span>::<span style=\"color: #b4d273;\">Get<\/span>.<span style=\"color: #6c99bb;\">new<\/span>(<span style=\"color: #6c99bb;\">url<\/span>.<span style=\"color: #e5b567;\">request_uri<\/span>)<\/p><p><span style=\"color: #797979;\"># Enviar la solicitud y obtener la respuesta<\/span><br \/><span style=\"color: #6c99bb;\">response<\/span> = <span style=\"color: #6c99bb;\">http<\/span>.<span style=\"color: #e5b567;\">request<\/span>(<span style=\"color: #6c99bb;\">request<\/span>)<\/p><p><span style=\"color: #797979;\"># Verificar el c\u00f3digo de respuesta<\/span><br \/>if <span style=\"color: #6c99bb;\">response<\/span>.<span style=\"color: #e5b567;\">code.to_i<\/span> == 200<br \/><span style=\"color: #797979;\"># La solicitud fue exitosa<\/span><br \/><span style=\"color: #6c99bb;\">data<\/span> = <span style=\"color: #b4d273;\">JSON<\/span>.<span style=\"color: #e5b567;\">parse<\/span>(<span style=\"color: #6c99bb;\">response<\/span>.<span style=\"color: #e5b567;\">body<\/span>)<br \/><span style=\"color: #797979;\"># Hacer algo con los datos recibidos<\/span><br \/><span style=\"color: #e5b567;\">data<\/span><br \/>else<br \/><span style=\"color: #797979;\"># La solicitud no fue exitosa<\/span><br \/><span style=\"color: #e5b567;\">puts<\/span> &#8220;<span style=\"color: #e87d3e;\">Error al realizar la solicitud. C\u00f3digo de respuesta:<\/span> #{<span style=\"color: #6c99bb;\">response<\/span>.<span style=\"color: #e5b567;\">code<\/span>}&#8221;<br \/>end<\/p><\/div>\n\t\t\t\t\t\t\t\t\t<div class=\"elementor-tab-title elementor-tab-mobile-title\" aria-selected=\"false\" data-tab=\"7\" role=\"tab\" tabindex=\"-1\" aria-controls=\"elementor-tab-content-7407\" aria-expanded=\"false\">PHP<\/div>\n\t\t\t\t\t<div id=\"elementor-tab-content-7407\" class=\"elementor-tab-content elementor-clearfix\" data-tab=\"7\" role=\"tabpanel\" aria-labelledby=\"elementor-tab-title-7407\" tabindex=\"0\" hidden=\"hidden\"><p><span style=\"color: #797979;\"># ===========================================================================<\/span><\/p><p><span style=\"color: #797979;\"># Instituto de Informaci\u00f3n Estad\u00edstica y Geogr\u00e1fica de Jalisco<\/span><\/p><p><span style=\"color: #797979;\"># Direcci\u00f3n de Informaci\u00f3n Estad\u00edstica de Gobierno, Seguridad P\u00fablica e Impartici\u00f3n de Justicia<\/span><\/p><p><span style=\"color: #797979;\"># ===========================================================================<\/span><\/p><p><span style=\"color: #b05279;\"><!--?php <\/span><\/p>\n<p><!--?php <br ?--><span style=\"color: #797979;\">\/\/ URL de la API a la que deseas conectarte<\/span><br \/><span style=\"color: #6c99bb;\">$url<\/span> = <span style=\"color: #e5b567;\">&#8220;http:\/\/apiiieg.jalisco.gob.mx\/api\/acumuladomb?page=1&amp;year=2014&#8221;<\/span>;<\/span><\/p><p><span style=\"color: #797979;\">\/\/ Crear una instancia de cURL<\/span><br \/><span style=\"color: #6c99bb;\">$curl<\/span> = curl_init(<span style=\"color: #6c99bb;\">$url<\/span>);<\/p><p><span style=\"color: #797979;\">\/\/ Establecer opciones de cURL<\/span><br \/>curl_setopt(<span style=\"color: #6c99bb;\">$curl<\/span>, CURLOPT_RETURNTRANSFER, true);<\/p><p><span style=\"color: #797979;\">\/\/ Realizar una solicitud GET<\/span><br \/><span style=\"color: #6c99bb;\">$response<\/span> = curl_exec(<span style=\"color: #6c99bb;\">$curl<\/span>);<\/p><p><span style=\"color: #797979;\">\/\/ Obtener el c\u00f3digo de respuesta<\/span><br \/><span style=\"color: #6c99bb;\">$responseCode<\/span> = curl_getinfo(<span style=\"color: #6c99bb;\">$curl<\/span>, CURLINFO_HTTP_CODE);<\/p><p><span style=\"color: #797979;\">\/\/ Verificar el c\u00f3digo de respuesta<\/span><br \/>i<span style=\"color: #b4d273;\">f<\/span> (<span style=\"color: #6c99bb;\">$responseCode<\/span> == 200) {<br \/><span style=\"color: #797979;\">\/\/ La solicitud fue exitosa<\/span><br \/><span style=\"color: #6c99bb;\">$data<\/span> = json_decode(<span style=\"color: #6c99bb;\">$response<\/span>);<br \/><span style=\"color: #797979;\">\/\/ Hacer algo con los datos recibidos<\/span><br \/>print_r(<span style=\"color: #6c99bb;\">$data<\/span>);<br \/>} <span style=\"color: #b4d273;\">else<\/span> {<br \/><span style=\"color: #797979;\">\/\/ La solicitud no fue exitosa<\/span><br \/>echo <span style=\"color: #e5b567;\">&#8220;Error al realizar la solicitud. C\u00f3digo de respuesta: &#8220;<\/span> . <span style=\"color: #6c99bb;\">$responseCode<\/span>;<br \/>}<\/p><p><span style=\"color: #797979;\">\/\/ Cerrar la conexi\u00f3n cURL<\/span><br \/>curl_close(<span style=\"color: #6c99bb;\">$curl<\/span>);<br \/><span style=\"color: #b05279;\">?&gt;<\/span><\/p><\/div>\n\t\t\t\t\t\t\t\t\t<div class=\"elementor-tab-title elementor-tab-mobile-title\" aria-selected=\"false\" data-tab=\"8\" role=\"tab\" tabindex=\"-1\" aria-controls=\"elementor-tab-content-7408\" aria-expanded=\"false\">C#<\/div>\n\t\t\t\t\t<div id=\"elementor-tab-content-7408\" class=\"elementor-tab-content elementor-clearfix\" data-tab=\"8\" role=\"tabpanel\" aria-labelledby=\"elementor-tab-title-7408\" tabindex=\"0\" hidden=\"hidden\"><p><span style=\"color: #797979;\"># ===========================================================================<\/span><\/p><p><span style=\"color: #797979;\"># Instituto de Informaci\u00f3n Estad\u00edstica y Geogr\u00e1fica de Jalisco<\/span><\/p><p><span style=\"color: #797979;\"># Direcci\u00f3n de Informaci\u00f3n Estad\u00edstica de Gobierno, Seguridad P\u00fablica e Impartici\u00f3n de Justicia<\/span><\/p><p><span style=\"color: #797979;\"># ===========================================================================<\/span><\/p><p><span style=\"color: #9e86c8;\">using<\/span> <span style=\"color: #b4d273;\">System<\/span>;<br \/><span style=\"color: #9e86c8;\">using<\/span> <span style=\"color: #b4d273;\">System.Net.Http<\/span>;<br \/><span style=\"color: #9e86c8;\">using<\/span> <span style=\"color: #b4d273;\">System.Threading.Tasks<\/span>;<\/p><p><span style=\"color: #6c99bb;\">class<\/span> <span style=\"color: #b4d273;\">Program<\/span><br \/>{<br \/><span style=\"color: #6c99bb;\">static async<\/span> <span style=\"color: #b4d273;\">Task<\/span> <span style=\"color: #e5b567;\">Main<\/span><span style=\"color: #9e86c8;\">(<\/span><span style=\"color: #6c99bb;\">string[]<\/span> args<span style=\"color: #9e86c8;\">)<\/span><br \/><span style=\"color: #9e86c8;\">{<\/span><br \/><span style=\"color: #797979;\">\/\/ URL de la API a la que deseas conectarte<\/span><br \/><span style=\"color: #6c99bb;\">string url<\/span> = <span style=\"color: #e87d3e;\">&#8220;http:\/\/apiiieg.jalisco.gob.mx\/api\/acumuladomb?page=1&amp;year=2014&#8221;<\/span>;<\/p><p><span style=\"color: #797979;\">\/\/ Crear una instancia de HttpClient<\/span><br \/><span style=\"color: #b4d273;\">HttpClient<\/span> client = <span style=\"color: #6c99bb;\">new<\/span> <span style=\"color: #b4d273;\">HttpClient<\/span><span style=\"color: #6c99bb;\">()<\/span>;<\/p><p><span style=\"color: #797979;\">\/\/ Realizar una solicitud GET y obtener la respuesta<\/span><br \/><span style=\"color: #b4d273;\">HttpResponseMessage<\/span> <span style=\"color: #6c99bb;\">response<\/span> =<span style=\"color: #6c99bb;\"> await client<\/span>.<span style=\"color: #e5b567;\">GetAsync<\/span><span style=\"color: #6c99bb;\">(url)<\/span>;<\/p><p><span style=\"color: #797979;\">\/\/ Verificar el c\u00f3digo de respuesta<\/span><br \/><span style=\"color: #9e86c8;\">if<\/span> <span style=\"color: #6c99bb;\">(response.IsSuccessStatusCode)<\/span><br \/><span style=\"color: #6c99bb;\">{<\/span><br \/><span style=\"color: #797979;\">\/\/ La solicitud fue exitosa<\/span><br \/><span style=\"color: #6c99bb;\">string<\/span> <span style=\"color: #6c99bb;\">responseBody<\/span> = <span style=\"color: #6c99bb;\">await response.Content<\/span>.<span style=\"color: #e5b567;\">ReadAsStringAsync<\/span>();<br \/><span style=\"color: #797979;\">\/\/ Hacer algo con los datos recibidos<\/span><br \/>Console.WriteLine(<span style=\"color: #6c99bb;\">responseBody<\/span>);<br \/>}<br \/><span style=\"color: #9e86c8;\">else<\/span><br \/>{<br \/><span style=\"color: #797979;\">\/\/ La solicitud no fue exitosa<\/span><br \/><span style=\"color: #6c99bb;\">Console<\/span>.<span style=\"color: #e5b567;\">WriteLine<\/span>(<span style=\"color: #e87d3e;\">$&#8221;Error al realizar la solicitud. C\u00f3digo de respuesta:<\/span> {r<span style=\"color: #6c99bb;\">esponse.StatusCode<\/span>}&#8221;);<br \/>}<br \/><span style=\"color: #9e86c8;\">}<\/span><br \/>}<\/p><\/div>\n\t\t\t\t\t\t\t\t\t<div class=\"elementor-tab-title elementor-tab-mobile-title\" aria-selected=\"false\" data-tab=\"9\" role=\"tab\" tabindex=\"-1\" aria-controls=\"elementor-tab-content-7409\" aria-expanded=\"false\">JavaScript<\/div>\n\t\t\t\t\t<div id=\"elementor-tab-content-7409\" class=\"elementor-tab-content elementor-clearfix\" data-tab=\"9\" role=\"tabpanel\" aria-labelledby=\"elementor-tab-title-7409\" tabindex=\"0\" hidden=\"hidden\"><p><span style=\"color: #797979;\"># ===========================================================================<\/span><\/p><p><span style=\"color: #797979;\"># Instituto de Informaci\u00f3n Estad\u00edstica y Geogr\u00e1fica de Jalisco<\/span><\/p><p><span style=\"color: #797979;\"># Direcci\u00f3n de Informaci\u00f3n Estad\u00edstica de Gobierno, Seguridad P\u00fablica e Impartici\u00f3n de Justicia<\/span><\/p><p><span style=\"color: #797979;\"># ===========================================================================<\/span><\/p><p><span style=\"color: #6c99bb;\">const url<\/span> = <span style=\"color: #e87d3e;\">&#8216;http:\/\/apiiieg.jalisco.gob.mx\/api\/acumuladomb?page=1&amp;year=2014&#8217;<\/span>;<\/p><p><span style=\"color: #797979;\">\/\/ Realizar una solicitud GET utilizando Fetch API<\/span><br \/><span style=\"color: #e5b567;\">fetch<\/span>(<span style=\"color: #6c99bb;\">url<\/span>)<br \/><span style=\"color: #e5b567;\">.then<\/span>(<span style=\"color: #6c99bb;\">response<\/span> <span style=\"color: #6c99bb;\">=&gt;<\/span> <span style=\"color: #9e86c8;\">{<\/span><br \/><span style=\"color: #797979;\">\/\/ Verificar el c\u00f3digo de respuesta<\/span><br \/><span style=\"color: #9e86c8;\">if<\/span> <span style=\"color: #6c99bb;\">(response.ok) {<\/span><br \/><span style=\"color: #797979;\">\/\/ La solicitud fue exitosa<\/span><br \/><span style=\"color: #9e86c8;\">return<\/span> <span style=\"color: #6c99bb;\">response<\/span>.<span style=\"color: #e5b567;\">json()<\/span>;<br \/><span style=\"color: #6c99bb;\">}<\/span> <span style=\"color: #9e86c8;\">else<\/span> <span style=\"color: #6c99bb;\">{<\/span><br \/><span style=\"color: #797979;\">\/\/ La solicitud no fue exitosa<\/span><br \/><span style=\"color: #9e86c8;\">throw<\/span> <span style=\"color: #6c99bb;\">new<\/span> <span style=\"color: #e5b567;\">Error<\/span>(<span style=\"color: #e87d3e;\">`Error al realizar la solicitud. C\u00f3digo de respuesta:<\/span> <span style=\"color: #9e86c8;\">${<\/span><span style=\"color: #6c99bb;\">response.status<\/span><span style=\"color: #9e86c8;\">}<\/span>`);<br \/>}<br \/><span style=\"color: #9e86c8;\">}<\/span>)<br \/><span style=\"color: #e5b567;\">.then<\/span>(<span style=\"color: #6c99bb;\">data =&gt;<\/span><span style=\"color: #9e86c8;\"> {<\/span><br \/><span style=\"color: #797979;\">\/\/ Hacer algo con los datos recibidos<\/span><br \/><span style=\"color: #6c99bb;\">console<\/span>.<span style=\"color: #e5b567;\">log<\/span><span style=\"color: #6c99bb;\">(data)<\/span>;<br \/><span style=\"color: #9e86c8;\">}<\/span>)<br \/><span style=\"color: #e5b567;\">.catch<\/span>(<span style=\"color: #6c99bb;\">error =&gt;<\/span> <span style=\"color: #9e86c8;\">{<\/span><br \/><span style=\"color: #797979;\">\/\/ Manejar cualquier error<\/span><br \/><span style=\"color: #6c99bb;\">console<\/span>.<span style=\"color: #e5b567;\">error<\/span><span style=\"color: #6c99bb;\">(error)<\/span>;<br \/><span style=\"color: #9e86c8;\">}<\/span>);<\/p><\/div>\n\t\t\t\t\t\t\t\t\t<div class=\"elementor-tab-title elementor-tab-mobile-title\" aria-selected=\"false\" data-tab=\"10\" role=\"tab\" tabindex=\"-1\" aria-controls=\"elementor-tab-content-74010\" aria-expanded=\"false\">MATLAB<\/div>\n\t\t\t\t\t<div id=\"elementor-tab-content-74010\" class=\"elementor-tab-content elementor-clearfix\" data-tab=\"10\" role=\"tabpanel\" aria-labelledby=\"elementor-tab-title-74010\" tabindex=\"0\" hidden=\"hidden\"><p><span style=\"color: #797979;\"># ===========================================================================<\/span><\/p><p><span style=\"color: #797979;\"># Instituto de Informaci\u00f3n Estad\u00edstica y Geogr\u00e1fica de Jalisco<\/span><\/p><p><span style=\"color: #797979;\"># Direcci\u00f3n de Informaci\u00f3n Estad\u00edstica de Gobierno, Seguridad P\u00fablica e Impartici\u00f3n de Justicia<\/span><\/p><p><span style=\"color: #797979;\"># ===========================================================================<\/span><\/p><p><span style=\"color: #6c99bb;\">url<\/span> = <span style=\"color: #e5b567;\">&#8216;http:\/\/apiiieg.jalisco.gob.mx\/api\/acumuladomb?page=1&amp;year=2014&#8217;<\/span>;<\/p><p><span style=\"color: #797979;\">% Realizar una solicitud GET<\/span><br \/><span style=\"color: #6c99bb;\">response<\/span> = <span style=\"color: #9e86c8;\">webread<\/span>(<span style=\"color: #e87d3e;\">url<\/span>);<\/p><p><span style=\"color: #797979;\">% Hacer algo con los datos recibidos<\/span><br \/><span style=\"color: #9e86c8;\">disp<\/span>(<span style=\"color: #e87d3e;\">response<\/span>);<\/p><\/div>\n\t\t\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"<p>MiBici Conjuntos de datos CSV Diccionario de datos Metadato API API M\u00e9todo El M\u00e9todo de conexi\u00f3n tiene dos par\u00e1metros: la p\u00e1gina de consulta (page) y el a\u00f1o (year), por ejemplo:&nbsp;http:\/\/apiiieg.jalisco.gob.mx\/api\/acumuladomb?page=1&amp;year=2014 En cada p\u00e1gina se muestran 2,000 registros de un total &hellip; <a href=\"https:\/\/iieg.gob.mx\/ns\/?page_id=38229\">Continued<\/a><\/p>\n","protected":false},"author":14,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"class_list":["post-38229","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/iieg.gob.mx\/ns\/index.php?rest_route=\/wp\/v2\/pages\/38229","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/iieg.gob.mx\/ns\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/iieg.gob.mx\/ns\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/iieg.gob.mx\/ns\/index.php?rest_route=\/wp\/v2\/users\/14"}],"replies":[{"embeddable":true,"href":"https:\/\/iieg.gob.mx\/ns\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=38229"}],"version-history":[{"count":10,"href":"https:\/\/iieg.gob.mx\/ns\/index.php?rest_route=\/wp\/v2\/pages\/38229\/revisions"}],"predecessor-version":[{"id":45312,"href":"https:\/\/iieg.gob.mx\/ns\/index.php?rest_route=\/wp\/v2\/pages\/38229\/revisions\/45312"}],"wp:attachment":[{"href":"https:\/\/iieg.gob.mx\/ns\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=38229"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}