7 Replies Latest reply on Jul 31, 2017 2:04 PM by ryanrutan

    Custom View Tile - Inconsistent osapi call /contents response

      I'm currently struggling with the following osapi call

       

      First of all a user property is being fetched (/people) and based on that one a following action will occur (/contents)

       

       

      In the 'view.html' file I have included this piece of code

       

      function getUser() {
         
         //Get user properties
         osapi.jive.core.get({ 
              'v':'v3', 
              'href':'/people/@me'
         }).execute(function(response) { 
      
         for (var i = 0; i < response.content.list.length; i++){
              ...     
      
      function placeContent() {
       
        //Get content from communication
         osapi.jive.core.get({ 
              'v':'v3', 
              'href':'/contents?filter=place(https://dummy.jiveon.com/api/core/v3/places/1089)&includeBlogs=true'
         }).execute(function(response) { 
      
         console.log(response);    
         console.log('DEBUG');
      
         for (var i = 0; i < response.content.list.length; i++){
              ...    

       

      If the code is being executed correctly I can see the following result for the 'response' of the /contents call in the console

      But more often the execution fails and I get the following result for the 'response' of the /contents call in the console

       

      Executing the same piece of code, giving different results ... I'm wondering if I'm doing something wrong ...

       

      Not sure if this behavior is somehow linked to the following question:

      Re: osapi.jive.core.get - different response structure depending on Tile or OpenSocial (8.0.0.0 vs 8.0.3.0)?