Coder Social home page Coder Social logo

Comments (21)

Lorengamboa avatar Lorengamboa commented on August 19, 2024 1

Ill take note of that and test it myself.

Ill give u a solution to the problem soon.

from emt-library.

Lorengamboa avatar Lorengamboa commented on August 19, 2024 1

The problem lays on how the pass data is sent to the API service layer.

var formData = {
      "cultureInfo": "ES",
       "idStop": "636"
 };
geo.getArriveStop(formData)
       .then(function (res) {
       // res
  });

Follow the example I pasted. The documentation is a bit off the road but if I see more issues to come up I'll make sure its clean and updated.

Please, once you try this solution let me know tho.

from emt-library.

DestroyerIV avatar DestroyerIV commented on August 19, 2024

@Lorengamboa
Working correctly. If you think it is appropriate to use the Spanish language to speak and understand each other better, let us know. Thanks for your time and work

One last question, if it is not annoying. In what unit of time is 'busTimeLeft?'

from emt-library.

Lorengamboa avatar Lorengamboa commented on August 19, 2024

@DestroyerIV Por lo menos en mis repositorios no existe ningún idioma obligatorio que ha de ser usado. Cualquier duda, adelante.

from emt-library.

DestroyerIV avatar DestroyerIV commented on August 19, 2024

@Lorengamboa
Se agradece poder hablar el idioma materno jajajaja
Una ultima duda, en que unidad de tiempo se basa la propiedad 'busTimeLeft?'

from emt-library.

Lorengamboa avatar Lorengamboa commented on August 19, 2024

@DestroyerIV Haz las preguntas que hagan falta!
Se mide en segundos (int)
El problema y reconozco que la documentación es pobre y esta totalmente incompleta.

from emt-library.

DestroyerIV avatar DestroyerIV commented on August 19, 2024

No me importaría ayudarte a actualizarla, poco a poco y con tiempo.
A partir del primer ejemplo, ya se que debo jugar con el posicionamiento de los requisitos de cada método.
Me devuelve, por ejemplo 214, como podría convertirlo a una sola cifra?

Perdona mi ignorancia, de verdad.

from emt-library.

Lorengamboa avatar Lorengamboa commented on August 19, 2024

Tranquilo nadie nace sabiendo.

Pásame el payload que le pasaste al método que usaste.

from emt-library.

Lorengamboa avatar Lorengamboa commented on August 19, 2024

En caso de lo que te devuelva sean los segundos, prueba pasarlo a minutos.

const segundos = Math.floor(tiempo / 60);

  • sustituye la variable tiempo el tiempo estimado que te haya devuelto el método.
  • el resultado que obtengas esta acotado.

from emt-library.

DestroyerIV avatar DestroyerIV commented on August 19, 2024

Esto es lo que me devuelve la funcion result

{ stopId: 1105,
  lineId: '103',
  isHead: 'False',
  destination: 'ECOBULEVAR',
  busId: '6821',
  busTimeLeft: 50,
  busDistance: 116,
  longitude: -3.6618715809846,
  latitude: 40.388149183923,
  busPositionType: 2 }

from emt-library.

Lorengamboa avatar Lorengamboa commented on August 19, 2024

Que buscas obtener aqui?

from emt-library.

Lorengamboa avatar Lorengamboa commented on August 19, 2024

En cuanto a la doc estaría fantástico si puedes ayudarme, haces un PR y lo reviso.

Un saludo.

from emt-library.

DestroyerIV avatar DestroyerIV commented on August 19, 2024

Utilizando el Math.floor((result.arrives[i].busTimeLeft) / 60) , en los dos primeros resultados me los muestra correctamente, pero en los dos siguiente que le siguen, me muestra 16666

En el result, busco los atributos de lineId, destination, busTimeLeft y busDistance.

Actualmente ya tengo todos menos busTimeLeft, que como cito anteriormente, los que sobrepasan los 20 minutos me los muestra como 16666

from emt-library.

DestroyerIV avatar DestroyerIV commented on August 19, 2024

Respecto a la Doc, comenzaré a hacer pruebas para descartar errores a la hora de organizar el orden de las propiedades que cada método requiere.

from emt-library.

Lorengamboa avatar Lorengamboa commented on August 19, 2024

Time to arrive in seconds (if all 9, means more than 20 minutes) (if 0 bus in the stop)

from emt-library.

Lorengamboa avatar Lorengamboa commented on August 19, 2024

@DestroyerIV si quieres hacer pruebas puedes aprovechar y continuar el archivo de test.js y apoyandote en ello para completar la doc.
si existe un problema de código, abres issue y la resuelvo.

from emt-library.

Lorengamboa avatar Lorengamboa commented on August 19, 2024

Te paso el link que devuelve un archivo con la doc.

http://opendata.emtmadrid.es/Documentos/Opendata-v-1-12.aspx

from emt-library.

Lorengamboa avatar Lorengamboa commented on August 19, 2024

La prueba que te devolvió 16666 que tiempo te dio?

from emt-library.

DestroyerIV avatar DestroyerIV commented on August 19, 2024

@Lorengamboa
Si tienes Telegram, te dejo mi alias para que tengamos un contacto mas fluido @neganlucille

Respecto al tema de 16666, solo lo muestra cuando el tiempo es mas de 20 minutos, estoy añadiendo un if que controle esa circunstancia sin resultados.

from emt-library.

Lorengamboa avatar Lorengamboa commented on August 19, 2024

@DestroyerIV no tengo Telegram.

tengo discord.

from emt-library.

Lorengamboa avatar Lorengamboa commented on August 19, 2024

Loren#8221 es el discord que uso actualmente.

from emt-library.

Related Issues (5)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.