package com.example.aymen.webservices;

import org.json.JSONArray;


public class UserFunctions {

    private JsonParser jsonParser;

    // constructor
    public UserFunctions(){
        jsonParser = new JsonParser();
    }




    public JSONArray getArticles(String display_id, String theme_tid){
        JSONArray json = jsonParser.getJSONArrayFromUrl("http://www.entreprises-magazine.com/rest/views/articles_ws?display_id="+display_id+"&theme_tid="+theme_tid);
        return json;
    }


    public JSONArray getArticle(String display_id, String nid){

        JSONArray json = jsonParser.getJSONArrayFromUrl("http://www.entreprises-magazine.com/rest/views/articles_ws?display_id="+display_id+"&nid="+nid);
        return json;
    }


}

