Skip to content

Add more types to TypeMap #21

@rabbiveesh

Description

@rabbiveesh

Currently, Amazon::MWS::TypeMap only contains basic types, and the rest of the type scheme (which is totally undocumented, but the code is clear enough) resides in the code generated for each endpoint. There are two issues here:

  1. The system is actually very easily extended in terms of adding more basic endpoints (I know this b/c I'm implementing the Recommendations API). It would be easier for people to contribute and help this module cover the whole API if it were more clearly documented (like docs for List *List and *Array)

  2. There are types that aren't really covered by the current scheme, for example ListRecommendations's CategoryQueryList contains lists in some of its key-value pairs. I think if the type system were refactored to be totally in TypeMap, then it could be easily tested and also be made to have recursive types. (while I'm at it, the *Array type is a little terse, and would be better if it took a hashref and dealt with it properly rather than taking an arrayref. Make the calling code harder to use).

I'd be happy to implement this stuff, if that sort of contribution is wanted.

In a side note, what are the thoughts about implementing some sort of introspection for API params? I want to write a simple shell for using MWS, and it would be super cool if I could automatically get the param names from a name of an endpoint. While we're at it, it would also make it easy to generate docs for each endpoint.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions