Adapt to pulsar-rest-api 0.0.4

@tomaszdurka please review.
Previously it was #1
Oh. I remembered why I wanted to do it in another PR. I have a plenty of changes that based on this PR. Let's do it in another PR, please?!