浏览代码

revert the description for id parameter in doc

afrokick 6 年之前
父节点
当前提交
901c84c6ff
共有 2 个文件被更改,包括 5 次插入3 次删除
  1. 1 1
      docs/api.json
  2. 4 2
      docs/index.html

+ 1 - 1
docs/api.json

@@ -9,7 +9,7 @@
         "name": "id",
         "optional": true,
         "type": "string",
-        "description": "Other peers can connect to this peer using the provided ID. If no ID is given, one will be generated by the brokering server. <span class='warn'>It's not recommended that you use this ID to identify peers, as it's meant to be used for brokering connections only. You're recommended to set the <a href='#peerconnect-options'><code>metadata</code></a> option to send other identifying information.</span>"
+        "description": "Other peers can connect to this peer using the provided ID. If no ID is given, one will be generated by the brokering server. The ID must start and end with an alphanumeric character (lower or upper case character or a digit). In the middle of the ID spaces, dashes (-) and underscores (_) are allowed.<span class='warn'>It's not recommended that you use this ID to identify peers, as it's meant to be used for brokering connections only. You're recommended to set the <a href='#peerconnect-options'><code>metadata</code></a> option to send other identifying information.</span>"
       },
       {
         "name": "options",

+ 4 - 2
docs/index.html

@@ -226,8 +226,10 @@ var peer = new Peer({
                   class="bracket">[</span>id<span class="bracket">]</span></span></a><span
               class="tag type string">string</span></span>
           <p class="description">Other peers can connect to this peer using the provided ID. If no ID is given, one will
-            be generated by the brokering server. <span class='warn'>It's not recommended that you use this ID to
-              identify peers, as it's meant to be used for brokering connections only. You're recommended to set the <a
+            be generated by the brokering server. The ID must start and end with an alphanumeric character (lower or
+            upper case character or a digit). In the middle of the ID spaces, dashes (-) and underscores (_) are
+            allowed.<span class='warn'>It's not recommended that you use this ID to identify peers, as it's meant to be
+              used for brokering connections only. You're recommended to set the <a
                 href='#peerconnect-options'><code>metadata</code></a> option to send other identifying
               information.</span></p>
         </div>