Archived
Update after structure changes in JSON-feed
This commit is contained in:
1 parent
160ec5cb2e
commit
3187b23097
2 files changed
+10
-4
No files matched your search
+2
-2
@@ -1,8 +1,8 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
package="com.studentersamfundet.app"
|
package="com.studentersamfundet.app"
|
||||||
android:versionCode="3"
|
android:versionCode="4"
|
||||||
android:versionName="beta1.1">
|
android:versionName="beta1.2">
|
||||||
<uses-sdk
|
<uses-sdk
|
||||||
android:minSdkVersion="8"
|
android:minSdkVersion="8"
|
||||||
android:targetSdkVersion="17"/>
|
android:targetSdkVersion="17"/>
|
||||||
|
|||||||
@@ -58,7 +58,13 @@ public class JSONParserProgram implements IParser {
|
|||||||
description = tempJSON.getString("excerpt");
|
description = tempJSON.getString("excerpt");
|
||||||
date = tempJSON.getString("date");
|
date = tempJSON.getString("date");
|
||||||
text = tempJSON.getString("content");
|
text = tempJSON.getString("content");
|
||||||
category = tempJSON.getString("event");
|
|
||||||
|
/* FIXME is category used? */
|
||||||
|
JSONArray categories = tempJSON.getJSONArray("event_type_parents");
|
||||||
|
category = categories.getString(0);
|
||||||
|
for (int j=1; j > categories.length(); j++) {
|
||||||
|
category += " "+categories.getString(j);
|
||||||
|
}
|
||||||
|
|
||||||
JSONObject custom = tempJSON.getJSONObject("custom_fields");
|
JSONObject custom = tempJSON.getJSONObject("custom_fields");
|
||||||
ticketUrl = custom.getJSONArray("_neuf_events_bs_url").getString(0);
|
ticketUrl = custom.getJSONArray("_neuf_events_bs_url").getString(0);
|
||||||
@@ -74,7 +80,7 @@ public class JSONParserProgram implements IParser {
|
|||||||
thumb = tempJSON.getString("thumbnail");
|
thumb = tempJSON.getString("thumbnail");
|
||||||
} else {
|
} else {
|
||||||
JSONObject images = attachments.getJSONObject(0).getJSONObject("images");
|
JSONObject images = attachments.getJSONObject(0).getJSONObject("images");
|
||||||
image = images.getJSONObject("full").getString("url");
|
image = images.getJSONObject("large").getString("url");
|
||||||
thumb = images.getJSONObject("thumbnail").getString("url");
|
thumb = images.getJSONObject("thumbnail").getString("url");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user