trompamusic / trompace-client

A python library to read from and write to the Trompa CE
Apache License 2.0
1 stars 0 forks source link

Move all templates to */templates.py #55

Closed aggelosgkiokas closed 3 years ago

aggelosgkiokas commented 3 years ago

Shall we move all mutation/queries templates to the corresponding templates.py files? For example:

https://github.com/trompamusic/trompa-ce-client/blob/95cdc54979c53d2d3c567ff97ea7129f07ffe69c/trompace/mutations/property.py#L7-L11

Shall this be moved to trompace/mutations/templates.py?

alastair commented 3 years ago

We have some better methods for writing these kinds of queries now. See format_mutation: https://github.com/trompamusic/trompa-ce-client/blob/33c98735df1ce4323b617c3a63a42d11dd4eb0db/trompace/mutations/mediaobject.py#L75

and for joining two objects, format_link_mutation: https://github.com/trompamusic/trompa-ce-client/blob/33c98735df1ce4323b617c3a63a42d11dd4eb0db/trompace/mutations/mediaobject.py#L153