diff --git a/examples/action-invokers/emailyak.coffee b/examples/action-invokers/emailyak.coffee index 9f4e6e6..928c25d 100644 --- a/examples/action-invokers/emailyak.coffee +++ b/examples/action-invokers/emailyak.coffee @@ -1,8 +1,10 @@ + ### EmailYak ACTION INVOKER ------------------------ # # Requires user params: + # - apikey: The user's EmailYak API key ### @@ -26,10 +28,10 @@ standardCallback = ( funcName ) -> ### Send a mail through Emailyak. -@param sender The email address belonging to your apikey -@param receipient The email address for the one that receives the mail -@param subject The subject of the mail -@param content The content of the mail +- sender The email address belonging to your apikey +- receipient The email address for the one that receives the mail +- subject The subject of the mail +- content The content of the mail ### exports.sendMail = ( sender, receipient, subject, content ) -> if typeof content isnt "string" diff --git a/examples/action-invokers/neospeech.coffee b/examples/action-invokers/neospeech.coffee index 5126d66..871b9d9 100644 --- a/examples/action-invokers/neospeech.coffee +++ b/examples/action-invokers/neospeech.coffee @@ -3,7 +3,7 @@ # Converts text to speech and issues an event into th system on completion # # Requires user-specific parameters: -# + # - emailaccount # - accountid # - loginkey @@ -29,22 +29,22 @@ arrFormats = [ "FORMAT_MUWAV" # (8bit Mu-law PCM Wave) ] -# oResponseCodes = -# "0": "success" -# "-1": "invalid login" -# "-2": "account inactive" -# "-3": "account unauthorized" -# "-4": "invalid or inactive login key" -# "-5": "invalid conversion number lookup" -# "-6": "content size is too large (only for “Basic” subscribers)" -# "-7": "monthly allowance has been exceeded (only for “Basic” subscribers)" -# "-10": "invalid TTS Voice ID" -# "-11": "invalid TTS Output Format ID" -# "-12": "invalid REST request" -# "-13": "invalid or unavailable TTS Sample Rate" -# "1": "invalid SSML (not a valid XML document)" -# "2": "invalid SSML (SSML content must begin with a “speak” tag)" -# "3": "invalid SSML (“lexicon” tag is not supported)" +# oResponseCodes = +# "0": "success" +# "-1": "invalid login" +# "-2": "account inactive" +# "-3": "account unauthorized" +# "-4": "invalid or inactive login key" +# "-5": "invalid conversion number lookup" +# "-6": "content size is too large (only for “Basic” subscribers)" +# "-7": "monthly allowance has been exceeded (only for “Basic” subscribers)" +# "-10": "invalid TTS Voice ID" +# "-11": "invalid TTS Output Format ID" +# "-12": "invalid REST request" +# "-13": "invalid or unavailable TTS Sample Rate" +# "1": "invalid SSML (not a valid XML document)" +# "2": "invalid SSML (SSML content must begin with a “speak” tag)" +# "3": "invalid SSML (“lexicon” tag is not supported)" parseAnswer = ( body ) -> arrSelectors = body.match /(\S+)=["']?((?:.(?!["']?\s+(?:\S+)=|[>"']))+.)["']?/g @@ -55,6 +55,7 @@ parseAnswer = ( body ) -> oAnswer # Function arguments: + # - text: the text to be translated into voice # - idVoice: index of the voice used for conversion from the arrVoices array. # - idAudioFormat: index of the voice used for conversion from the arrVoices array. diff --git a/examples/action-invokers/probinder.coffee b/examples/action-invokers/probinder.coffee index 4a83d80..033bfda 100644 --- a/examples/action-invokers/probinder.coffee +++ b/examples/action-invokers/probinder.coffee @@ -31,11 +31,11 @@ standardCallback = ( funcName ) -> ### Call the ProBinder service with the given parameters. -@param {Object} args the required function arguments object -@param {Object} [args.data] the data to be posted -@param {String} args.service the required service identifier to be appended to the url -@param {String} args.method the required method identifier to be appended to the url -@param {function} [args.callback] the function to receive the request answer + - {Object} args the required function arguments object + - {Object} [args.data] the data to be posted + - {String} args.service the required service identifier to be appended to the url + - {String} args.method the required method identifier to be appended to the url + - {function} [args.callback] the function to receive the request answer ### callService = ( args ) -> if not args.service or not args.method @@ -50,9 +50,9 @@ callService = ( args ) -> ### Does everything to post something in a binder -@param {String} companyId the comany associated to the binder -@param {String} contextId the binder id -@param {String} content the content to be posted + - {String} companyId the comany associated to the binder + - {String} contextId the binder id + - {String} content the content to be posted ### exports.newContent = ( companyId, contextId, content ) -> if arguments[ 4 ] @@ -71,8 +71,8 @@ exports.newContent = ( companyId, contextId, content ) -> ### Does everything to post a file info in a binder tab -@param {String} fromService the content service which grabs the content -@param {String} fromId the content id from which the information is grabbed + - {String} fromService the content service which grabs the content + - {String} fromId the content id from which the information is grabbed ### exports.makeFileEntry = ( fromService, fromId, toCompany, toContext ) -> getContent @@ -87,11 +87,11 @@ exports.makeFileEntry = ( fromService, fromId, toCompany, toContext ) -> ### Calls the content get service with the content id and the service id provided. -@param {Object} args the object containing the service id and the content id, + - {Object} args the object containing the service id and the content id, success and error callback methods -@param {String} args.serviceid the service id that is able to process this content -@param {String} args.contentid the content id -@param {function} [args.callback] receives the needle answer from the "call" function + - {String} args.serviceid the service id that is able to process this content + - {String} args.contentid the content id + - {function} [args.callback] receives the needle answer from the "call" function ### getContent = ( args ) -> if not args.callback @@ -107,7 +107,7 @@ getContent = ( args ) -> ### Sets the content as read. -@param {Object} id the content id to be set to read. + - {Object} id the content id to be set to read. ### exports.setRead = ( id ) -> callService diff --git a/examples/action-invokers/remote-engine.coffee b/examples/action-invokers/remote-engine.coffee index 63c3f97..29106e6 100644 --- a/examples/action-invokers/remote-engine.coffee +++ b/examples/action-invokers/remote-engine.coffee @@ -3,6 +3,7 @@ Remote Engine ------------- # # Requires user params: + # - eventname: The event type to be pushed into the system # - webhook: The url to the emote webhook that will receive the event ### @@ -14,7 +15,7 @@ options = ### Push an event into a WebAPI engine. -@param {Object} evt The event object that will be transmitted. + - {Object} evt The event object that will be transmitted. ### exports.pushEvent = ( evt ) -> if not evt diff --git a/examples/action-invokers/robert.coffee b/examples/action-invokers/robert.coffee index 01df5e4..220f9e9 100644 --- a/examples/action-invokers/robert.coffee +++ b/examples/action-invokers/robert.coffee @@ -8,6 +8,7 @@ This is a customized module, made for Robert Frank to automatically create courses binders and prefill them with data. This module requires user-specific parameters: + - binderUsername - binderPassword - importIoUserGuid @@ -305,6 +306,7 @@ exports.createSemester = ( semester ) -> # Expects + # - semester # - studies # - major diff --git a/examples/event-pollers/emailyak.coffee b/examples/event-pollers/emailyak.coffee index 5160d39..6799714 100644 --- a/examples/event-pollers/emailyak.coffee +++ b/examples/event-pollers/emailyak.coffee @@ -3,6 +3,7 @@ # --------------------- # # Requires user params: + # - apikey: The user's EmailYak API key # @@ -24,27 +25,28 @@ exports.newMail = () -> log "#{ body.Emails.length } mail events pushed into the system" pushEvent mail for mail in body.Emails - ### - This will emit events of the form: - ( Refer to http://docs.emailyak.com/get-new-email.html for more information. ) + + # This will emit events of the form: + + # ( Refer to http://docs.emailyak.com/get-new-email.html for more information. ) - { - "EmailID": "xquukd5z", - "Received": "2014-04-19T11:27:11", - "ToAddress": "test@mscliveweb.simpleyak.com", - "ParsedData": [ - { - "Data": "Best Regards\nTest User", - "Part": 0, - "Type": "Email" - } - ], - "FromName": "Test User", - "ToAddressList": "test@mscliveweb.simpleyak.com", - "FromAddress": "test.address@provider.com", - "HtmlBody": "Best Regards\nTest User", - "CcAddressList": "", - "TextBody": "Best Regards\nTest User", - "Subject": "test subject" - } - ### \ No newline at end of file +# { +# "EmailID": "xquukd5z", +# "Received": "2014-04-19T11:27:11", +# "ToAddress": "test@mscliveweb.simpleyak.com", +# "ParsedData": [ +# { +# "Data": "Best Regards\nTest User", +# "Part": 0, +# "Type": "Email" +# } +# ], +# "FromName": "Test User", +# "ToAddressList": "test@mscliveweb.simpleyak.com", +# "FromAddress": "test.address@provider.com", +# "HtmlBody": "Best Regards\nTest User", +# "CcAddressList": "", +# "TextBody": "Best Regards\nTest User", +# "Subject": "test subject" +# } + \ No newline at end of file diff --git a/examples/event-pollers/importio.coffee b/examples/event-pollers/importio.coffee index 80138f3..ecb5c7a 100644 --- a/examples/event-pollers/importio.coffee +++ b/examples/event-pollers/importio.coffee @@ -57,18 +57,19 @@ exports.weekData = ( idCity ) -> connectorGuids: [ "2a1d789a-4d24-4942-bdca-ffa0e9f99c85" ] queryService params, ( data ) -> pushEvent data - # [ - # { - # wind: '9 mph', - # day_identifier: 'Today', - # day_name: 'Mon', - # temp_max: '61 °F', - # temp_min: '50 °F', - # sunlight: '0 h', - # rain: '0-2mm' - # }, - # [...] - # ] + +# [ +# { +# wind: '9 mph', +# day_identifier: 'Today', +# day_name: 'Mon', +# temp_max: '61 °F', +# temp_min: '50 °F', +# sunlight: '0 h', +# rain: '0-2mm' +# }, +# [...] +# ] exports.currentData = ( idCity ) -> params = @@ -76,14 +77,14 @@ exports.currentData = ( idCity ) -> connectorGuids: [ "06394265-b4e1-4b48-be82-a9f2acb9040f" ] queryService params, ( data ) -> pushEvent data - # [ - # { - # current_time_wind_desc: '01:00 | Overcast', - # current_temp: '53°F', - # coordinates: '47.56°N 7.59°E 260m asl', - # city: 'Basel-Stadt' - # } - # ] +# [ +# { +# current_time_wind_desc: '01:00 | Overcast', +# current_temp: '53°F', +# coordinates: '47.56°N 7.59°E 260m asl', +# city: 'Basel-Stadt' +# } +# ] # Helper function to detect and convert temperatures diff --git a/examples/event-pollers/probinder.coffee b/examples/event-pollers/probinder.coffee index 0ffd6f4..65f14b7 100644 --- a/examples/event-pollers/probinder.coffee +++ b/examples/event-pollers/probinder.coffee @@ -4,6 +4,7 @@ ProBinder EVENT POLLER Global variables This module requires user-specific parameters: + - username - password ### @@ -29,11 +30,11 @@ standardCallback = ( funcName ) -> ### Call the ProBinder service with the given parameters. -@param {Object} args the required function arguments object -@param {Object} [args.data] the data to be posted -@param {String} args.service the required service identifier to be appended to the url -@param {String} args.method the required method identifier to be appended to the url -@param {function} [args.callback] the function to receive the request answer + - {Object} args the required function arguments object + - {Object} [args.data] the data to be posted + - {String} args.service the required service identifier to be appended to the url + - {String} args.method the required method identifier to be appended to the url + - {function} [args.callback] the function to receive the request answer ### callService = ( args ) -> if not args.service or not args.method @@ -89,30 +90,30 @@ getContent = ( args ) -> service: args.contentServiceId callback: args.callback -# Returns an event of the form: -# -# { -# "text": "test subject", -# "id": 127815, -# "createDate": "2014-04-19 16:27:45", -# "lastModified": "2014-04-19 16:27:45", -# "time": "5 days ago", -# "userId": 10595, -# "username": "Dominic Bosch", -# "uri": "https://probinder.com/content/view/id/127815/", -# "localUri": "https://probinder.com/content/view/id/127815/", -# "title": "", -# "serviceId": 27, -# "userIds": [ -# 10595 -# ], -# "description": "", -# "context": [ -# { -# "id": 18749, -# "name": "WebAPI ECA Test Binder", -# "remove": true, -# "uri": "/content/context/id/18749/webapi-eca-test-binder" -# } -# ] -# } \ No newline at end of file +# Returns an event of the form: + +# { +# "text": "test subject", +# "id": 127815, +# "createDate": "2014-04-19 16:27:45", +# "lastModified": "2014-04-19 16:27:45", +# "time": "5 days ago", +# "userId": 10595, +# "username": "Dominic Bosch", +# "uri": "https://probinder.com/content/view/id/127815/", +# "localUri": "https://probinder.com/content/view/id/127815/", +# "title": "", +# "serviceId": 27, +# "userIds": [ +# 10595 +# ], +# "description": "", +# "context": [ +# { +# "id": 18749, +# "name": "WebAPI ECA Test Binder", +# "remove": true, +# "uri": "/content/context/id/18749/webapi-eca-test-binder" +# } +# ] +# } \ No newline at end of file diff --git a/gen_doc.sh b/gen_doc.sh index b38575a..099a488 100755 --- a/gen_doc.sh +++ b/gen_doc.sh @@ -9,6 +9,7 @@ require( 'groc' ).CLI( "README.md", "LICENSE.md", "coffee/*.coffee", + "examples/*/**", "-o./webpages/public/doc" ], function( err ) {