MediaMath / t1-python

Python SDK for MediaMath Platform APIs
https://developer.mediamath.com/
Apache License 2.0
18 stars 30 forks source link

concept weighting support #86

Closed FodT closed 7 years ago

FodT commented 8 years ago

doesn't look like strategy_concepts supports POSTing directly with weighting (i could be wrong on this), but POSTing to /strategies/:id/concepts allows it:

concepts.1.id:828276
concepts.1.weighting:BUDGET
concepts.1.percent:30.00
concepts.2.id:828032
concepts.2.weighting:BUDGET
concepts.2.percent:30.00
concepts.3.id:828020
concepts.3.weighting:BUDGET
concepts.3.percent:40.00
pswaminathan commented 8 years ago

I'd be tempted to do it like how we have other strategy children implemented—kind of deferred to the consumer.

missinnale commented 8 years ago

Working on UI-Automation framework and integrating this service in to speed up tests. Having weighting support would be really useful, let me know any updates on this. Thanks!

missinnale commented 8 years ago

Not sure if this is already known but when retrieving a strategy_concept object the weighting and percent of that weighting are included in the object:

StrategyConcept(_type='strategy_concept', percent='100.00', updated_on=datetime.datetime(2016, 8, 23, 15, 40, 10, tzinfo=FixedOffset(0)), status=True, version=0, id=3878832, weighting='BUDGET', concept_id=875146, name='Strategy Concepts #3878832', created_on=datetime.datetime(2016, 8, 23, 15, 40, 10, tzinfo=FixedOffset(0)), strategy_id=1503600)

I'd be interested to know what happens if in the StrategyConcept model under _pull if the keys

'weighting': 'VALUE'
'percent': '###'

were added.

Would that allow them to pass through? Currently when I try to add those values it doesn't work, but I can't tell if thats because they aren't explicitly stated as part of the model or the endpoint is rejecting them (guessing based on what @FodT stated it would be the model). Considering I haven't worked on this service I could be completely wrong and any knowledge that could be thrown my way would be helpful.

FodT commented 7 years ago

Solved by #92