Closed
Bug 583428
Opened 14 years ago
Closed 14 years ago
API should return a formatted suggested contribution
Categories
(addons.mozilla.org Graveyard :: API, defect, P3)
addons.mozilla.org Graveyard
API
Tracking
(Not tracked)
VERIFIED
FIXED
5.12.4
People
(Reporter: bparr, Assigned: davedash)
References
Details
In version 1.5 of the API, the <suggested_amount> element inside the <contribution_data> element does not provide a formatted suggested contribution. It currently only gives the currency and the amount. So, every client that wants to display this information needs to do some sort of mapping. For example, <suggested_amount currency="USD">1.99</suggested_amount> would have to be converted to $1.99 by the client. This seems better done on the server.
One possible solution:
<suggested_amount amount="1.99" currency="USD">$1.99</suggested_amount>
Updated•14 years ago
|
Whiteboard: [API-1.6]
Comment 2•14 years ago
|
||
Not sure why this is tagged for API-1.6, we really need this now for Firefox 4.
blocking2.0: --- → ?
Comment 3•14 years ago
|
||
This currently looks like:
<suggested_amount currency="USD">5.00</suggested_amount>
Can we adjust it to look like the suggestion in comment 0 without breaking anything? (essentially, adding a $ to the value)
Comment 4•14 years ago
|
||
It won't break anything in Firefox, we just display the contents of the element as-is, in fact we don't care about the other attributes Ben suggested but I can see uses for them for other API users.
Comment 5•14 years ago
|
||
Ok. That's why it was marked 1.6 - it was adjusting the API output, but if it doesn't break anything in Fx we're fine.
-> davedash for this milestone as a P3. We'll up its priority if it doesn't make this freeze.
Assignee: nobody → dd
Priority: -- → P3
Target Milestone: --- → 5.12.4
Updated•14 years ago
|
Whiteboard: [API-1.6]
Assignee | ||
Comment 6•14 years ago
|
||
http://github.com/jbalogh/zamboni/commit/5fc4c41
bparr let me know how this works, it's on addons.allizom.com
Assignee | ||
Updated•14 years ago
|
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Comment 9•14 years ago
|
||
Mossop: Some add-ons request contributions but don't set a suggested amount. What do you want the API to return in that case? I'm inclined to leave <suggested_amount> out in that case, but we don't know if that will break the AOM.
Assignee | ||
Comment 10•14 years ago
|
||
(In reply to comment #9)
> cc: jbalogh@mozilla.comMossop: Some add-ons request contributions but don't set a suggested amount.
> What do you want the API to return in that case? I'm inclined to leave
> <suggested_amount> out in that case, but we don't know if that will break the
> AOM.
In a more general sense, how are missing elements treated in the AOM? Is it graceful, or crashtastic?
Comment 11•14 years ago
|
||
Uh yeah we don't support the concept of there being no suggested amount right now. If hte suggested_amount tag is missing then we'll not show any contribution message at all, if it is there but empty then we'll just show "Suggestion Contribution: ". Neither is good. Let me know which you want to do (leaving the tag out makes sense to me) and I'll get the client working right in bug 617493
Comment 12•14 years ago
|
||
(In reply to comment #10)
> (In reply to comment #9)
> > cc: jbalogh@mozilla.comMossop: Some add-ons request contributions but don't set a suggested amount.
> > What do you want the API to return in that case? I'm inclined to leave
> > <suggested_amount> out in that case, but we don't know if that will break the
> > AOM.
>
> In a more general sense, how are missing elements treated in the AOM? Is it
> graceful, or crashtastic?
Varies on the element but in general if something is missing then we just don't show the info it provided
Comment 13•14 years ago
|
||
(In reply to comment #11)
> Let me know which you want to do
> (leaving the tag out makes sense to me) and I'll get the client working right
> in bug 617493
I'll leave it out. That's bug 617491.
Updated•14 years ago
|
blocking2.0: ? → final+
Updated•9 years ago
|
Product: addons.mozilla.org → addons.mozilla.org Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•