diff --git a/src/Meetup/MeetupEventRepository.php b/src/Meetup/MeetupEventRepository.php index a347867..5a75f51 100644 --- a/src/Meetup/MeetupEventRepository.php +++ b/src/Meetup/MeetupEventRepository.php @@ -23,7 +23,7 @@ final class MeetupEventRepository implements EventRepository $rsvps = json_decode($response->getContent()); return Collection::make($rsvps) - ->filter(fn (\stdClass $rsvp): bool => $rsvp->response == 'yes') + ->filter(fn (\stdClass $rsvp): bool => $rsvp->response == RsvpResponse::RESPONSE_YES) ->filter(fn (\stdClass $attendee): bool => !$attendee->member->event_context->host) ->map(function (\stdClass $attendee): \stdClass { $attendee->is_attending = true; diff --git a/src/Meetup/RsvpResponse.php b/src/Meetup/RsvpResponse.php new file mode 100644 index 0000000..58443c3 --- /dev/null +++ b/src/Meetup/RsvpResponse.php @@ -0,0 +1,11 @@ +