my girlfriend and I have some cool statistics to provide for an uber user, but without start and end location, is basically impossible.
Given the current API, that's what we tried:
GET /v1.2/history: provide some information, but related to location, only the city where the ride happened
GET /v1/requests/{request_id}: give location only for in_progress rides
GET /v1/requests/{request_id}/map: here was the closest place we got. After some element inspection we figure it out that there is a json nested in the html that provide this information. But again, when generating maps for each ride, most of them gave us this error: (that based on answer that we found in another question here, its because maps are available only for a couple of days): {'code': 'conflict', 'message': 'Unable to generate map for trip "6a31e621-2c6f-4422-ac74-e9f382b346c5"'}
There is some way to retrieve this information or has someone successfully done this?
I mean, I don't know if they hide this information because privacy concerns. But, during some time we have the information. It's all about timing, If this is because a privacy concern, why they provide this temporarily, then, hide. If anyone know about the way that it works (you can make sure they search more than us about this), they are already collecting this information.
We do not currently provide start and end location for all trips via the history end point. Currently, we only provide start / end location for in progress trips. Your understanding above is correct.
Related
Is there a way to get all activities from the Google fitness store via the REST API?
My current assumption is that other apps store their activities in sessions and I can retrieve them using Users.sessions.list. However, the information there, does not really include all the information that was stored or I would like to see: when I manually add a short run via the Fit Android app, I expect this information to be somehow accessible via the sessions API. This should at least include the information I have provided, such as distance or time.
Looking at the same information via the app or the web interface, I can see all the details I have previously entered plus the approximate number of steps and calories.
How do I get this information via the API?
I am currently mainly interested in activities of type running or jogging (8, 56-58) and would like to read the distance in addition to the time information already provided in the session.
Not sure, if this is the right way, but I get all the information I need, if I follow these steps
Find the correct session via Users.sessions.list
Query all data via Users.datasets.aggregate:
Set startTimeMillis and endTimeMillis to the values from the session in question
Set bucketBySession to group results by sessions.
I explicitly query all data sources: For every data source id I add a { "dataSourceId": <id>}to theaggregateBy` array. Not sure, if this is necessary
The resulting bucket has all information related to the session. For my use case I need to clean up overloaded data: some data sources return the distance as steps (derived) while I need the physical length in meters.
This seems to work for my Fit data with the additional cleaning, but I will need to check, if this works for other user's data too.
I recently developed an app using the Instagram API, But I faced some problems with it. (I got struck)
This app is not calling the api and getting images in the real-time. Instead, it calls the api once a week and store images in the database based on a specific hashtag. I see that their api is designed in a way to call it in real time and pull images, because it has this "recent" in its url, and it only provides 20 results. So every time a user reaches the end, it will load the next 20, until u reach the end.
However, in my case, When I pull the images every week, at one point, I will reach to the oldest image, and from that point I will be stopped, because Im going from Newest to the oldest. So I want to get data as from oldest to newest.( Actually I want to get the opposite of what's offered by instagram.) They have not provided any option to sort them in their docs.
Im thinking of a solution for this, but I can't wrap my head around it. So I will be much thankful if you guys can direct me in the right path.
I searched Google, viewed old questions in SO, but I didn't find the answer.
Edit : Im planning to fetch data starting from the Oldest one like this. (Since I know the min_tag_id, because I ran this once completely).
https://api.instagram.com/v1/tags/my_tag/media/recent?&client_id=xxxxxxxxxxxxxxx&min_tag_id=1408983759354183
where min_tag_id is of the oldest image. So everytime I will be calling to the min_tag_id. Is it a good solution?
Yes, using the min_tag_id and max_tag_id is the solution.
Have a look at this answer: Instagram Search for a tag within particular date range
In my app I want to set current time.I know we can get it via device but it became user specific. If user change his device time then i am not able to find current time in my report.So is there any API which can give me current time based on location or LAT-LONG.
Please share if any one has idea about this.
Thanks All.
The WorldTimeEngine webservice offers an API that converst geolocation coordinates into local time.
Edit: there's this AskGeo web API also, it seems to be free and provide time information.
Ok... maybe forbidden by Apple, but assuming this is permitted. What would be the best way to get the current location (not difficult) and posting it to a web service (also not much of a challenge). The app is for an artist who wants people to see where he is at the moment. Personally, I wouldn't want people to know where I am 24/7 but that's performance art I guess. An exact location is not wanted but a town or area would be preferred. I could modify the string when it gets to the server and make it more vague by rounding the LOG and LAT.
The app the fans would use would retrieve his current location from the server and update the map view with a location.
I suppose one way would be for him to find out his coordinates and post that to a web page but I'd like it to update automatically.
A response with code is not necessary, just a general opinion on methodology/advisability would be appreciated
I would probably give him a webpage to go to that records his position every time he visits. It would be a private URL, and perhaps use some lightweight authentication. For versatility, I'd record the exact position in the database (in case he changes his mind on how it should work later on). However, you could use an external service or another purchased database with zips or city information with lat/lng data, so you could just provide users of the client app with his general vicinity rather than exact location.
The alternative would be to give him an ad hoc app that does the same thing, but putting together that location recording webpage would be a much simpler process. Could be handy for other things, too.
Here's a little writeup about getting location from mobile Safari, just as a reference: http://mobiforge.com/developing/story/location-iphone-web-apps
Why wouldn't you just use google latitude and read out his status?
I think this should really be done as a web page web-app. You can get coordinates from the device through mobile safari and you can skip the app approval process. You can also set it up so it runs fullscreen on his phone and he won't know the difference. You can also put a password on it.
There is a good chance it would not get approved as a regular app.
You can always meta refresh the page to keep it updating.
http://smithsrus.com/gps-geolocation-in-safari-on-iphone-os-3-0/
"Artist" must log in to his application (thus insuring that he want to share his coordinates with your webserver), then you use CLLocationManager to get his coordinates and make a reverse geocoding using Google Maps API to get country and city for given coordinates.
Can't see anything special about it :)
Generally speaking, how does an app like "Around Me" acquire the information it displays?
For example: the restaurants that show up in a list that are near me with the address and distance (I think I get the distance piece) where is this information extracted from? Is it Google or something?
I'm not asking how to implement this (that's over my head!) just get an idea of how it occurs.
Thanks StackOverFlow people.
I haven't seen that specific app, but most such apps either have an embedded database of locations or they dynamically query a server back-end (e.g. using HTTP) to fetch a set of locations near you. They know where you are because the app has access to location services to find out your geographic location.
The iPhone has a GPS unit which gives you your latitude and longitude, which it then sends to a backend server (Say Google Maps) and queries it for, in your case a restaurant. The server responds with a set of locations around you.