You are on page 1of 4

@PUEinteligente is a crowdsourcing tool designed to capture reports arising from citizens' needs.

Once data is in our cloud-based data center, we process it in order to recognize patterns and create useful visualizations Core functions: Nuevo

Reporte (New Report) Datos del Usuario (User data) ltimos Resportes (Latest Reports) Mis reportes (My Reports) Boletn Oficial (Oficial Newsletter) twitter @pueinteligente

User Data (Datos del Usuario) *stored in SD card Nombre (First Name) Apellido (Last Name) e-mail (e-mail)

Buttons 1) Guardar (Save); 2) Borrar (Clear)

Nuevo Reporte (New Report) User is able to attach three elements: Categora (Category) ,Foto (Photo), Comentarios (Comments) Basura Graffiti Calle sucia, Acumulacin de Basura Parque Sucio Hierba mala Calles y Semaforos Bache Semaforo descompuesto Banqueta daada Arbol cado Calle inundada Fuga de Agua Sealamientos y Estacionamientos Sealamiento Daado Vehiculo abandonado Queja de estacionamiento Personal Ovacin a empleado del Municipio Queja de empleado del Municipio Otros Animal Agresivo

Animal Muerto

Example of a POST request made from Java


package com.mxinteligente.tests; import org.apache.commons.httpclient.HttpClient; import org.apache.commons.httpclient.HttpStatus; import org.apache.commons.httpclient.NameValuePair; import org.apache.commons.httpclient.methods.PostMethod; import java.io.BufferedReader; import java.io.InputStreamReader; public class PostMethodExample { public static void main(String args[]) { HttpClient client = new HttpClient(); client.getParams().setParameter("http.useragent", "Test Client"); BufferedReader br = null; PostMethod post = new PostMethod("http://api.mexicointeligente.com:8080/Report/api/report/postRep"); NameValuePair[] data = { new NameValuePair("topicId", "Puebla"), new NameValuePair("category1", "Puebla"), new NameValuePair("category2", "Bache"), new NameValuePair("category3", ""), new NameValuePair("category4", ""), new NameValuePair("category5", ""), new NameValuePair("category6", ""), new NameValuePair("category7", ""), new NameValuePair("category8", ""), new NameValuePair("category9", ""), new NameValuePair("category10", ""), new NameValuePair("category11", ""), new NameValuePair("category12", ""), new NameValuePair("email", ""), new NameValuePair("firstName", "marco"), new NameValuePair("lastName", "montes"), new NameValuePair("deviceId", "ffffffff-9eaf-9658-8cdc-6a5178010089"), new NameValuePair("lat", "19.44981957386825"), new NameValuePair("long", "-99.15284585810394"), new NameValuePair("mediaurl", "5rcoz.jpg"), new NameValuePair("description", "This is a huge pothole ") }; post.setRequestBody(data); try{ int returnCode = client.executeMethod(post); if(returnCode == HttpStatus.SC_NOT_IMPLEMENTED) { System.err.println("The Post method is not implemented by this URI"); // still consume the response body post.getResponseBodyAsString(); } else { br = new BufferedReader(new InputStreamReader(post.getResponseBodyAsStream())); String readLine; while(((readLine = br.readLine()) != null)) { System.err.println(readLine); } } } catch (Exception e) { System.err.println(e);

} finally { post.releaseConnection(); if(br != null) try { br.close(); } catch (Exception fe) {} } } }

Oficial Newsletter (Boletn Oficial) This is a Oficial Newsletter hosted in mexicointeligente platform. this feed is produced by staff of the municipalities who are mexicointeligente customers Data comes from a GET Type-Request http:/ / api.mexicointeligente.com:8080/ Report/ api/ report/ news/ puebla@mexicointeligente.com/ 0/ 50 Latest Reports (ltimos resportes) This is a list of latest reports http://api.mexicointeligente.com:8080/Report/api/ report/feedCat/Puebla/1/10 My Reports This feed retrieves the user reports to track them

You might also like