Accessing the API directly

Greetings! Join GameBanana, one of the oldest mod sites, and maximize your browsing experience.

  • Subscribe: Get notified when tom submits again.
  • Say Thanks: Show your appreciation by sending tom points.
  • Post: Give tom your thoughts on this Wiki.
  • Flag: Alert moderators and warn members of a problem with this Wiki.
  • Watch: Get notified when this Wiki is updated.
Mascot

Stop Lurking!

Sign up

Already a Bananite? Login

Accessing the API directly

URL

http://www.gamebanana.com/api?request=ItemType.ItemID.ItemField

PARAMETERS

ItemType

The item's section (currently only Member is supported).

ItemID

The item's ID (must be a number larger than 0).

ItemField

A JSON encoded array of subfunctions to return.

RETURN VALUE

On Success

A JSON encoded string or numeric array of the requested data.

On Error

A JSON encoded array with the key _sError and string value explaining the error.

EXAMPLES

Get member 1382's user title:

  • Request: ?request=Member.1382.["user_title"]
  • Response: ["tom"]

Get member #37's name and user title:

  • Request: ?request=Member.37.["name","user_title"]
  • Response: [["natko","Bananite"]]

Get member 1382's name and whether they're banned or not:

  • Request: ?request=Member.1382.[%22name%22,{%22Ban%28%29%22:[%22bIsBanned%28%29%22]}]
  • Response: [["tom",false]]

Get member's name, whether they have buddies online and their buddy count:

  • Request: ?request=Member.1382.["name",{"Buddies()":[{"Count()":["bHasOnlineBuddies()","nGetBuddiesCount()"]}]}]
  • Response: [["tom",true,160]]

Get member's online buddies, if they're online, their location and if they have Ripe:

  • Request: ?request=Member.1382.[{"Buddies()":[{"List()":["aGetOnlineBuddyRowIds()"]}]},{"OnlineStatus()":["bIsOnline()","sGetLocation()"]},{"Ripe()":["bHasRipe()"]}]
  • Response: [["tom",true,160]]
  • You must be a member

Comments

  • JediKat avatar
    JediKat avatar Offline
    MLG Studio Flag Affiliation: MLG Studio
    Member Joined 10 years ago
    669 points Ranked 5865th
    15 medals 0 legendary, 1 rare
    • 6 years a member Medal icon
    • Mapper of the Month, April 2014 Medal icon
    • GameBanana/CEVO CSGO Mapping Contest 2014 Entrant Medal icon
    • 1-5 Entries! GameBanana’s Christmas Giveaway 2014 Medal icon
    • Winter Warfare Entrant Medal icon
    • Became a Studio Leader Medal icon
    JediKat avatar
    JediKat
    MLG Studio Flag
    MLG Studio
    Report post
    2 years ago:
    Currently I managed to get data back however for some reason I can't send the right variables/parameters to the API. I could need some help with that. I wrote a AJAX/JSON wrapper in JavaScript which I use in my own module and at my own website. It's pretty good besides the fact that I can't get the data I need with it on GameBanana. I only get the _sError response. Am I missing something in the request? is it strict to have it as text/html? because I think I'm requesting mine with application/json because I assumed GameBanana API would've used it. No idea what is causing the _sError. I get invalid ItemType. I'm clueless, sorry. The API needs to be more well documented, seriously. :P
    • Agree x 1
    How can someone draw a blank? avatar
    Mantra
    How can someone draw a blank?
  • shash7 avatar
    shash7 Offline
    Member Joined 7 years ago
    3,240 points Ranked 1298th
    14 medals 0 legendary, 1 rare
    • 6 years a member Medal icon
    • Halloween Mapping Contest Submitter Medal icon
    • 4th Place - Secret Society Mapping Contest Medal icon
    • Winter Worlds Mapping Contest Entrant Medal icon
    • Reached 1,000 Points Medal icon
    • Reached 2,500 Points Medal icon
    Report post
    2 years ago:
    Posted by RazerKat

    So, you basically receive data via POST or GET request? I'm confused. I get a "Moved Permanently 301" reponse when I call the API externally via a POST request. I assume that GameBanana uses this locally and has cross domain policy restrictions.

    You may want to take a look at this question on stackoverflow. Anyways, I just tried using the api on postman and it works.
    Btw, the content type returned is text/html.
    Got no fuel, running on pure a avatar
    Mantra
    Got no fuel, running on pure a
  • JediKat avatar
    JediKat avatar Offline
    MLG Studio Flag Affiliation: MLG Studio
    Member Joined 10 years ago
    669 points Ranked 5865th
    15 medals 0 legendary, 1 rare
    • 6 years a member Medal icon
    • Mapper of the Month, April 2014 Medal icon
    • GameBanana/CEVO CSGO Mapping Contest 2014 Entrant Medal icon
    • 1-5 Entries! GameBanana’s Christmas Giveaway 2014 Medal icon
    • Winter Warfare Entrant Medal icon
    • Became a Studio Leader Medal icon
    JediKat avatar
    JediKat
    MLG Studio Flag
    MLG Studio
    Report post
    2 years ago:
    So, you basically receive data via POST or GET request? I'm confused. I get a "Moved Permanently 301" reponse when I call the API externally via a POST request. I assume that GameBanana uses this locally and has cross domain policy restrictions.
    How can someone draw a blank? avatar
    Mantra
    How can someone draw a blank?
  • shash7 avatar
    shash7 Offline
    Member Joined 7 years ago
    3,240 points Ranked 1298th
    14 medals 0 legendary, 1 rare
    • 6 years a member Medal icon
    • Halloween Mapping Contest Submitter Medal icon
    • 4th Place - Secret Society Mapping Contest Medal icon
    • Winter Worlds Mapping Contest Entrant Medal icon
    • Reached 1,000 Points Medal icon
    • Reached 2,500 Points Medal icon
    Report post
    4 years ago:
    Awesome sausome mate. Will hack around once I get some time.
    Got no fuel, running on pure a avatar
    Mantra
    Got no fuel, running on pure a

Share

Shareable Image:
Share banner
HTML embed code:
BB embed code:
Markdown embed code:

More embeddable images

Bookmark and Share

Submitter

tom avatar
tom avatar Offline
Super Admin Joined 15 years ago
13,515 points Ranked 304th
33 medals 6 legendary, 6 rare
  • Achieved Super Admin clearance Medal icon
  • 10 years a member Medal icon
  • Thanked 500 submitters Medal icon
  • Submitted 200 Blogs Medal icon
  • Submitted 200 Threads Medal icon
  • Submitted 60 Polls Medal icon

tom avatar
tom

Category

Stats

Posts
4
Views
15,558
Date Added
4 years ago
Aug 29 2012 @ 5:12pm UTC
Date Modified
4 years ago
Aug 31 2012 @ 7:21pm UTC

More Wikis from tom

WiPs by tom