Skip to content
This repository has been archived by the owner on Feb 7, 2020. It is now read-only.

Commit

Permalink
Update to match iOS Sample and nodes Web-API
Browse files Browse the repository at this point in the history
  • Loading branch information
brandwe committed Jul 25, 2015
1 parent 459573c commit 274c654
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
Expand Up @@ -37,17 +37,17 @@ public class Constants {

// -------------------------------AAD
// PARAMETERS----------------------------------
public static String AUTHORITY_URL = "https://login.windows.net/common";
public static String CLIENT_ID = "e3786e2a-0dcb-449a-8eba-b4042c9bec01";
public static String RESOURCE_ID = "https://aadadfs.onmicrosoft.com/TodoListService";
public static String REDIRECT_URL = "https://aadadfstodolistservice.azurewebsites.net";
public static String AUTHORITY_URL = "https://login.microsoftonline.com/common";
public static String CLIENT_ID = "e6d65cc4-f9e8-444a-9ba6-c3c82ce8086b";
public static String RESOURCE_ID = "http://kidventus.com/TodoListService";
public static String REDIRECT_URL = "mstodo://com.microsoft.windowsazure.activedirectory.samples.microsofttasks";
public static String CORRELATION_ID = "";
public static String USER_HINT = "";
public static String EXTRA_QP = "";
public static boolean FULL_SCREEN = true;
public static AuthenticationResult CURRENT_RESULT = null;
// Endpoint we are targeting for the deployed WebAPI service
public static String SERVICE_URL = "https://aadadfstodolistservice.azurewebsites.net/api/todolist";
public static String SERVICE_URL = "http://10.0.1.44:8080/tasks";

// ------------------------------------------------------------------------------------------

Expand Down
Expand Up @@ -38,7 +38,7 @@ protected List<String> doInBackground(String... params) {
JSONObject obj = null;
for (int i = 0; i < jsonArray.length(); i++) {
obj = jsonArray.getJSONObject(i);
items.add(obj.getString("Title"));
items.add(obj.getString("task"));
}
return items;
} catch (Exception e) {
Expand Down Expand Up @@ -66,7 +66,7 @@ protected Void doInBackground(String... params) {
conn.setRequestMethod("GET");
conn.setRequestProperty("Content-Type", "application/json");
conn.setRequestProperty("Authorization", "Bearer " + params[1]);
String urlParameters = "{ \"Title\": \"" + params[0] + "\" }";
String urlParameters = "{ \"task\": \"" + params[0] + "\" }";

// Send post request
conn.setDoOutput(true);
Expand Down
Expand Up @@ -28,8 +28,8 @@ public class WorkItem {
/**
* Item title
*/
@com.google.gson.annotations.SerializedName("Title")
private String mTitle;
@com.google.gson.annotations.SerializedName("Task")
private String mTask;

/**
* Item Id
Expand Down Expand Up @@ -72,7 +72,7 @@ public String toString() {
* Returns the item text
*/
public String getTitle() {
return mTitle;
return mTask;
}

/**
Expand All @@ -82,7 +82,7 @@ public String getTitle() {
* text to set
*/
public final void setTitle(String text) {
mTitle = text;
mTask = text;
}

/**
Expand Down

0 comments on commit 274c654

Please sign in to comment.