Skip to content

Instantly share code, notes, and snippets.

@maxandersen
Forked from tivrfoa/AlbumImages.java
Created May 6, 2021 21:57
Show Gist options
  • Select an option

  • Save maxandersen/c3cad44ca6620de7e5a3abb8a98879a9 to your computer and use it in GitHub Desktop.

Select an option

Save maxandersen/c3cad44ca6620de7e5a3abb8a98879a9 to your computer and use it in GitHub Desktop.

Revisions

  1. @tivrfoa tivrfoa revised this gist Nov 11, 2020. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion GsonHelper.java
    Original file line number Diff line number Diff line change
    @@ -6,7 +6,7 @@
    class GsonHelper {
    static Gson gson = new Gson();
    public static Albums getAlbums(String json) {
    System.out.println("Getting Album ...: " + json);
    System.out.println("Getting Album: " + json);
    return gson.fromJson(json, Albums.class);
    }
    }
  2. @tivrfoa tivrfoa revised this gist Nov 11, 2020. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion GsonHelper.java
    Original file line number Diff line number Diff line change
    @@ -6,7 +6,7 @@
    class GsonHelper {
    static Gson gson = new Gson();
    public static Albums getAlbums(String json) {
    System.out.println("Getting Album ..." + json);
    System.out.println("Getting Album ...: " + json);
    return gson.fromJson(json, Albums.class);
    }
    }
  3. @tivrfoa tivrfoa revised this gist Nov 11, 2020. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion GsonHelper.java
    Original file line number Diff line number Diff line change
    @@ -6,7 +6,7 @@
    class GsonHelper {
    static Gson gson = new Gson();
    public static Albums getAlbums(String json) {
    System.out.println("Getting Album ...");
    System.out.println("Getting Album ..." + json);
    return gson.fromJson(json, Albums.class);
    }
    }
  4. @tivrfoa tivrfoa revised this gist Nov 9, 2020. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions GsonHelper.java
    Original file line number Diff line number Diff line change
    @@ -6,6 +6,7 @@
    class GsonHelper {
    static Gson gson = new Gson();
    public static Albums getAlbums(String json) {
    System.out.println("Getting Album ...");
    return gson.fromJson(json, Albums.class);
    }
    }
  5. @tivrfoa tivrfoa revised this gist Oct 27, 2020. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion Dataset.java
    Original file line number Diff line number Diff line change
    @@ -6,5 +6,5 @@
    class Dataset {
    public String album_id;
    public String album_title;
    List<<AlbumImages> album_images = new ArrayList<AlbumImages>();
    List<AlbumImages> album_images = new ArrayList<AlbumImages>();
    }
  6. @tivrfoa tivrfoa revised this gist Oct 27, 2020. 1 changed file with 3 additions and 1 deletion.
    4 changes: 3 additions & 1 deletion Albums.java
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,5 @@
    //SOURCES Dataset.java

    import java.util.ArrayList;
    import java.util.List;

    @@ -9,5 +11,5 @@ class Albums {
    public int total_pages;
    public int page;
    public String limit;
    List dataset = new ArrayList();
    List<Dataset> dataset = new ArrayList<>();
    }
  7. @tivrfoa tivrfoa revised this gist Oct 27, 2020. 3 changed files with 9 additions and 1 deletion.
    3 changes: 3 additions & 0 deletions Albums.java
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,6 @@
    import java.util.ArrayList;
    import java.util.List;

    class Albums {
    public String title;
    public String message;
    5 changes: 5 additions & 0 deletions Dataset.java
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,8 @@
    //SOURCES AlbumImages.java

    import java.util.ArrayList;
    import java.util.List;

    class Dataset {
    public String album_id;
    public String album_title;
    2 changes: 1 addition & 1 deletion GsonHelper.java
    Original file line number Diff line number Diff line change
    @@ -1,5 +1,5 @@
    //DEPS com.google.code.gson:gson:2.8.6
    //SOURCES Albums
    //SOURCES Albums.java

    import com.google.gson.Gson;

  8. @tivrfoa tivrfoa revised this gist Oct 26, 2020. 1 changed file with 3 additions and 0 deletions.
    3 changes: 3 additions & 0 deletions GsonHelper.java
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,6 @@
    //DEPS com.google.code.gson:gson:2.8.6
    //SOURCES Albums

    import com.google.gson.Gson;

    class GsonHelper {
  9. @tivrfoa tivrfoa created this gist Oct 26, 2020.
    5 changes: 5 additions & 0 deletions AlbumImages.java
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,5 @@
    class AlbumImages {
    public String image_id;
    public String user_id;
    public String albumId;
    }
    10 changes: 10 additions & 0 deletions Albums.java
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,10 @@
    class Albums {
    public String title;
    public String message;
    public List errors = new ArrayList();
    public String total;
    public int total_pages;
    public int page;
    public String limit;
    List dataset = new ArrayList();
    }
    5 changes: 5 additions & 0 deletions Dataset.java
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,5 @@
    class Dataset {
    public String album_id;
    public String album_title;
    List<<AlbumImages> album_images = new ArrayList<AlbumImages>();
    }
    8 changes: 8 additions & 0 deletions GsonHelper.java
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,8 @@
    import com.google.gson.Gson;

    class GsonHelper {
    static Gson gson = new Gson();
    public static Albums getAlbums(String json) {
    return gson.fromJson(json, Albums.class);
    }
    }