Permalink
Browse files

updated api docs

  • Loading branch information...
cfh463 committed Apr 2, 2013
1 parent de6c27f commit de8054ae5304b2ced766ea55395447eacef7c81a
View
35 api.rb
@@ -144,9 +144,11 @@ def self.getremarklinks(doc)
def self.getpropertieslinks(doc)
md = ""
ctr =0
+ groupctr = 0
if !doc["MODULE"][0]["PROPERTIES"].nil?
s=doc["MODULE"][0]["PROPERTIES"][0]["PROPERTY"].sort {|x,y| x["name"] <=> y["name"]}
ctr = s.count()
+ # md += "<ul>"
s.each() { |element|
if element["generateDoc"].nil? || element["generateDoc"] == "true"
@@ -169,10 +171,15 @@ def self.getpropertieslinks(doc)
propdisplayname = '<span class="text-info">' + element["name"] + '</span>'
end
-
+ groupctr +=1
+ if groupctr == 36
+ # md+="</ul><ul>"
+ groupctr = 0
+ end
md += '<li><a href="#p' + element["name"] + '" data-target="cProperty' + element["name"] + '" class="autouncollapse">' + propdisplayname + "</a></li>"
end
}
+ # md += "</ul>"
end
return { "md" => md, "count" => ctr}
end
@@ -776,18 +783,6 @@ def self.markdown(topic)
proplinks = getpropertieslinks(doc)
methlinks = getmethodslinks(doc)
md += "#" + getApiName(doc) + "\n"
- if examplelinks["count"]>0
- md += '<div class="btn-group">'
- md += ''
- md += '<a href="#Examples" class="btn"><i class="icon-edit"></i> Examples<sup>&nbsp;' + examplelinks["count"].to_s + '</sup></a>'
- md += '<button href="#" class="btn dropdown-toggle" data-toggle="dropdown">'
- md += ' <span class="caret"></span>&nbsp;'
- md += '</button>'
- md += '<ul class="dropdown-menu" style="max-height: 500px;overflow: auto;">'
- md += examplelinks["md"]
- md += '</ul>'
- md += '</div>'
- end
if proplinks["count"]>0
md += '<div class="btn-group">'
md += ''
@@ -845,7 +840,19 @@ def self.markdown(topic)
md += '</ul>'
md += '</div>'
end
- md += '<div >'
+ if examplelinks["count"]>0
+ md += '<div class="btn-group">'
+ md += ''
+ md += '<a href="#Examples" class="btn"><i class="icon-edit"></i> Examples<sup>&nbsp;' + examplelinks["count"].to_s + '</sup></a>'
+ md += '<button href="#" class="btn dropdown-toggle" data-toggle="dropdown">'
+ md += ' <span class="caret"></span>&nbsp;'
+ md += '</button>'
+ md += '<ul class="dropdown-menu" style="max-height: 500px;overflow: auto;">'
+ md += examplelinks["md"]
+ md += '</ul>'
+ md += '</div>'
+ end
+ md += '<div >'
md += "\n" + getApiDesc(doc) + "\n"
if docexamples !=""
View
@@ -1,5 +1,5 @@
#Network
-<div class="btn-group"><a href="#Examples" class="btn"><i class="icon-edit"></i> Examples<sup>&nbsp;1</sup></a><button href="#" class="btn dropdown-toggle" data-toggle="dropdown"> <span class="caret"></span>&nbsp;</button><ul class="dropdown-menu" style="max-height: 500px;overflow: auto;"><li><a href="#e0" data-target="eExample0" class="autouncollapse">Detecting a Network Connection</a></li></ul></div><div class="btn-group"><a href="#Properties" class="btn"><i class="icon-list"></i> Properties<sup>&nbsp;8</sup></a><button href="#" class="btn dropdown-toggle" data-toggle="dropdown"> <span class="caret"></span>&nbsp;</button><ul class="dropdown-menu" style="max-height: 500px;overflow: auto;"><li><a href="#pauthPassword" data-target="cPropertyauthPassword" class="autouncollapse">authPassword</a></li><li><a href="#pauthType" data-target="cPropertyauthType" class="autouncollapse">authType</a></li><li><a href="#pauthUser" data-target="cPropertyauthUser" class="autouncollapse">authUser</a></li><li><a href="#pheaders" data-target="cPropertyheaders" class="autouncollapse">headers</a></li><li><a href="#phttpVerb" data-target="cPropertyhttpVerb" class="autouncollapse"><span class="text-info">httpVerb</span></a></li><li><a href="#presponseTimeout" data-target="cPropertyresponseTimeout" class="autouncollapse">responseTimeout</a></li><li><a href="#purl" data-target="cPropertyurl" class="autouncollapse">url</a></li><li><a href="#pverifyPeerCertificate" data-target="cPropertyverifyPeerCertificate" class="autouncollapse"><span class="text-info">verifyPeerCertificate</span></a></li></ul></div><div class="btn-group"><a href="#Methods" class="btn"><i class="icon-cog"></i> Methods<sup>&nbsp;14</sub></a><a class="btn dropdown-toggle" data-toggle="dropdown" data-target="#" href="#Methods" > <span class="caret"></span>&nbsp;</a><ul class="dropdown-menu" style="max-height: 500px;overflow: auto;"><li><a href="#mcancel" data-target="cMethodcancel" class="autouncollapse">cancel</a></li><li><a href="#mconnectWan" data-target="cMethodconnectWan" class="autouncollapse">connectWan</a></li><li><a href="#mdetectConnection" data-target="cMethoddetectConnection" class="autouncollapse">detectConnection</a></li><li><a href="#mdisconnectWan" data-target="cMethoddisconnectWan" class="autouncollapse">disconnectWan</a></li><li><a href="#mdownloadFile" data-target="cMethoddownloadFile" class="autouncollapse">downloadFile</a></li><li><a href="#mget" data-target="cMethodget" class="autouncollapse">get</a></li><li><a href="#mhasCellNetwork" data-target="cMethodhasCellNetwork" class="autouncollapse">hasCellNetwork</a></li><li><a href="#mhasNetwork" data-target="cMethodhasNetwork" class="autouncollapse">hasNetwork</a></li><li><a href="#mhasWifiNetwork" data-target="cMethodhasWifiNetwork" class="autouncollapse">hasWifiNetwork</a></li><li><a href="#mpost" data-target="cMethodpost" class="autouncollapse">post</a></li><li><a href="#mstartStatusNotify" data-target="cMethodstartStatusNotify" class="autouncollapse">startStatusNotify</a></li><li><a href="#mstopDetectingConnection" data-target="cMethodstopDetectingConnection" class="autouncollapse">stopDetectingConnection</a></li><li><a href="#mstopStatusNotify" data-target="cMethodstopStatusNotify" class="autouncollapse">stopStatusNotify</a></li><li><a href="#muploadFile" data-target="cMethoduploadFile" class="autouncollapse">uploadFile</a></li></ul></div><div class="btn-group pull-right"><button class="btn" id="expandAll" data-toggle="tooltip" title="Expand/Collapse all"><i class="icon-th-list "></i>&nbsp;</button></div><div class="btn-group"><a href="#Remarks" class="btn"><i class="icon-warning-sign"></i> Remarks<sup>&nbsp;3</sup></a><button href="#" class="btn dropdown-toggle" data-toggle="dropdown"> <span class="caret"></span>&nbsp;</button><ul class="dropdown-menu" style="max-height: 500px;overflow: auto;"><li><a href="#r0" data-target="rRemark0" class="autouncollapse">Detecting a connection through proxies</a></li><li><a href="#r1" data-target="rRemark1" class="autouncollapse">Detecting a connection over WAN</a></li><li><a href="#r2" data-target="rRemark2" class="autouncollapse">Preventing access to the device (WEH / WM)</a></li></ul></div><div >
+<div class="btn-group"><a href="#Properties" class="btn"><i class="icon-list"></i> Properties<sup>&nbsp;8</sup></a><button href="#" class="btn dropdown-toggle" data-toggle="dropdown"> <span class="caret"></span>&nbsp;</button><ul class="dropdown-menu" style="max-height: 500px;overflow: auto;"><li><a href="#pauthPassword" data-target="cPropertyauthPassword" class="autouncollapse">authPassword</a></li><li><a href="#pauthType" data-target="cPropertyauthType" class="autouncollapse">authType</a></li><li><a href="#pauthUser" data-target="cPropertyauthUser" class="autouncollapse">authUser</a></li><li><a href="#pheaders" data-target="cPropertyheaders" class="autouncollapse">headers</a></li><li><a href="#phttpVerb" data-target="cPropertyhttpVerb" class="autouncollapse"><span class="text-info">httpVerb</span></a></li><li><a href="#presponseTimeout" data-target="cPropertyresponseTimeout" class="autouncollapse">responseTimeout</a></li><li><a href="#purl" data-target="cPropertyurl" class="autouncollapse">url</a></li><li><a href="#pverifyPeerCertificate" data-target="cPropertyverifyPeerCertificate" class="autouncollapse"><span class="text-info">verifyPeerCertificate</span></a></li></ul></div><div class="btn-group"><a href="#Methods" class="btn"><i class="icon-cog"></i> Methods<sup>&nbsp;14</sub></a><a class="btn dropdown-toggle" data-toggle="dropdown" data-target="#" href="#Methods" > <span class="caret"></span>&nbsp;</a><ul class="dropdown-menu" style="max-height: 500px;overflow: auto;"><li><a href="#mcancel" data-target="cMethodcancel" class="autouncollapse">cancel</a></li><li><a href="#mconnectWan" data-target="cMethodconnectWan" class="autouncollapse">connectWan</a></li><li><a href="#mdetectConnection" data-target="cMethoddetectConnection" class="autouncollapse">detectConnection</a></li><li><a href="#mdisconnectWan" data-target="cMethoddisconnectWan" class="autouncollapse">disconnectWan</a></li><li><a href="#mdownloadFile" data-target="cMethoddownloadFile" class="autouncollapse">downloadFile</a></li><li><a href="#mget" data-target="cMethodget" class="autouncollapse">get</a></li><li><a href="#mhasCellNetwork" data-target="cMethodhasCellNetwork" class="autouncollapse">hasCellNetwork</a></li><li><a href="#mhasNetwork" data-target="cMethodhasNetwork" class="autouncollapse">hasNetwork</a></li><li><a href="#mhasWifiNetwork" data-target="cMethodhasWifiNetwork" class="autouncollapse">hasWifiNetwork</a></li><li><a href="#mpost" data-target="cMethodpost" class="autouncollapse">post</a></li><li><a href="#mstartStatusNotify" data-target="cMethodstartStatusNotify" class="autouncollapse">startStatusNotify</a></li><li><a href="#mstopDetectingConnection" data-target="cMethodstopDetectingConnection" class="autouncollapse">stopDetectingConnection</a></li><li><a href="#mstopStatusNotify" data-target="cMethodstopStatusNotify" class="autouncollapse">stopStatusNotify</a></li><li><a href="#muploadFile" data-target="cMethoduploadFile" class="autouncollapse">uploadFile</a></li></ul></div><div class="btn-group pull-right"><button class="btn" id="expandAll" data-toggle="tooltip" title="Expand/Collapse all"><i class="icon-th-list "></i>&nbsp;</button></div><div class="btn-group"><a href="#Remarks" class="btn"><i class="icon-warning-sign"></i> Remarks<sup>&nbsp;3</sup></a><button href="#" class="btn dropdown-toggle" data-toggle="dropdown"> <span class="caret"></span>&nbsp;</button><ul class="dropdown-menu" style="max-height: 500px;overflow: auto;"><li><a href="#r0" data-target="rRemark0" class="autouncollapse">Detecting a connection through proxies</a></li><li><a href="#r1" data-target="rRemark1" class="autouncollapse">Detecting a connection over WAN</a></li><li><a href="#r2" data-target="rRemark2" class="autouncollapse">Preventing access to the device (WEH / WM)</a></li></ul></div><div class="btn-group"><a href="#Examples" class="btn"><i class="icon-edit"></i> Examples<sup>&nbsp;1</sup></a><button href="#" class="btn dropdown-toggle" data-toggle="dropdown"> <span class="caret"></span>&nbsp;</button><ul class="dropdown-menu" style="max-height: 500px;overflow: auto;"><li><a href="#e0" data-target="eExample0" class="autouncollapse">Detecting a Network Connection</a></li></ul></div><div >
<a name='Examples'></a>
View

Large diffs are not rendered by default.

Oops, something went wrong.
View
@@ -1392,7 +1392,7 @@
</BACKWARDS_COMPATIBILITY>
<RETURN type="ARRAY">
<DESC>Array of Barcode objects, one for each hardware scanner on the device. Methdods and properties can be set separately on each scanner but if you are using one scanner you must first disable it before being able to use another scanner on the same device.</DESC>
- <PARAM name="scannerArray" type="SELF_INSTANCE"/>
+ <PARAM type="SELF_INSTANCE"/>
</RETURN>
</METHOD>
@@ -1464,7 +1464,29 @@
<METHOD name="disable" hasCallback="none">
<DESC>This is documentation</DESC>
</METHOD>
-
+
+ <METHOD name="recognize" hasCallback="optional">
+ <VER_INTRODUCED>1.0.0</VER_INTRODUCED>
+ <APPLIES>iOS/Android software recognizer</APPLIES>
+ <DESC>Recognizes a barcode on an image. Returns a string with recognized code, or empty string if the barcode is not recognized.</DESC>
+ <PARAMS>
+ <PARAM name="imageFilePath" type="STRING">
+ <DESC>String. Path to the image that contains the barcode to be recognized.</DESC>
+ </PARAM>
+ </PARAMS>
+ <RETURN type="STRING">
+ <DESC>string with recognized code, or empty string if the barcode is not recognized</DESC>
+ </RETURN>
+ </METHOD>
+
+ <METHOD name="getSupportedProperties" hasCallback="optional">
+ <DESC>return array of properties supported by this scaner</DESC>
+ <RETURN type="ARRAY">
+ <DESC>array of property names supported by this scaner</DESC>
+ <PARAM type="STRING"/>
+ </RETURN>
+ </METHOD>
+
<METHOD name="take" hasCallback="mandatory">
<VER_INTRODUCED>1.0.0</VER_INTRODUCED>
<APPLIES>All Scanners</APPLIES>
@@ -1488,6 +1510,24 @@
</PARAMS>
</CALLBACK>
</METHOD>
+
+ <METHOD name="take_barcode" deprecated="true" >
+ <VER_INTRODUCED>1.0.0</VER_INTRODUCED>
+ <APPLIES>iOS/Android software recognizer</APPLIES>
+ <DESC>deprecated old method for taking barcode</DESC>
+ <PARAMS>
+ <PARAM name="rubyCallbackURL" type="STRING">
+ <DESC>Ruby callbacl URL</DESC>
+ </PARAM>
+ <PARAM name="propertyMap" type="HASH">
+ <DESC>Proivde a set of properties to configure the scanner, for example enable specific symbologies or check digits.</DESC>
+ <CAN_BE_NIL>
+ <DESC>Not providing properties to this function will use the scanner's default properties, or those previously set on the Scanner instance</DESC>
+ </CAN_BE_NIL>
+ </PARAM>
+ </PARAMS>
+ </METHOD>
+
<METHOD name="commandRemoteScanner" hasCallback="none">
<VER_INTRODUCED>4.0.0</VER_INTRODUCED>
@@ -1499,7 +1539,12 @@
</PARAM>
</PARAMS>
</METHOD>
-
+ <ALIASES>
+ <ALIAS new="barcode_recognize" existing="recognize" deprecated="true" >
+ <DESC>old deprecated recognize barcode on image method</DESC>
+ </ALIAS>
+ </ALIASES>
+
</METHODS>
<VER_INTRODUCED>1.0.0</VER_INTRODUCED>
Oops, something went wrong.

0 comments on commit de8054a

Please sign in to comment.