Package tokbox.com.opentok.util

Examples of tokbox.com.opentok.util.TokBoxXML


    return create_session(location, new HashMap<String, String>());
  }

    public OpenTokSession create_session(final String location, final Map<String, String> params) throws OpenTokException {
    params.put("location", location);
    final TokBoxXML xmlResponse = this.do_request("/session/create", params);
    if(xmlResponse.hasElement("error", "Errors")) {
      throw new OpenTokException("Unable to create session");
    }
    final String session_id = xmlResponse.getElementValue("session_id", "Session");
    return new OpenTokSession(session_id);
  }
View Full Code Here


  protected TokBoxXML do_request(final String url, final Map<String, String> params) throws OpenTokException {
    final TokBoxNetConnection n = new TokBoxNetConnection();
    final Map<String, String> headers = new HashMap<String, String>();
    headers.put("X-TB-PARTNER-AUTH", this.api_key + ":" + this.api_secret);

    return new TokBoxXML(n.request(API_Config.API_URL + url, params, headers));
  }
View Full Code Here

TOP

Related Classes of tokbox.com.opentok.util.TokBoxXML

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.