[TC] Gaming API : General Discussion
|
2017-08-28, 22:20
(This post was last modified: 2017-08-28 22:21 by Pete.)
Post: #1
|
|||||||
|
|||||||
[TC] Gaming API : General Discussion
General Discussion Use this thread for any discussions related to our API. For specific questions, please open a new thread. |
|||||||
|
|||||||
2017-08-28, 23:07
(This post was last modified: 2017-08-28 23:09 by Pete.)
Post: #2
|
|||||||
|
|||||||
RE: [TC] Gaming API : General Discussion
Spoiler (Click to View) |
|||||||
|
|||||||
2017-08-28, 23:09
(This post was last modified: 2017-08-28 23:12 by Pete.)
Post: #3
|
|||||||
|
|||||||
RE: [TC] Gaming API : General Discussion
Chuck will add that in the morning. Thanks.
Also, I merged your pull request and also spotted another error but the GitBook servers are having trouble so the build is taking a while. Those changes should be live soon. |
|||||||
|
|||||||
2017-08-29, 07:23
Post: #4
|
|||||||
|
|||||||
RE: [TC] Gaming API : General Discussion
Dunno if it's my end, but I can't seem to see the updated version of the stats API page? Still showing the old href :/
|
|||||||
|
|||||||
2017-08-29, 08:33
Post: #5
|
|||||||
|
|||||||
RE: [TC] Gaming API : General Discussion
The API might be slightly behind due to the very recent updates. That'll be solved very soon.
|
|||||||
|
|||||||
2017-08-29, 11:06
(This post was last modified: 2017-08-29 11:13 by Pete.)
Post: #6
|
|||||||
|
|||||||
RE: [TC] Gaming API : General Discussion
(2017-08-29 07:23)Jack Wrote: Dunno if it's my end, but I can't seem to see the updated version of the stats API page? Still showing the old href :/ (2017-08-28 23:09)Pete Wrote: Also, I merged your pull request and also spotted another error but the GitBook servers are having trouble so the build is taking a while. Those changes should be live soon. The updates are there now. |
|||||||
|
|||||||
2017-09-09, 17:52
(This post was last modified: 2017-09-09 17:53 by Pete.)
Post: #7
|
|||||||
|
|||||||
RE: [TC] Gaming API : General Discussion
The new roleplay stats have been added to the citydriving/profile/get API.
|
|||||||
|
|||||||
2018-12-23, 21:24
Post: #8
|
|||||||
|
|||||||
RE: [TC] Gaming API : General Discussion
API updated after recent InSim update (v4.3).
API Now also includes endpoint for the current Gumball table, see: https://apidocs.tc-gaming.co.uk/apis/cit...pi#gumball |
|||||||
|
|||||||
2018-12-26, 13:42
Post: #9
|
|||||||
|
|||||||
RE: [TC] Gaming API : General Discussion
API updated after recent InSim update (v4.31).
/citydriving/profile/get Removed: Code: hasRadarWarner Added: Code: &properties=0|1 /citydriving/carinfo Added: Code: &upgrades=0|1 /citydriving/market Added: Code: &upgrades=0|1 |
|||||||
|
|||||||
2018-12-26, 14:24
Post: #10
|
|||||||
|
|||||||
RE: [TC] Gaming API : General Discussion
Since TC World reports if the user is banned and days remaining, is it possible to get this implemented to the API?
|
|||||||
|
|||||||
2018-12-29, 22:23
(This post was last modified: 2018-12-29 22:24 by kxait.)
Post: #11
|
|||||||
|
|||||||
RE: [TC] Gaming API : General Discussion
Here's a proof of concept for an application that works both with InSim and the [TC] API. It shows how much money one has earned/lost during the session.
Since the API only allows 720 request per hour, it pulls the data every 10 seconds. |
|||||||
|
|||||||
2018-12-29, 22:47
Post: #12
|
|||||||
|
|||||||
RE: [TC] Gaming API : General Discussion
Nice one. Got any ideas for other InSim apps in mind?
|
|||||||
|
|||||||
2018-12-29, 22:58
(This post was last modified: 2018-12-29 23:09 by Adorable.)
Post: #13
|
|||||||
|
|||||||
RE: [TC] Gaming API : General Discussion
(2018-12-29 22:47)Pete Wrote: Nice one. Got any ideas for other InSim apps in mind? Since you're interested in a Node / ReactJS Project, you can build an InSim Application and make it look attractive with Electron. Post session stats would be awesome, for example, money gains / loss, where did the money go? which cars you drove most during the session? has your average speed gotten better in comparison with previous sessions? Market integration, real time view of online players, 0-60 times, a server login queue, a chat and many more. there is potential. That would make for a nice application for TC'ers to use, and a good practice for ES6. There are some npm packages you could look into to serialize data into byte arrays so that they could be transmitted to LFS, examples: https://www.npmjs.com/package/c-struct @kxait - I read somewhere that you're looking for a way to lookup number of players connected to a host, you could get that information from here: https://www.lfsworld.net/hoststatus/?h=[TC]%20CityDriving%20One&onlycontent |
|||||||
|
|||||||
2018-12-30, 18:40
Post: #14
|
|||||||
|
|||||||
RE: [TC] Gaming API : General Discussion
Here's another, bit more simple. [TC] serverlist
@Adorable - I used the [TC] API cause I'm too lazy for parsing HTML lol |
|||||||
|
|||||||
2018-12-30, 21:34
(This post was last modified: 2018-12-30 21:35 by eVo.)
Post: #15
|
|||||||
|
|||||||
RE: [TC] Gaming API : General Discussion
Well, as I'm programming a bit, maybe I'll try to learn Node / ReactJS language, and create something, if I'm good at it . (currently, I'm learning ncurses language, which is apart from InSim / [TC] API)
|
|||||||
|
|||||||
2018-12-30, 22:46
Post: #16
|
|||||||
|
|||||||
RE: [TC] Gaming API : General Discussion
(2018-12-30 18:40)kxait Wrote: @Adorable - I used the [TC] API cause I'm too lazy for parsing HTML lol You can do it in 1 line actually, here's my approach so that you could spare more API requests, also I think this is the fastest source. https://www.lfsworld.net/hoststatus/?h=hostname Code: int players = Convert.ToInt32(Regex.Split(Regex.Split(response, "Conns</div><div class=\"Field2\">")[1], " / 40")[0]); Your interfaces are awesome, I like how you're keeping things similar to what Chuck/Elmo are building! In the meanwhile, I've been fiddling with Node, here's what I've been up to, it's a start: Spoiler (Click to View) |
|||||||
|
|||||||
2018-12-30, 23:46
(This post was last modified: 2018-12-30 23:52 by Pete.)
Post: #17
|
|||||||
|
|||||||
RE: [TC] Gaming API : General Discussion
Cool!
Instead of posting screenshots, you could post GitHub Gists instead. The support multiple files these days: https://gist.github.com I'd like to try writing an InSim app with Node, but I'm not sure I'd even bother writing an Electron interface. I'd probably just do some CLI. Creating your socket connection half way down your code made me shudder though! Also, why did you decide to use cppmsg-dynamic over c-struct? |
|||||||
|
|||||||
2018-12-31, 00:23
(This post was last modified: 2018-12-31 00:26 by Adorable.)
Post: #18
|
|||||||
|
|||||||
RE: [TC] Gaming API : General Discussion
I've found that the cppmsg-dynamic module could match everything that c-struct is capable of, and do more, like support out of the box for nested structures (example the CompCar struct inside IS_MCI, a struct inside a struct).
It also supports more data types (double, float, arrays...). Good luck with your project! €: if only LFS used something like Google's protobuf |
|||||||
|
|||||||
2020-01-06, 19:38
(This post was last modified: 2020-01-06 19:39 by kxait.)
Post: #19
|
|||||||
|
|||||||
RE: [TC] Gaming API : General Discussion
(2018-12-30 23:46)Pete Wrote: snipQuoted for attention I've a problem with the API. I was very frustrated to find that the API only returns total money for given user, not cash and balance separately. Either change it back, or change the API docs which led me on: https://apidocs.tc-gaming.co.uk/apis/cit...er-profile |
|||||||
|
|||||||
2020-01-06, 21:28
Post: #20
|
|||||||
|
|||||||
RE: [TC] Gaming API : General Discussion
(2020-01-06 19:38)kxait Wrote:(2018-12-30 23:46)Pete Wrote: snipQuoted for attention This is purposely done after !steal was implemented to avoid people creating programs that automatically notifies about AFK players with larger amounts of cash on them. |
|||||||
|
|||||||
« Next Oldest | Next Newest »
|
Possibly Related Threads... | |||||
Thread: | Author | Replies: | Views: | Last Post | |
[TC] Gaming API | Pete | 0 | 11,775 |
2017-08-28 22:09 Last Post: Pete |
User(s) browsing this thread: 1 Guest(s)
Powered By MyBB, © 2002-2024 MyBB Group