5 responses

  1. Scott Schulz
    February 5, 2014

    Slightly off-topic for this post, but I’ve been playing with Miataru and the API. I notice that GetLocation returns the last location, but when I call GetLocationHistory, I am seeing that the results are returned from the beginning of the history. Is there a way to tell it to return X results from the end, e.g. last 5 locations?

    I looked at the source, and it seems like the call for the last X values in the LRANGE call to Redis should be returning from -X to -1, e.g. -5 to the last record (-1), but instead it is returning the first 5. Any way to get the last 5?

    • bietiekay
      February 5, 2014

      Hi Scott

      thanks for raising that, in the iOS client I am just using “all” elements and parsing the rest out. So I’ve taken a look at the actual node.js server side and you were right. There was a problem with the return order. Specification says it’s newest first but the server returned the oldest first. I’ve bugfixed it some minutes ago. It’s up on https://service.miataru.com service and in the github repository.

      Thanks for using miataru!

      • Scott Schulz
        February 6, 2014

        Perfect! Thanks for making the change so quickly.

        And thank you for providing the service. Is there a better place to report these little things? I hate to clog up your blog :)

      • bietiekay
        February 6, 2014

        The prefered place for all reports, wishes, questions regarding for example the server is the GitHub issues page. ( https://github.com/miataru/miataru-server/issues ). It’s available also for the webclient (http://miataru.com/client) and the specification.

      • Scott Schulz
        February 7, 2014

        Thanks. I’ve been through most of the sour, but never stumbled across that.

        Thanks again.

Back to top
mobile desktop