import com.sendgrid.Method;
import com.sendgrid.Request;
import com.sendgrid.Response;
import com.sendgrid.SendGrid;

import java.io.IOException;

/*Retrieve all recent access attempts
GET /access_settings/activity
*/

public class GetAccessSettingsActivity extends Example {

  private void run() throws IOException {
    try {
      String endPoint = "access_settings/whitelist";
      String body = "{\"ids\":[1,2,3]}";
      Request request = createRequest(Method.DELETE, endPoint, body);
      request.addQueryParam("limit", "1");
      Response response = execute(request);
      printResponseInfo(response);
    } catch (IOException ex) {
      throw ex;
    }
  }

  public static void main(String[] args) throws IOException {
    GetAccessSettingsActivity getAccessSettingsActivity = new GetAccessSettingsActivity();
    getAccessSettingsActivity.run();
  }
}


