package com.growthbeat.analytics;

import com.growthbeat.Context;

public class GrowthAnalytics {

	private static final String BASE_URL = "https://api.analytics.growthbeat.com";
	private Context context = new Context();

	public GrowthAnalytics() {
		super();
		context.getGrowthbeatHttpClient().setBaseUrl(BASE_URL);
	}

	public GrowthAnalytics(String credentialId) {
		this();
		context.setCredentialId(credentialId);
	}

	public Context getContext() {
		return context;
	}

	public void setContext(Context context) {
		this.context = context;
	}

}

@@ -39,29 +39,98 @@
 ort 
-com.growthbeat.Contex
+java.util.List;%0A%0Aimport com.growthbeat.Context;%0Aimport com.growthbeat.analytics.model.Even
 t;%0A%0A
@@ -174,15 +174,8 @@
 ate 
-static 
 fina
@@ -606,10 +606,594 @@
 xt;%0A%09%7D%0A%0A
+%09public Event findById(String id) %7B%0A%09%09return Event.findById(id, context);%0A%09%7D%0A%0A%09public List%3CEvent%3E findByApplicationId(String applicationId) %7B%0A%09%09return Event.findByApplicationId(applicationId, context);%0A%09%7D%0A%0A%09public Event create(String parentEventId, String applicationId, String name, String description) %7B%0A%09%09return Event.create(parentEventId, applicationId, name, description, context);%0A%09%7D%0A%0A%09public Event update(String eventId, String description) %7B%0A%09%09return Event.update(eventId, description, context);%0A%09%7D%0A%0A%09public void delete(String eventId) %7B%0A%09%09Event.delete(eventId, context);%0A%09%7D%0A%0A
 %7D%0A

Add Event function .