/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package testmeetup;

/**
 * Query Object that retrieves Event Information. For more information about the parameters, please read: https://www.meetup.com/meetup_api/docs/2/open_events/
 * @author Oriol
 */
public class QueryEvent extends QueryObject{
    
    private String eventID;
    private String time;
    
    // LOCATION
    private String country;
    private String state;
    private String city;
    private String category;
    private String radius;
    private String status;

    public QueryEvent(String nResults, Ordering order, String offset, String country, String state, String city, String category,String time, String radius,String status) {
        super(nResults, order, offset);
        this.country = country;
        this.state = state;
        this.city = city;
        this.category = category;
        this.time = time;
        this.radius = radius;
        this.status = status;
    }
    
    /**
     * Creates URL in variable URL with current existing parameters.
     * @throws Exception 
     */
    @Override
     public void generateQuery() throws Exception{
         super.setURL("https://api.meetup.com/2/open_events?");
         addParam("page",super.getnResults());
         addParam("offset",super.getOffset());
         addParam("country",country);
         addParam("state",state);
         addParam("city",city);
         addParam("category",category);
         addParam("time",time);
         addParam("radius",radius);
         addParam("status",status);
         super.generateQuery();
     }

    public String getTime() {
        return time;
    }

    public void setTime(String time) {
        this.time = time;
    }
    
}
