Commits

Tino de Bruijn  committed 57ec992 Draft

Update all pachube -> cosm

  • Participants
  • Parent commits 5d1879c

Comments (0)

Files changed (2)

         <ul data-role="listview" data-theme="d" id="feed-list"></ul>
       </div>
       <footer data-role="footer" data-position="fixed">
-        <center>Powered by Pachube</center>
+        <center>Powered by Cosm</center>
       </footer>
     </div>
     
       </header>
       <div data-role="content">
         <div data-role="fieldcontain">
-            <label for="name">Pachube API key:</label>
+            <label for="name">Cosm API key:</label>
             <input type="text" name="api_key" id="api_key" value="" />
         </div>
         <div data-role="fieldcontain">
           <h1>${datastream}</h1>
         </header>
         <div data-role="content">
-          <img src="http://api.pachube.com/v2/feeds/${feed_id}/datastreams/${datastream}.png?g=1&w=300&h=380&duration=1day">
+          <img src="http://api.cosm.com/v2/feeds/${feed_id}/datastreams/${datastream}.png?g=1&w=300&h=380&duration=1day">
         </div>
       </div>
     </script>

File js/script.js

     var api_key = $.storage.get('api_key');
     $.mobile.showPageLoadingMsg();
     $.ajax({
-        url: 'http://api.pachube.com/v2/feeds/'+feed_id+'.json', 
+        url: 'http://api.cosm.com/v2/feeds/'+feed_id+'.json', 
         data: {'api_key': api_key},
         cache: false,
         dataType: 'json',
 
         $.mobile.showPageLoadingMsg();
         $.ajax({
-            url: 'http://api.pachube.com/v2/feeds.json', 
+            url: 'http://api.cosm.com/v2/feeds.json', 
             data: {'key': api_key, 'user': user_id},
             cache: false,
             dataType: 'json',
             parts = elem.attr('id').split('-');
             data['datastreams'].push({'id': parts[3], 'current_value': elem.attr('value')});
         });
-        data['version'] = '1.0.0'; // pachube api needs this?
+        data['version'] = '1.0.0'; // cosm api needs this?
         $.mobile.showPageLoadingMsg();
         $.ajax({
-            url:  'http://api.pachube.com/v2/feeds/'+form.attr('feed-id'),
+            url:  'http://api.cosm.com/v2/feeds/'+form.attr('feed-id'),
             data: JSON.stringify(data),
             type: 'PUT',
-            headers: {'X-PachubeApiKey': $.storage.get('api_key')},
+            headers: {'X-ApiKey': $.storage.get('api_key')},
             statusCode: {
                 200: function (data) {
                         alert('Data saved');