2 Replies Latest reply on May 7, 2015 4:28 AM by nehamathur

    Calling Jive REST API from custom tile

    nehamathur

      Hi Team,

       

      I have a simple custom view tile (tile-app-simple).

       

      The file layout is as follows-

      my-tile>>backened>>routes>>configure

      my-tile>>definition.json

      my-tile>>public>>stylesheets>>main.css

      my-tile>>public>>view.html

       

      I want to make a REST api call to get a place content.

       

      Is this requirement supported by the above selected tile style? If yes, please let me know the steps.

       

      Thanks

       

        • Re: Calling Jive REST API from custom tile
          nehamathur

          Hi Jivers,

           

          I wan to display the blog content in the tile. I trying step by step to see which step is failing. I get the first alert on tile load -   alert("getting ready to load blogs");. But looks like the soap request is not getting executing. Any thoughts why?

           

          I have the following code-

           

          jive.tile.onOpen(function(configData, options) {

           

          $("#config_string").text("first news and highlights");

           

             alert("getting ready to load blogs");

             var blog_uri="http://localhost:8080/api/core/v3/places/1023?type=blog&tags=news-highlights";

           

              var request = osapi.jive.corev3.places.Blog.get({

                  "fields":"@all",

                  "uri": blog_uri

              });

                

              alert(request);

              request.execute(function(response){

                  alert("made a request call");

                  if(repsonse.error){

                      alert("error fetching blogs");

                  }

                  else{

                      alert(response);

                  }

              });

           

           

          Thanks

          Neha