Skip to content

Instantly share code, notes, and snippets.

@ojacobson
Forked from azuby/Job.java
Created November 27, 2012 02:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ojacobson/4152051 to your computer and use it in GitHub Desktop.
Save ojacobson/4152051 to your computer and use it in GitHub Desktop.
public class Model {
JSONClient clientFactory;
private final String resource;
protected Model(String resource, Activity activity) {
this.resource = resource;
clientFactory = new JSONClient(activity);
}
public JSONObject createResource(String resource) {
return syncFactory.requestPost(resource, this);
}
}
Job job = new Job(activity);
job.create();
public class Job extends Model {
private static final String ROUTE = "jobs";
public Job(Activity activity) {
super(ROUTE, activity);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment