Last Comment Bug 792706 - Error with the client example
: Error with the client example
Product: Marketplace
Classification: Server Software
Component: API (show other bugs)
: 1.0
: x86 Mac OS X
-- normal (vote)
: ---
Assigned To: Andy McKay [:andym]
Depends on:
  Show dependency treegraph
Reported: 2012-09-20 02:46 PDT by Tarek Ziadé (:tarek)
Modified: 2012-10-30 09:19 PDT (History)
1 user (show)
See Also:
QA Whiteboard:
Iteration: ---
Points: ---


Description User image Tarek Ziadé (:tarek) 2012-09-20 02:46:34 PDT
Playing with the MarketplaceClientExample app, I had an error on -dev because the app id returned by the API, which is supposed to be an int, is an unicode:

Tareks-Mac-Book-Air:python tarek$ bin/python create 1bdad0715e41453eae333f0ec18cd188
> /Users/tarek/Dev/
-> if response.status_code == 201:
(Pdb) l
 35     def create(auth, manifest_id):
 36         response = auth.create(manifest_id)
 37         content = json.loads(response.content)
 38         import pdb; pdb.set_trace()
 39  ->     if response.status_code == 201:
 40             return {'success': True,
 41                     'message': ('Your app has been added to marketplace!\n'
 42                                 'id: %d, slug: %s') % (content['id'],
 43                                                        content['slug'])}
 44         else:
(Pdb) content
{u'status': 0, u'slug': u'mozillaball-3', u'privacy_policy': None, u'support_url': None, u'description': None, u'resource_uri': u'/api/apps/app/388095/', u'device_types': [], u'premium_type': u'free', u'summary': u'Exciting Open Web development action!', u'manifest': u'1bdad0715e41453eae333f0ec18cd188', u'support_email': None, u'previews': [], u'homepage': None, u'id': u'388095', u'categories': [], u'name': u'MozillaBall'

This is a minor issue I guess, but should be fixed
Comment 1 User image Andy McKay [:andym] 2012-10-16 15:09:16 PDT
Pull request sent for the client:
Comment 2 User image Andy McKay [:andym] 2012-10-30 09:19:55 PDT
Was merged.

Note You need to log in before you can comment on or make changes to this bug.