Skip to content

Commit

Permalink
Issue #1116 - deprecated fields from Event removed
Browse files Browse the repository at this point in the history
  • Loading branch information
nbartels committed Mar 2, 2021
1 parent 6d68252 commit 8013d66
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 110 deletions.
55 changes: 0 additions & 55 deletions src/main/lombok/com/restfb/types/Event.java
Expand Up @@ -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 <code>place</code> 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
*
Expand All @@ -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<Location> 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.
*
Expand All @@ -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'.
*
Expand Down
17 changes: 0 additions & 17 deletions src/test/java/com/restfb/types/EventTest.java
Expand Up @@ -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);
Expand All @@ -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
Expand All @@ -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());
Expand Down
37 changes: 0 additions & 37 deletions src/test/resources/json/v2_3/event-with-venuelist.json

This file was deleted.

2 changes: 1 addition & 1 deletion src/test/resources/pre-1.7-api.properties
Expand Up @@ -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
Expand Down

0 comments on commit 8013d66

Please sign in to comment.