html5 joinapi
This commit is contained in:
parent
c0b60e211b
commit
a45ce41d2f
@ -1,4 +1,4 @@
|
||||
parser = require 'parser'
|
||||
xml2js = require 'xml2js'
|
||||
|
||||
bbbapi = require './bbbapi'
|
||||
testapi = require './testapi'
|
||||
@ -20,7 +20,29 @@ login = (req, resp) ->
|
||||
bbbapi.create(createParams, serverAndSecret, {}, (error, response, body) ->
|
||||
#console.log JSON.stringify(response)
|
||||
bbbapi.join(joinParams, serverAndSecret, {}, (error, response, body) ->
|
||||
#console.log JSON.stringify(response)
|
||||
xml = '' + response.body
|
||||
console.log "\n\nxml=" + xml
|
||||
|
||||
{parseString} = require 'xml2js'
|
||||
parseString xml, (err, result) ->
|
||||
meeting_id = result.response.meeting_id
|
||||
user_id = result.response.user_id
|
||||
auth_token = result.response.auth_token
|
||||
console.log "\nmeeting_id = " + meeting_id +
|
||||
"\nuser_id = " + user_id +
|
||||
"\nauth_token = " + auth_token
|
||||
|
||||
|
||||
joinParams.userID = user_id
|
||||
joinParams.meeting_id = meeting_id
|
||||
joinParams.auth_token = auth_token
|
||||
bbbapi.join(joinParams, serverAndSecret, {}, (error, response, body) ->
|
||||
if error
|
||||
console.log "error =" + error
|
||||
else
|
||||
console.log "wooo-hoooo"
|
||||
)
|
||||
|
||||
)
|
||||
)
|
||||
|
||||
|
@ -9,7 +9,7 @@
|
||||
"express": "4.1.2",
|
||||
"hapi": "4.1.0",
|
||||
"js-sha1": "0.1.1",
|
||||
"parser": "0.1.4",
|
||||
"xml2js": "0.4.2",
|
||||
"request": "2.34.0"
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user