How to get types python?


#1

What is the correct syntax for calling MyType.get("my_id") in python via c3 remote?

c3.MyType.get("my_id")

returns the following error:

C3RuntimeException: 400 - BadField - c3.love.typesys.obj.FunctionTypeImpl_coerceArguments [9024.148]
message: "Required argument missing for function MyType.get: this"
JSON: {'include': 'my_id'}

Server version is 7.8.8.


#2

Here is the correct syntax:

c3.MyType.get(this={"id":"my_id"})


#3

I actually prefer:
c3.MyType(id="my_id").get()

Member functions are nice, use them :slight_smile: