Getting specific user's location via API
|
2018-05-16, 17:44
(This post was last modified: 2018-05-18 15:00 by Kyle.)
Post: #1
|
|||||||
|
|||||||
Getting specific user's location via API
SOLUTION: See post #10
Hi, I'm struggling to get the location of a specific user atm. I realise that I can get the location of users, but that is for everyone in that server. Example: Quote:GET https://api.tc-gaming.co.uk/citydriving/...server=all returns something like this: Quote:[ But is there a way to lookup one person, like you can with profile lookup, and get the location? If not, is there a way to use the global JSON file to get a specific user? I am coding in C#. Hope this made sense Any help would be greatly appreciated |
|||||||
|
|||||||
2018-05-16, 18:29
Post: #2
|
|||||||
|
|||||||
RE: Getting specific user's location via API
Location as in... where they are on the server? Or physical location in which they're playing from?
|
|||||||
|
|||||||
2018-05-16, 18:30
Post: #3
|
|||||||
|
|||||||
RE: Getting specific user's location via API
Sorry, I should've made this clear - the location in-game (so 'lastPosition')
|
|||||||
|
|||||||
2018-05-17, 05:17
Post: #4
|
|||||||
|
|||||||
RE: Getting specific user's location via API
There are some ways, but I would need to know what you intent to do with it.
i.e do you need info from players being online or even when they gone offline. |
|||||||
|
|||||||
2018-05-17, 06:12
Post: #5
|
|||||||
|
|||||||
RE: Getting specific user's location via API
What needs done is for the local insim program to know what road name they are on so it can then be displayed on the screen
|
|||||||
|
|||||||
2018-05-17, 08:48
(This post was last modified: 2018-05-17 08:50 by Adorable.)
Post: #6
|
|||||||
|
|||||||
RE: Getting specific user's location via API
(2018-05-16 18:30)Jack Wrote: Sorry, I should've made this clear - the location in-game (so 'lastPosition') https://apidocs.tc-gaming.co.uk/citydriv...ers-online lastPosition field does it for everyone online, I don't think you can for someone offline |
|||||||
|
|||||||
2018-05-17, 16:26
Post: #7
|
|||||||
|
|||||||
RE: Getting specific user's location via API
(2018-05-17 05:17)Chuck Wrote: There are some ways, but I would need to know what you intent to do with it. For everyone online. (2018-05-17 08:48)Adorable Wrote:(2018-05-16 18:30)Jack Wrote: Sorry, I should've made this clear - the location in-game (so 'lastPosition') I did see this, but wasn't sure if you could do it for only a single person like you can with the profile lookup. If you can't, I can probably do it other ways (e.g. jump down lines) |
|||||||
|
|||||||
2018-05-17, 17:23
Post: #8
|
|||||||
|
|||||||
RE: Getting specific user's location via API
I am wondering why you are specifically asking for the location of just one user.
|
|||||||
|
|||||||
2018-05-18, 07:55
Post: #9
|
|||||||
|
|||||||
RE: Getting specific user's location via API
Like I stated it is to display the location of the drivers location in real time. I’m aware that this can be done
|
|||||||
|
|||||||
2018-05-18, 08:03
Post: #10
|
|||||||
|
|||||||
RE: Getting specific user's location via API
If it's really just about one particular user you can do it this way:
https://api.tc-gaming.co.uk/json/<lowercase username>.json |
|||||||
|
|||||||
2018-05-18, 10:03
Post: #11
|
|||||||
|
|||||||
RE: Getting specific user's location via API | |||||||
|
|||||||
2018-05-18, 14:12
Post: #12
|
|||||||
|
|||||||
RE: Getting specific user's location via API
Things u need in realtime should be provided by your own Insim anyway. I still dont know what u need the location for, as it's also very imprecise. "Autobahn North" on Kyoto covers pretty much half of the map. On a side note, why don't u simply buy a locator? It does exactly what you want
|
|||||||
|
|||||||
2018-05-18, 15:00
Post: #13
|
|||||||
|
|||||||
RE: Getting specific user's location via API
(2018-05-18 08:03)Chuck Wrote: If it's really just about one particular user you can do it this way: I completely forgot about this page. Thanks Chuck! |
|||||||
|
|||||||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 6 Guest(s)
Powered By MyBB, © 2002-2024 MyBB Group