Interface ContentDiscovery.Listener<T extends ContentDiscoveryData>

  • Enclosing class:
    ContentDiscovery

    public static interface ContentDiscovery.Listener<T extends ContentDiscoveryData>
    This interface is used by client to receive a response from the request. This will return data in the form of a list in onDataReceived(List, RequestBase) method.
    Example:
     RequestCategory requestCategory = cd.getCategoriesRequest("");
     requestCategory.executeAsync(new ContentDiscovery.Listener<List<Category>>() {
          @Override
          public void onError(CDError error) {
    
          }
    
          @Override
          public void onDataReceived(List<Category> categoryData) {
              Log.i(TAG, "category got: " + categoryData.size());
              for (int i = 0; i <categoryData.size(); i++) {
                  Category category = categoryData.get(i);
              }
          }
    
      }
    
    });