diff --git a/src/main/lombok/com/restfb/types/Event.java b/src/main/lombok/com/restfb/types/Event.java index a03a618a2..62c80b962 100644 --- a/src/main/lombok/com/restfb/types/Event.java +++ b/src/main/lombok/com/restfb/types/Event.java @@ -122,20 +122,6 @@ public class Event extends NamedFacebookType implements HasProfilePicture, HasCo @Setter private Date endTime; - /** - * The location for this event, a string name. - * - * @deprecated with API version 2.3, use place field instead - * - * @return The location for this event, a string name. - */ - @Getter(onMethod_ = @GraphAPI(until = "2.2")) - @Setter - @Facebook - @GraphAPI(until = "2.2") - @Deprecated - private String location; - /** * Whether or not the event has been marked as canceled * @@ -156,34 +142,6 @@ public class Event extends NamedFacebookType implements HasProfilePicture, HasCo @Facebook("rsvp_status") private String rsvpStatus; - /** - * A list of locations of this event. - * - * This may happen in some strange case - see issue #XXX on GitHub - * - * @deprecated with API version 2.3, use {@link Event#getPlace()} instead - * @return A list of locations of the event. - */ - @Getter(onMethod_ = @GraphAPI(until = "2.2")) - @Setter - @Facebook("venue") - @Deprecated - @GraphAPI(until = "2.2") - private List venueList; - - /** - * The location of this event, a structured address object. - * - * @deprecated with API version 2.3, use {@link Event#getPlace()} field instead - * @return The location of this event, a structured address object. - */ - @Getter(onMethod_ = @GraphAPI(until = "2.2")) - @Setter - @Facebook - @GraphAPI(until = "2.2") - @Deprecated - private Location venue; - /** * Number of people interested in the event. * @@ -205,19 +163,6 @@ public class Event extends NamedFacebookType implements HasProfilePicture, HasCo @Facebook("is_page_owned") private Boolean isPageOwned; - /** - * Whether the viewer is admin or not. - * - * @deprecated since January 30, 2018 - * - * @return Whether the viewer is admin or not - */ - @Getter - @Setter - @Deprecated - @Facebook("is_viewer_admin") - private Boolean isViewerAdmin; - /** * The visibility of this event. Can be 'OPEN', 'CLOSED', or 'SECRET'. * diff --git a/src/test/java/com/restfb/types/EventTest.java b/src/test/java/com/restfb/types/EventTest.java index bc613ccbb..fcdb7a06d 100644 --- a/src/test/java/com/restfb/types/EventTest.java +++ b/src/test/java/com/restfb/types/EventTest.java @@ -63,14 +63,6 @@ void issue312_eventPictureAndCover() { event.getCover().getSource()); } - @Test - void exampleEventWithVenueList() { - Event event = createJsonMapper().toJavaObject(jsonFromClasspath("v2_3/event-with-venuelist"), Event.class); - assertNotNull(event); - assertNotNull(event.getVenueList()); - assertEquals(2, event.getVenueList().size()); - } - @Test void exampleEventWithLocation() { Event event = createJsonMapper().toJavaObject(jsonFromClasspath("v2_5/event"), Event.class); @@ -96,15 +88,7 @@ void checkV2_0() { assertEquals("Africa/Johannesburg", event.getTimezone()); assertEquals("300473363410132", event.getId()); assertEquals("OPEN", event.getPrivacy()); - assertNotNull(event.getLocation()); - assertEquals("Lourensford Estate", event.getLocation()); assertNotNull(event.getOwner()); - assertNotNull(event.getVenue()); - assertEquals("181719998521108", event.getVenue().getId()); - assertEquals(-34.071977375471, event.getVenue().getLatitude(), 0.1); - assertEquals(18.888539577026, event.getVenue().getLongitude(), 0.1); - assertEquals("Somerset West", event.getVenue().getCity()); - } @Test @@ -130,7 +114,6 @@ void checkV2_5_issue380() { Event event = createJsonMapper().toJavaObject(jsonFromClasspath("v2_5/event-fields"), Event.class); assertNotNull(event); assertTrue(event.getIsPageOwned()); - assertTrue(event.getIsViewerAdmin()); assertEquals(0L, event.getDeclinedCount().longValue()); assertTrue(event.getCanGuestsInvite()); assertEquals(1455840000000L, event.getStartTime().getTime()); diff --git a/src/test/resources/json/v2_3/event-with-venuelist.json b/src/test/resources/json/v2_3/event-with-venuelist.json deleted file mode 100644 index 770f86b58..000000000 --- a/src/test/resources/json/v2_3/event-with-venuelist.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "description": "25-26 July at Lourensford Wine Estate - The quality chocolate event this winter!", - "is_date_only": true, - "location": "Lourensford Estate", - "name": "Winelands Chocolate Festival", - "owner": { - "name": "Winelands Chocolate Festival", - "category": "Food/Beverages", - "id": "758920484157302" - }, - "privacy": "OPEN", - "start_time": "2015-07-25", - "timezone": "Africa/Johannesburg", - "updated_time": "2015-05-19T21:47:57+0000", - "venue": [ - { - "city": "San Francisco", - "country": "United States", - "latitude": 37.78291776, - "longitude": -122.422128368, - "street": "", - "zip": "94102", - "state": "CA", - "id": "248711105146015" - }, - { - "city": "Somerset West", - "country": "South Africa", - "latitude": -34.071977375471, - "longitude": 18.888539577026, - "street": "Lourensford Avenue", - "zip": "7129", - "id": "181719998521108" - } - ], - "id": "300473363410132" -} \ No newline at end of file diff --git a/src/test/resources/pre-1.7-api.properties b/src/test/resources/pre-1.7-api.properties index 5d95d92bd..0af148769 100644 --- a/src/test/resources/pre-1.7-api.properties +++ b/src/test/resources/pre-1.7-api.properties @@ -29,7 +29,7 @@ Album.methods=getLocation,getDescription,getLink,getFrom,getCanUpload,getPrivacy Category.methods= User.Sport.methods=getWith Application.methods=getDescription,getLink -Event.methods=getEndTime,getOwner,getLocation,getStartTime,getDescription,getRsvpStatus,getPicture,getTicketUri,getVenue,getIsDateOnly,getPrivacy,getUpdatedTime +Event.methods=getEndTime,getOwner,getStartTime,getDescription,getRsvpStatus,getPicture,getTicketUri,getIsDateOnly,getPrivacy,getUpdatedTime Checkin.methods=getMessage,getApplication,getComments,getFrom,getCreatedTime,getPlace,getTags AppRequest.Application.methods=getCanvasName,getNamespace Location.methods=getZip,getStreet,getState,getLongitude,equals,getLatitude,getCountry,hashCode,toString,getCity