Lungo.Boot.Stats.js 974 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. /**
  2. * Save in LungoJS.com the use of the service for further ranking
  3. *
  4. * @namespace LUNGO.Boot
  5. * @class Stats
  6. *
  7. * @author Javier Jimenez Villar <javi@tapquo.com> || @soyjavi
  8. * @author Guillermo Pascual <pasku@tapquo.com> || @pasku1
  9. */
  10. LUNGO.Boot.Stats = (function(lng, undefined) {
  11. /**
  12. * Analizing if it's run in Mobile Phone and changing the type of event to subscribe.
  13. *
  14. * @method start
  15. */
  16. var start = function() {
  17. if (lng.Core.isMobile()) {
  18. _saveStats();
  19. }
  20. };
  21. /**
  22. * Save in LungoJS.com the use of the service for further ranking
  23. *
  24. * @method _saveStatsInLungoJS
  25. */
  26. var _saveStats = function() {
  27. lng.Service.post( 'http://www.lungojs.com/stats/', {
  28. name: lng.App.get('name'),
  29. version: lng.App.get('version'),
  30. icon: lng.App.get('icon')
  31. }, function(response) {});
  32. };
  33. return {
  34. start: start
  35. };
  36. })(LUNGO);