@@ -36,8 +36,8 @@ type Client interface {
36
36
DeviceTagsCreate (id string , tags map [string ]string ) error
37
37
DeviceTagsDelete (id string , keys []string ) error
38
38
CertificateCreate (id , csr string ) (* iotclient.ArduinoCompressedv2 , error )
39
- ThingCreate (thing * iotclient.Thing , force bool ) (* iotclient.ArduinoThing , error )
40
- ThingUpdate (id string , thing * iotclient.Thing , force bool ) error
39
+ ThingCreate (thing * iotclient.ThingCreate , force bool ) (* iotclient.ArduinoThing , error )
40
+ ThingUpdate (id string , thing * iotclient.ThingUpdate , force bool ) error
41
41
ThingDelete (id string ) error
42
42
ThingShow (id string ) (* iotclient.ArduinoThing , error )
43
43
ThingList (ids []string , device * string , props bool , tags map [string ]string ) ([]iotclient.ArduinoThing , error )
@@ -185,7 +185,7 @@ func (cl *client) CertificateCreate(id, csr string) (*iotclient.ArduinoCompresse
185
185
}
186
186
187
187
// ThingCreate adds a new thing on Arduino IoT Cloud.
188
- func (cl * client ) ThingCreate (thing * iotclient.Thing , force bool ) (* iotclient.ArduinoThing , error ) {
188
+ func (cl * client ) ThingCreate (thing * iotclient.ThingCreate , force bool ) (* iotclient.ArduinoThing , error ) {
189
189
opt := & iotclient.ThingsV2CreateOpts {Force : optional .NewBool (force )}
190
190
newThing , _ , err := cl .api .ThingsV2Api .ThingsV2Create (cl .ctx , * thing , opt )
191
191
if err != nil {
@@ -195,7 +195,7 @@ func (cl *client) ThingCreate(thing *iotclient.Thing, force bool) (*iotclient.Ar
195
195
}
196
196
197
197
// ThingUpdate updates a thing on Arduino IoT Cloud.
198
- func (cl * client ) ThingUpdate (id string , thing * iotclient.Thing , force bool ) error {
198
+ func (cl * client ) ThingUpdate (id string , thing * iotclient.ThingUpdate , force bool ) error {
199
199
opt := & iotclient.ThingsV2UpdateOpts {Force : optional .NewBool (force )}
200
200
_ , _ , err := cl .api .ThingsV2Api .ThingsV2Update (cl .ctx , id , * thing , opt )
201
201
if err != nil {
0 commit comments