title: How to return object from retrofit api get call
body: <p>I am trying to get list of objects from api call with retrofit but i just cant find the way to do so :(
  This is the function i built:</p>
  
  <pre><code> private List&lt;Business&gt; businesses getBusinesses()
  {
  
      List&lt;Business&gt; businessesList = new ArrayList&lt;&gt;();
      Call&lt;List&lt;Business&gt;&gt; call = jsonPlaceHolderApi.getBusinesses();
      call.enqueue(new Callback&lt;List&lt;Business&gt;&gt;() {
          @Override
          public void onResponse(Call&lt;List&lt;Business&gt;&gt; call, Response&lt;List&lt;Business&gt;&gt; response) {
              if(!response.isSuccessful())
              {
                  textViewResult.setText("Code: " + response.code());
                  return;
              }
              List&lt;Business&gt; businesses = response.body();
  
              for(Business business : businesses)
              {
                  String content = "";
                  content += "ID: " + business.getId() + "\n";
                  content += "Name: " + business.getName() + "\n";
                  content += "On promotion: " + business.isOnPromotion() + "\n\n";
  
                  textViewResult.append(content);
              }
              businessesList = businesses;
          }
  
          @Override
          public void onFailure(Call&lt;List&lt;Business&gt;&gt; call, Throwable t) {
              call.cancel();
              textViewResult.setText(t.getMessage());
          }
      });
  }
  </code></pre>
  
  <p>I am trying to get the businesses response and return it.
  can anyone help me?
  Feeling frustrated :(</p>