Jump to content

Api Working Group

api

11 replies to this topic

#1 Exbe

    Member

  • PipPipPipPipPip
  • FP Veteran - Beta 2
  • FP Veteran - Beta 2
  • 102 posts

Posted 14 April 2016 - 08:41 PM

I wonder if whoever follow this topic wants to form a group, who will pursue a dream to have modern API.

Anyone interested?

#2 Exbe

    Member

  • PipPipPipPipPip
  • FP Veteran - Beta 2
  • FP Veteran - Beta 2
  • 102 posts

Posted 14 April 2016 - 10:29 PM

I created a public gist, which describes weapon list API using swagger spec: (link)
Copy-post it into swagger editor and feel free to generate client/server code.

It just illustrates a common method about how api can be managed. Swagger spec is accepted by AWS and we can easily build whatever API we can using AWS lamda/API gateway.

There is an issue thought: we need data and the question what we can do in order to retrieve it.
We already have mech/CW/weapons APIs, but user data is something sensitive.

#3 Night Fury76

    Member

  • PipPipPipPipPipPip
  • Ace Of Spades
  • Ace Of Spades
  • 299 posts
  • LocationAustralia

Posted 15 April 2016 - 08:14 PM

I'm interested, did you look at smurfy's api its processed directly from the game file xml's and restful

The CW api works

I looked into stats collection through scraping, but hit two issues.
1. I would have to take a users username and password through my server, so there is a trust thing there that I cannot ask users to do
2. And then they would have to be happy for my server to store their stats, again a trust issue.

I wrote a forum recruitment scraper in 2014 that grabbed the first 10 recruitment posts per IS faction.
The plan was to do a comstar info hub as I had team speak query code written too(only for anonymous server query)
I need to revisit smurfy's built in mechbay stuff that stores all your smurfy builds, there is an api to access that too.

Cheers

Btw pgi said their website was being upgraded, soon....tm

#4 Exbe

    Member

  • PipPipPipPipPip
  • FP Veteran - Beta 2
  • FP Veteran - Beta 2
  • 102 posts

Posted 24 April 2016 - 10:06 PM

I only heard about their API, but it make sense to contact the author.

View PostNight Fury76, on 15 April 2016 - 08:14 PM, said:

I looked into stats collection through scraping...

I was thinking about same thing. At the current moment we have no way to get stats from official source, but there are workarounds.

My best try was to implement a mobile app with 100% open source code, which allows you to download stat pages.
Heck, we can also provide really simple bash/bat thing, which does same job (wget/curl 3-4 pages, strip and upload data - big deal).
Or/and to satisfy really security-aware folks we can let them copy-paste all these tables into common database. Yes, simple browser plugin can do this as well.
The most advance way is to sniff client-server traffic and parse out network packets to collect stats by the end of the match :)
Since it is my evening Sunday, let's also think about an app which will do OCR against stat screenshots!

To be honest I less care about implementation if demand is there.

Let's group together and deliver stat API for ones, who would love to use it.

Edited by Exbe, 24 April 2016 - 10:16 PM.


#5 Exbe

    Member

  • PipPipPipPipPip
  • FP Veteran - Beta 2
  • FP Veteran - Beta 2
  • 102 posts

Posted 24 April 2016 - 10:26 PM

However I don't have good workaround for second issue. Smurfy's API has similar issue, but in our case it even worse. We can develop app for crowdsourcing stats, but how we verify it?

Only few ideas from the crazy list from previous post have moderate chance to provide trustworthy data.

#6 S3dition

    Member

  • PipPipPipPipPipPipPipPip
  • Elite Founder
  • Elite Founder
  • 1,633 posts
  • LocationWashington, USA

Posted 25 April 2016 - 11:44 PM

I'll query about it. Maybe we can get an answer.

#7 Night Fury76

    Member

  • PipPipPipPipPipPip
  • Ace Of Spades
  • Ace Of Spades
  • 299 posts
  • LocationAustralia

Posted 26 April 2016 - 01:21 PM

Looked into the steam api on the weekend, though not much in the way of stats.

I think PGI just wants the whole stats thing to just die and focus on achievements.
I'm not a regular steam user, but do you know if through a steam login you have access to the website stats?
If so I have a steam Oauth add-in someone made for asp.net that I could use, then my server would never see the users password and I'd only need to store the auth token from steam.

In short, everything is doubling up when dealing with PGI, we have to do it for them. eg: the OCR thing for end of game screen shots, a mate is working on that when PGI should just have an API

Cheers

#8 S3dition

    Member

  • PipPipPipPipPipPipPipPip
  • Elite Founder
  • Elite Founder
  • 1,633 posts
  • LocationWashington, USA

Posted 26 April 2016 - 02:14 PM

I heard back from PGI -

Quote


Hey there,
Sorry for this as it seems with the Faction Play Phase 3 integration, our API system has run into issues here. We're looking into this now, however when you get a chance can you let us know which API you were using here?

Thanks,

Bobby Jubraj
Technical Support Representative

Piranha Games


My response -


Quote

I was going to demo connecting to a remote JSON data source using your mech API (mechs and images).


Would it be beneficial to coordinate with community developers on this? You could, for example, post raw xml/json data to github and allow us to post the data to our own services. I noticed that, even when working, the API was agonizingly slow. This could help minimize API hits on your end and reduce overall API work by offloading mech pictures/data onto us.


I think if we take some of the burden off them, it might speed things along.

Edited by S3dition, 26 April 2016 - 02:16 PM.


#9 S3dition

    Member

  • PipPipPipPipPipPipPipPip
  • Elite Founder
  • Elite Founder
  • 1,633 posts
  • LocationWashington, USA

Posted 26 April 2016 - 06:41 PM

Also got this back -

Quote

Hey there,
Alright so we were actually able to get the 'Mech API's fixed here so this should now be working for you! That being said, the the mapdata API is something that will get sorted out during our next hotfix as some downtime will be required to fix this.
That being said I do tend to agree with you here on your feedback as we're currently exploring options in improving API so I've gone ahead and passed it along to the right folks to look into moving forward.
Thanks for you patience here :)
Bobby Jubraj
Technical Support Representative
Piranha Games


#10 Exbe

    Member

  • PipPipPipPipPip
  • FP Veteran - Beta 2
  • FP Veteran - Beta 2
  • 102 posts

Posted 26 April 2016 - 07:07 PM

View PostS3dition, on 26 April 2016 - 06:41 PM, said:

PGI should just have an API


I think this is a bandwidth issue on the first place. It is impossible to have everything on day 0 or even day 365 if you are dealing with real funds/user expectations.
Whatever is said, my intention is to keep things positive Posted Image

There was a very good thought about steam API, will also take a look.

Edited by Exbe, 26 April 2016 - 07:09 PM.


#11 Exbe

    Member

  • PipPipPipPipPip
  • FP Veteran - Beta 2
  • FP Veteran - Beta 2
  • 102 posts

Posted 26 April 2016 - 07:13 PM

Achievements VS Stats

To me they are different things. I think competitive players are more care about stats than casual.
Still, I am looking for any good examples of how people are using it.

PS
PM me if you want to have invite to slack https://mwoapi.slack.com

Edited by Exbe, 26 April 2016 - 08:41 PM.


#12 Night Fury76

    Member

  • PipPipPipPipPipPip
  • Ace Of Spades
  • Ace Of Spades
  • 299 posts
  • LocationAustralia

Posted 27 April 2016 - 03:29 PM

Woot its mostly fixed, but more importantly is fast, bloody fast.
There is a mix of uppercase and lowercase, mostly upper case, but it looks to at least be consistant across the mechs

Excellent work pgi
tested uri's
http://static.mwomer.../list/full.json
http://static.mwomer...apons/list.json
http://static.mwomer.../list/dict.json

Cheers





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users