* Use Force.com API to retrieve data (authentication with OAuth). Returns JsonObject.
* @param query - SOQL query string
* @return JsonObject with results
*/
public static JsonObject query(String query, boolean retry) {
OAuthSession oauth = ForceDotComOAuth2.getOAuthSession();
if (oauth == null) {
Application.index();
}
WSRequest req = WS.url(oauth.instance_url
+ "/services/data/v28.0/query/?q=%s", query);