{
  "name": "NoTalk",
  "version": "0.0.1",
  "displayname": "NOOXY Chat Service",
  "description": "A service that provide live chat, channel and other features.",
  "git_url": "https://github.com/NOOXY-Research/NoTalk",
  "Authors": [
    "NOOXY",
    "noowyee"
  ],

  "implementation_api": false,

  "DatabaseAPI": true,

  "LibraryAPI": true,

  "dependencies": {
    "node_packages": {},
    "services": {
      "NoUser": "0.0.0"
    }
  },

  "servicefunctions": {
    "createCh": {
      "displayname": "Create a channel.",
      "description": "Create a NoTalk channel.",
      "secure": false,
      "protocol": {
        "call": {
          "t": "Type of channel for example 'live' or 'normal'",
          "p": "Thumbnail",
          "n": "Channel's name.",
          "a": "Access level.",
          "d": "Channel's describtion."
        },
        "return": {
          "s": "Status.",
          "e": "Error status."
        }
      }
    },

    "bindChs": {
      "displayname": "Bind channels.",
      "description": "Keep in touch in specified channels. Then will recieve new messages from activitysocket.",
      "secure": false,
      "protocol": {
        "call": {
          "i": "Channel's ID. Array."
        },
        "return": {
          "s": "Status.",
          "e": "Error status."
        }
      }
    },

    "getMsgs": {
      "displayname": "Get channels messages",
      "description": "Get messages history from a existed channel.",
      "secure": false,
      "protocol": {
        "call": {
          "i": "Channel's ID.",
          "b": "Begin row of data from the channel.",
          "r": "Number of rows from begin."
        },
        "return": {
          "s": "Status.",
          "e": "Error status.",
          "r": {"row number": ["UserId", "Type", "Contain", "Detail"]}
        }
      }
    },

    "sendMsg": {
      "displayname": "Send message",
      "description": "Send a new message.",
      "secure": false,
      "protocol": {
        "call": {
          "i": "Channel's ID.",
          "c": ["Type", "Contain", "Detail"]
        },
        "return": {
          "s": "Status.",
          "e": "Error status."
        }
      }
    },

    "editMsg": {
      "displayname": "Get history",
      "description": "Get history from a existed channel.",
      "secure": false,
      "protocol": {
        "call": {
          "i": "Channel's ID.",
          "t": "Type of operation. 'del' or 'edit'",
          "c": "New contain."
        },
        "return": {
          "s": "Status.",
          "e": "Error status."
        }
      }
    },

    "getMyChs": {
      "displayname": "Getmy channels",
      "description": "List channels of the user have.",
      "secure": false,
      "protocol": {
        "call": null,
        "return": {
          "c": "channels",
          "s": "Status.",
          "e": "Error status."
        }
      }
    },

    "getUserMeta": {
      "displayname": "Get user's meta.",
      "description": "Recieve user's metadata from server.",
      "secure": false,
      "protocol": {
        "call": {
          "u": "user Id."
        },
        "return": {
          "n": "username",
          "b": "bio",
          "l": "latestonline"
        }
      }
    },

    "getMyMeta": {
      "displayname": "Get user's meta.",
      "description": "Recieve user's metadata from server.",
      "secure": false,
      "protocol": {
        "call": {
          "u": "user Id."
        },
        "return": {
          "i": "userid",
          "n": "username",
          "j": "joindate",
          "b": "bio",
          "a": "showactive",
          "p": "clientpreference"
        }
      }
    },

    "getChMeta": {
      "displayname": "Get channel's meta.",
      "description": "Recieve channel's metadata from server.",
      "secure": false,
      "protocol": {
        "call": {
          "c": "Channel's ID."
        },
        "return": {
          "o": "owners",
          "n": "displayname",
          "d": "discription",
          "u": "users",
          "s": "Status.",
          "e": "Error status."
        }
      }
    },

    "getChUsers": {
      "displayname": "Get channel's meta.",
      "description": "Recieve channel's metadata from server.",
      "secure": false,
      "protocol": {
        "call": {
          "c": "Channel's ID."
        },
        "return": {
          "s": "Status.",
          "e": "Error status.",
          "d": [
            ["username", "isadmin"]
          ]
        }
      }
    },

    "addChUsers": {
      "displayname": "Add users.",
      "description": "Add NoTalk users into a channel.",
      "secure": false,
      "protocol": {
        "call": {
          "c": "Channel's ID.",
          "u":[
            ["username", "isadmin"]
          ]
        },
        "return": {
          "s": "Status.",
          "e": "Error status."
        }
      }
    },

    "editChUsers": {
      "displayname": "Edit user.",
      "description": "Edit NoTalk users in a channel.",
      "secure": false,
      "protocol": {
        "call": {
          "c": "Channel's ID.",
          "u":[
            ["username", "new isadmin"]
          ]
        },
        "return": {
          "s": "Status.",
          "e": "Error status."
        }
      }
    },

    "updateChMeta": {
      "displayname": "Update channel's meta.",
      "description": "Update channel's metadata of server.",
      "secure": false,
      "protocol": {
        "call": {
          "c": "Channel's ID.",
          "d": "Displayname."
        },
        "return": {
          "o": "owners",
          "n": "displayname",
          "d": "discription",
          "u": "users",
          "s": "Status.",
          "e": "Error status."
        }
      }
    }
  }
}
