Old 12-12-2014, 12:12 PM   #1
Velocity
Doing the wrong thing the right way since 2010.
Site and Game Administrator
AdministratorRetired StaffDeveloperFFR Simfile AuthorD7 Elite KeysmasherFFR Veteran
 
Velocity's Avatar
 
Join Date: Jul 2007
Posts: 1,812
Default [API] FFR API Beta

I've been working on a small side-project that might help some people who like making there own stats.

http://www.flashflashrevolution.com/api/

While currently it only supports retrieving a players levelranks and recent games, it can be expanded to provide more data to programmers.

Since it's currently in beta, it might have an odd error here and there, but for the most part, it should be fine. There is a credit system in place to prevent a ton of abuse, so it should allow 50 level rank loads an hour.

If you have any suggestions of how to improve this, please suggest.

---
Feb 6th, 2015:
Added: Recent Games, use "action=recent_games".

Last edited by Velocity; 02-6-2015 at 06:30 PM..
Velocity is offline   Reply With Quote
Old 12-12-2014, 02:12 PM   #2
justin_ator
🥓<strong><span style="col
Resident Overseer
FFR Veteran
 
justin_ator's Avatar
 
Join Date: Mar 2007
Location: Kingsport, TN
Posts: 7,648
Default Re: [API] FFR API Beta

I like where this is going. Nice work
__________________
justin_ator is offline   Reply With Quote
Old 12-12-2014, 06:01 PM   #3
TheSaxRunner05
The Doctor
FFR Veteran
 
TheSaxRunner05's Avatar
 
Join Date: Apr 2006
Age: 35
Posts: 6,145
Default Re: [API] FFR API Beta

I don't get it
__________________


TheSaxRunner05 is offline   Reply With Quote
Old 12-12-2014, 06:11 PM   #4
Fission
no
Simfile JudgeFFR Simfile AuthorFFR Veteran
 
Fission's Avatar
 
Join Date: Jan 2004
Age: 32
Posts: 1,850
Default Re: [API] FFR API Beta

http://rest.elkstein.org/

it's an interface for developers to programmatically leverage information from FFR's backend. pretty simple to understand if you are a developer.
Fission is offline   Reply With Quote
Old 12-16-2014, 02:18 AM   #5
s1rnight
( ŻuŻ)-b
FFR Music Producer
 
s1rnight's Avatar
 
Join Date: Aug 2011
Posts: 387
Send a message via AIM to s1rnight Send a message via Skype™ to s1rnight
Default Re: [API] FFR API Beta

it seems i can only access the first two levels for a user's level ranks ("Terror from Beyond" and "Get on the Move"). is there a reason for this?
__________________

Last edited by s1rnight; 12-16-2014 at 02:18 AM..
s1rnight is offline   Reply With Quote
Old 12-16-2014, 07:55 AM   #6
Velocity
Doing the wrong thing the right way since 2010.
Site and Game Administrator
AdministratorRetired StaffDeveloperFFR Simfile AuthorD7 Elite KeysmasherFFR Veteran
 
Velocity's Avatar
 
Join Date: Jul 2007
Posts: 1,812
Default Re: [API] FFR API Beta

opps, I was debugging something.

Should be fixed.

Last edited by Velocity; 12-16-2014 at 07:56 AM..
Velocity is offline   Reply With Quote
Old 12-16-2014, 08:15 AM   #7
s1rnight
( ŻuŻ)-b
FFR Music Producer
 
s1rnight's Avatar
 
Join Date: Aug 2011
Posts: 387
Send a message via AIM to s1rnight Send a message via Skype™ to s1rnight
Default Re: [API] FFR API Beta

woot~ thank you!
__________________
s1rnight is offline   Reply With Quote
Old 12-16-2014, 08:16 AM   #8
noname219
FFR Wiki Admin
Wiki Administrator
Retired StaffFFR Veteran
 
noname219's Avatar
 
Join Date: May 2007
Location: Quebec, Canada
Age: 33
Posts: 1,694
Send a message via Skype™ to noname219
Default Re: [API] FFR API Beta

What does the timestamp means ?
noname219 is offline   Reply With Quote
Old 12-16-2014, 10:14 AM   #9
Velocity
Doing the wrong thing the right way since 2010.
Site and Game Administrator
AdministratorRetired StaffDeveloperFFR Simfile AuthorD7 Elite KeysmasherFFR Veteran
 
Velocity's Avatar
 
Join Date: Jul 2007
Posts: 1,812
Default Re: [API] FFR API Beta

Quote:
Originally Posted by noname219 View Post
What does the timestamp means ?
Credits:
Time till the IP credits reset.

Levelranks:
Refers to the time when that score was recorded.

It's in Unix/Epoch Time.

Last edited by Velocity; 12-16-2014 at 10:15 AM..
Velocity is offline   Reply With Quote
Old 12-23-2014, 10:13 AM   #10
llyair
Wiki Staff
Retired StaffFFR Veteran
 
llyair's Avatar
 
Join Date: Jun 2014
Posts: 307
Default Re: [API] FFR API Beta

Hi, I came across this page and wanted to thank you for doing this side project It seems like it could be really useful and fun for some players!

Edit (deleting original question):
I was confused about the user API key and IP credits. But it's making more sense after thinking about it. Yay!

Last edited by llyair; 12-23-2014 at 10:56 AM..
llyair is offline   Reply With Quote
Old 12-26-2014, 08:09 PM   #11
s1rnight
( ŻuŻ)-b
FFR Music Producer
 
s1rnight's Avatar
 
Join Date: Aug 2011
Posts: 387
Send a message via AIM to s1rnight Send a message via Skype™ to s1rnight
Default Re: [API] FFR API Beta

is there any chance you could add "notes in song" under the "info" bracket on the levelranks json? need it for a script
__________________
s1rnight is offline   Reply With Quote
Old 12-26-2014, 08:27 PM   #12
Velocity
Doing the wrong thing the right way since 2010.
Site and Game Administrator
AdministratorRetired StaffDeveloperFFR Simfile AuthorD7 Elite KeysmasherFFR Veteran
 
Velocity's Avatar
 
Join Date: Jul 2007
Posts: 1,812
Default Re: [API] FFR API Beta

Quote:
Originally Posted by s1rnight View Post
is there any chance you could add "notes in song" under the "info" bracket on the levelranks json? need it for a script
I added "notes" and "length" for song info.
Velocity is offline   Reply With Quote
Old 01-31-2015, 07:29 PM   #13
llyair
Wiki Staff
Retired StaffFFR Veteran
 
llyair's Avatar
 
Join Date: Jun 2014
Posts: 307
Default Re: [API] FFR API Beta

Hi again (: I'm using the JSON values returned, I don't know if it's just me, but I'm getting that song names <2008> and <00.01> are coming back as integers while the others are strings. And in the case of <00.01>, the song name is actually (truncated?) to simply 0.

"info":{...
"name":2008
...}

"info":{...
"name":0
...}

I guess I just ran into this now and it crashed my program (typechecking threw an error), so I wanted to bring it up as an fyi to anyone else who might run into the same thing ^^ I'm not familiar with handling JSON or even xml data in general, though, so maybe it's just me?

But I added a check for integers, which works fine, and I just need to assume that when I see the song 0 it means 00.01. Sooo yep, just wanted to put this out there~

EDIT1:
Ohh okay I just checked the xml, it has ![CDATA[ 2008 ]] and ![CDATA[ 00.01 ]], which I think is expected... maybe I should switch ^^

EDIT2:
Lol not to make this point ad nauseam, either, but since I'm here anyways, here's a list c:

"136.6" --> 136
"20031023" --> 20031023
"300" --> 300
"3020" --> 3020

Last edited by llyair; 01-31-2015 at 07:53 PM..
llyair is offline   Reply With Quote
Old 01-31-2015, 08:40 PM   #14
Velocity
Doing the wrong thing the right way since 2010.
Site and Game Administrator
AdministratorRetired StaffDeveloperFFR Simfile AuthorD7 Elite KeysmasherFFR Veteran
 
Velocity's Avatar
 
Join Date: Jul 2007
Posts: 1,812
Default Re: [API] FFR API Beta

Quote:
Originally Posted by llyair View Post
Hi again (: I'm using the JSON values returned, I don't know if it's just me, but I'm getting that song names <2008> and <00.01> are coming back as integers while the others are strings. And in the case of <00.01>, the song name is actually (truncated?) to simply 0.

"info":{...
"name":2008
...}

"info":{...
"name":0
...}

I guess I just ran into this now and it crashed my program (typechecking threw an error), so I wanted to bring it up as an fyi to anyone else who might run into the same thing ^^ I'm not familiar with handling JSON or even xml data in general, though, so maybe it's just me?

But I added a check for integers, which works fine, and I just need to assume that when I see the song 0 it means 00.01. Sooo yep, just wanted to put this out there~

EDIT1:
Ohh okay I just checked the xml, it has ![CDATA[ 2008 ]] and ![CDATA[ 00.01 ]], which I think is expected... maybe I should switch ^^

EDIT2:
Lol not to make this point ad nauseam, either, but since I'm here anyways, here's a list c:

"136.6" --> 136
"20031023" --> 20031023
"300" --> 300
"3020" --> 3020
I'll have it fix in a few minutes (hopefully). I forget about the level names that are numbers.

Last edited by Velocity; 01-31-2015 at 08:40 PM..
Velocity is offline   Reply With Quote
Old 01-31-2015, 08:49 PM   #15
llyair
Wiki Staff
Retired StaffFFR Veteran
 
llyair's Avatar
 
Join Date: Jun 2014
Posts: 307
Default Re: [API] FFR API Beta

Quote:
Originally Posted by Velocity View Post
I'll have it fix in a few minutes (hopefully). I forget about the level names that are numbers.
No worries, Velocity!! (: I'm in no rush for sure (: Thank you so much, though, this change would be awesome ^-^
llyair is offline   Reply With Quote
Old 01-31-2015, 08:53 PM   #16
Velocity
Doing the wrong thing the right way since 2010.
Site and Game Administrator
AdministratorRetired StaffDeveloperFFR Simfile AuthorD7 Elite KeysmasherFFR Veteran
 
Velocity's Avatar
 
Join Date: Jul 2007
Posts: 1,812
Default Re: [API] FFR API Beta

Should be fixed now.
Velocity is offline   Reply With Quote
Old 01-31-2015, 09:20 PM   #17
llyair
Wiki Staff
Retired StaffFFR Veteran
 
llyair's Avatar
 
Join Date: Jun 2014
Posts: 307
Default Re: [API] FFR API Beta

Quote:
Originally Posted by Velocity View Post
Should be fixed now.
Thank you!! Haha that was so fast! (: It's working perfectly for me now, which I am really excited about (: Thanks again! \(^-^)/
llyair is offline   Reply With Quote
Old 01-31-2015, 09:42 PM   #18
Hakulyte
the Haku
Retired StaffD7 Elite KeysmasherFFR Veteran
 
Hakulyte's Avatar
 
Join Date: Jul 2005
Age: 35
Posts: 4,517
Default Re: [API] FFR API Beta

What do you do with {"status":-1,"error_id":"invalid_key","error":"Invalid API Key"} after getting an API Key?
Hakulyte is offline   Reply With Quote
Old 01-31-2015, 11:15 PM   #19
llyair
Wiki Staff
Retired StaffFFR Veteran
 
llyair's Avatar
 
Join Date: Jun 2014
Posts: 307
Default Re: [API] FFR API Beta

><;; Hiii... c:

Now I'm getting that some songs have "good" reported in "scores" while others don't, for both JSON and xml outputs.

For example:

"1602":{"info":{"level":1602,"genre":12,"name":"Piano Etude (Demon Fire) [Oni]","difficulty":86,"notes":2152,"length":"3:17"},"scores":{"score":0,"perfect":0,"good":0,"average":0,"miss":0,"boo":0,"combo":0,"played":0,"rank":162}}

vs.

"1596":{"info":{"level":1596,"genre":1,"name":"Eclipse","difficulty":43,"notes":441,"length":"0:46"},"scores":{"score":683550,"perfect":441,"average":0,"miss":0,"boo":0,"combo":441,"played":13,"timestamp":1419032993,"rank":1}}

From looking at a few more (haven't checked them all), it seems like the majority of ones returning "good" are in Skill Token/Token/difficulty > 80, but not all Skill Token songs are returning "good." (St. Scarhand [Standard] doesn't have "good").

Just another small thing I'm running into, hmm~ thanks for any help/advice in advance! (:

Last edited by llyair; 01-31-2015 at 11:29 PM..
llyair is offline   Reply With Quote
Old 02-6-2015, 06:30 PM   #20
Velocity
Doing the wrong thing the right way since 2010.
Site and Game Administrator
AdministratorRetired StaffDeveloperFFR Simfile AuthorD7 Elite KeysmasherFFR Veteran
 
Velocity's Avatar
 
Join Date: Jul 2007
Posts: 1,812
Default Re: [API] FFR API Beta

I added support for retrieving a players last 10 played songs.

Quote:
Originally Posted by llyair View Post
><;; Hiii... c:

Now I'm getting that some songs have "good" reported in "scores" while others don't, for both JSON and xml outputs.

....

From looking at a few more (haven't checked them all), it seems like the majority of ones returning "good" are in Skill Token/Token/difficulty > 80, but not all Skill Token songs are returning "good." (St. Scarhand [Standard] doesn't have "good").

Just another small thing I'm running into, hmm~ thanks for any help/advice in advance! (:
I'm quite unsure of what is causing this to be honest, I'll have to investigate more, but I'm unsure currently.

Last edited by Velocity; 02-6-2015 at 06:32 PM..
Velocity is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



All times are GMT -5. The time now is 12:52 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright FlashFlashRevolution