Source: tokens.js

  1. /**
  2. * Analytics API.
  3. *
  4. * @copyright 2016-2024 Basis Technology Corporation.
  5. *
  6. * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance
  7. * with the License. You may obtain a copy of the License at
  8. * @license http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software distributed under the License is
  11. * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. * See the License for the specific language governing permissions and limitations under the License.
  13. **/
  14. "use strict";
  15. var URL = require("url");
  16. var rosetteConstants = require("./rosetteConstants");
  17. var RosetteException = require("./rosetteExceptions");
  18. var rosetteRequest = require("./rosetteRequest");
  19. /**
  20. * @class
  21. *
  22. * @copyright 2016-2024 Basis Technology Corporation.
  23. * @license http://www.apache.org/licenses/LICENSE-2.0
  24. */
  25. function tokens() {
  26. //constructor function
  27. }
  28. /**
  29. * Makes an HTTP request to the specified Analytics API endpoint and returns the result
  30. * @param {string} parameters - The Analytics API endpoint parameters
  31. * @param {string} userKey - The Analytics API user access key
  32. * @param {string} serviceURL - The base service URL to be used to access the Analytics API
  33. * @param {function} callback - Callback function to be executed after the function to which it is passed is complete
  34. */
  35. tokens.prototype.getResults = function(parameters, userKey, protocol, serviceURL, callback) {
  36. var req = new rosetteRequest();
  37. req.makeDocumentRequest("tokens", parameters, userKey, protocol, serviceURL, callback);
  38. };
  39. module.exports = tokens;