I recently ran across a problem where a customer has 100 skus for a product. The API only allows me to get the first 50.
opts.update({"limit": 50, "page": 1})
forproductinself.con.Products.all(**opts):
forskuinproduct.skus():
printskuIt would be nice if we could pass parameters to the sub resource's all/get method and have it cascade to the connection instance to perform the gets
stop=Falseskuopts= {"limit": 50, "page": 1}
whilenotstop:
forskuinproduct.skus(**skuopts):
printskuMy other option would be to iterate using the SubResource explicitly and passing in the product id and the product's connection, but the connection property is privatized.
opts.update({"limit": 50, "page": 1})
forproductinself.con.Products.all(**opts):
stop=Falseskuopts= {"limit": 50, "page": 1}
whilenotstop:
forskuinself.con.ProductSkus.all(product.id, product._connection, **skuopts):
printskuThis would require exposing the connection object from within the parent resource.
I recently ran across a problem where a customer has 100 skus for a product. The API only allows me to get the first 50.
It would be nice if we could pass parameters to the sub resource's all/get method and have it cascade to the connection instance to perform the gets
My other option would be to iterate using the SubResource explicitly and passing in the product id and the product's connection, but the connection property is privatized.
This would require exposing the connection object from within the parent resource.