Error with the client example

RESOLVED FIXED

Status

Marketplace
API
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: tarek, Assigned: andym)

Tracking

x86
Mac OS X
Points:
---

Details

(Reporter)

Description

5 years ago
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
(Reporter)

Updated

5 years ago
Target Milestone: --- → 2012-09-27
Assignee: nobody → amckay
Target Milestone: 2012-09-27 → 2012-10-18
(Assignee)

Comment 1

5 years ago
Pull request sent for the client: https://github.com/andymckay/Marketplace.Python/commit/8b4d24c66f70b001decc7810efcb3eec63294b98
(Assignee)

Updated

5 years ago
Summary: Regression on the create API → Error with the client example
Target Milestone: 2012-10-18 → ---
(Assignee)

Comment 2

5 years ago
Was merged.
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.