Bug Parade

edited February 2011 in API Discussion
Think I found my first bug. I was testing the character API (http://help.obsidianportal.com/kb/api/api-characters) optional 'use_slug' to fetch a character.

Here's what I submitted:


(where 'af7946b642a111e0bbb240403656340d' is the campaign id of my oppy test campaign, found here: http://www.obsidianportal.com/campaigns/oppy).

What comes back -is- a character named poppy, but from a different campaign! (in this case, campaign bb9a5528f24411dfba8140403656340d, which appears to be the OverlordRising campaign). Here's the full response back:

{"slug":"poppy","dynamic_sheet":null,"dynamic_sheet_template":null,"character_url":"http://www.obsidianportal.com/campaigns/overlord-rising/characters/poppy","is_game_master_only":false,"avatar_url":"http://cdn.obsidianportal.com/images/302888/poppy1.png","tags":[],"is_player_character":false,"updated_at":"2011-01-18T07:13:27Z","description":"","campaign":{"slug":"overlord-rising","banner_image_url":"http://cdn.obsidianportal.com/assets/29495/OverlordRisingBanner.jpg","campaign_url":"http://www.obsidianportal.com/campaigns/overlord-rising","visibility":"public","name":"Overlord Rising","id":"bb9a5528f24411dfba8140403656340d"},"description_html":"","created_at":"2010-11-23T16:33:26Z","game_master_info":null,"author":{"profile_url":"http://www.obsidianportal.com/profile/voltara","avatar_image_url":"http://cdn.obsidianportal.com/images/306196/voltara.png","id":"e9c22d28f71b11dfb06740403656340d","username":"voltara"},"name":"Poppy","game_master_info_html":null,"bio":"Poppy learns the alphabet."}

Short story, looks like a bug in the lookup by campaign/by slug.

EDIT: the bug can be reproduced by running the test_show_by_slug unit test in https://github.com/lhayhurst/oppy/blob/master/CharacterAPI.py


  • Micah
    Posts: 894
    Thanks, I'll take a look. I think I can guess what it is, and it should be a simple fix.
  • sozin
    Posts: 20
    Cool, thank you. BTW, does anyone else (mage-hand? sorry, I haven't installed your API yet ... my ruby is t3h sux0r) have a working version of the wiki GET api (http://help.obsidianportal.com/kb/api/api-wiki-pages)? I feel like I'm doing the right thing and I'm getting 404's back from OP.

    My GET url: http://api.obsidianportal.com/v1/af7946b642a111e0bbb240403656340d/wikis.json
    My parameter: {'campaign_id' : af7946b642a111e0bbb240403656340d }

    I'm certain that 'af7946b642a111e0bbb240403656340d' is a valid campaign id as I'm using it to get a campaign using the campaignAPI. And I'm using the same oauth connection code as all the rest of my working (user, character, campaign) API implementations. The wikiAPI impl is here: https://github.com/lhayhurst/oppy/blob/master/WikiAPI.py

  • Shammond42
    Posts: 65
    Your URL should be this


    Without the campaigns OP doesn't know if you are looking for a campagin, user or something else.

  • sozin
    Posts: 20
    Duh! Tests passing now. Thank you shammond42!
  • sozin
    Posts: 20 edited March 2011
    Found what appears to be another bug. This one is in the wiki API, show by wiki page slug. To reproduce it pass the following in:


    The return value is the home page of the wrong campaign. It returns a home page for the campaign http://www.obsidianportal.com/campaigns/kensing (the Kensing campaign), with campaign id '5b6ef1e0f24411dfba8140403656340d'.

    this bug can be reproduced by running the tests in https://github.com/lhayhurst/oppy/blob/master/WikiAPI.py
    Post edited by sozin on
  • sozin
    Posts: 20
    *gentle bump*
Sign In or Register to comment.

July 2022
Signs and Portends

Read the feature post on the blog
Return to Obsidian Portal

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!