0.0.2 • Published 2 years ago

node-red-contrib-huawei-obs v0.0.2

Weekly downloads
-
License
ISC
Repository
-
Last release
2 years ago

node-red-huawei-obs

A sample node for node-red

Instructions for use

parameter instructions

  • access_key this is huawei cloud auth access_key_id
  • access_secret this is huawei cloud auth secret_access_key
  • server this is huawei cloud obs https://your-endpoint
  • bucket this is huawei cloud obs Bucket name

put object

  • use msg.obsObject msg.obsObject is an object ,includes that three parameters .first of all ,type is type of obs methods . put is means for uploading object ,for another is means getting.second param objectName corresponds obs object name, for example [path]/name.[ext].the last param is objectBody.it is represents body,so you can upload not only such as String JSON Text even binary .
  • complete parameters
msg.obsObject = {
    "type":"put",
    "objectName":"test/1111222.json",
    "objectBody":{
        "1":"1",
        "2":"2",
        "3":"3",
        "4":"4",
        "5":"5"
    }
};
return msg;

get object

  • use msg.obsObject The same way as put object ,just changing put to get,but objectBody can not be sent because it's not necessary.
  • complete parameters
msg.obsObject = {
    "type":"get",
    "objectName":"test/1111222.json",
};
return msg;