package Classes.api; import org.json.JSONArray; import org.json.JSONObject; import Classes.Event; import Interfaces.Callback; import model.NewsListModel; public class fetchSources implements Callback{ private NewsListModel context; private String nextQuery; public fetchSources(NewsListModel context){ this.context = context; this.nextQuery = nextQuery; } @Override public void onSuccess(JSONObject response){ //on récupère toutes les sources (dans la limite de 20 sources) JSONArray arr = response.getJSONArray("sources"); for(int i = 0;i