Last Comment Bug 792706 - Error with the client example
: Error with the client example
Status: RESOLVED FIXED
:
Product: Marketplace
Classification: Server Software
Component: API (show other bugs)
: 1.0
: x86 Mac OS X
: -- normal (vote)
: ---
Assigned To: Andy McKay [:andym]
:
:
Mentors:
Depends on:
Blocks:
  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: ---


Attachments

Description 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 main.py create 1bdad0715e41453eae333f0ec18cd188
> /Users/tarek/Dev/github.com/MarketplaceClientExample/python/app/commands.py(39)create()
-> if response.status_code == 201:
(Pdb) l
 34     
 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 Andy McKay [:andym] 2012-10-16 15:09:16 PDT
Pull request sent for the client: https://github.com/andymckay/Marketplace.Python/commit/8b4d24c66f70b001decc7810efcb3eec63294b98
Comment 2 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.