Created
April 28, 2015 01:39
-
-
Save silmood/246da6df9c2d10dae2d5 to your computer and use it in GitHub Desktop.
AsyncTaskDevfExample
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class Constants { | |
| //URL | |
| public static final String SEARCH_URL = "http://api.eventful.com/json/events/search?app_key=4Q7hC5bJXwHMZ99t&category=art&date=This%Week"; | |
| //JSON keys | |
| public static final String EVENTS_KEY = "events"; | |
| public static final String EVENT_KEY = "event"; | |
| public static final String DATE_KEY = "start_time"; | |
| public static final String DESCRIPTION_KEY = "description"; | |
| public static final String TITLE_KEY = "title"; | |
| public static final String COUNTRY_KEY = "country_name"; | |
| public static final String REGION_KEY = "region_name"; | |
| public static final String CITY_KEY = "city_name"; | |
| public static final String ADDRESS_KEY = "venue_address"; | |
| public static final String VENUE_KEY = "venue_name"; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class Event { | |
| String title; | |
| String description; | |
| String date; | |
| Venue venue; | |
| public Event(String title, String description, String date, Venue venue) { | |
| this.title = title; | |
| this.description = description; | |
| this.date = date; | |
| this.venue = venue; | |
| } | |
| public String getTitle() { | |
| return title; | |
| } | |
| public void setTitle(String title) { | |
| this.title = title; | |
| } | |
| public String getDescription() { | |
| return description; | |
| } | |
| public void setDescription(String description) { | |
| this.description = description; | |
| } | |
| public String getDate() { | |
| return date; | |
| } | |
| public void setDate(String date) { | |
| this.date = date; | |
| } | |
| public Venue getVenue() { | |
| return venue; | |
| } | |
| public void setVenue(Venue venue) { | |
| this.venue = venue; | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class Venue { | |
| String name; | |
| String country; | |
| String region; | |
| String city; | |
| String address; | |
| public Venue(String name, String country, String region, String city, String address) { | |
| this.name = name; | |
| this.country = country; | |
| this.region = region; | |
| this.city = city; | |
| this.address = address; | |
| } | |
| public String getName() { | |
| return name; | |
| } | |
| public void setName(String name) { | |
| this.name = name; | |
| } | |
| public String getCountry() { | |
| return country; | |
| } | |
| public void setCountry(String country) { | |
| this.country = country; | |
| } | |
| public String getRegion() { | |
| return region; | |
| } | |
| public void setRegion(String region) { | |
| this.region = region; | |
| } | |
| public String getCity() { | |
| return city; | |
| } | |
| public void setCity(String city) { | |
| this.city = city; | |
| } | |
| public String getAddress() { | |
| return address; | |
| } | |
| public void setAddress(String address) { | |
| this.address = address; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment