All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.getstream.client.service.UserActivityServiceImpl Maven / Gradle / Ivy

There is a newer version: 2.1.3
Show newest version
package io.getstream.client.service;

import io.getstream.client.exception.StreamClientException;
import io.getstream.client.model.activities.BaseActivity;
import io.getstream.client.model.beans.StreamResponse;
import io.getstream.client.model.feeds.BaseFeed;
import io.getstream.client.model.filters.FeedFilter;
import io.getstream.client.repo.StreamRepository;

import java.io.IOException;

/**
 * Provide methods to interact with User activities of subtype of {@link BaseActivity}.
 *
 * @param  Subtype of {@link BaseActivity} representing the activity type to handle.
 */
public class UserActivityServiceImpl extends AbstractActivityService
        implements UserActivityService {

    public UserActivityServiceImpl(BaseFeed feed, Class type, StreamRepository streamRepository) {
        super(feed, type, streamRepository);
    }

    @Override
    public StreamResponse getActivities() throws IOException, StreamClientException {
        return streamRepository.getActivities(this.feed, type, new FeedFilter.Builder().build());
    }

    @Override
    public StreamResponse getActivities(final FeedFilter filter) throws IOException, StreamClientException {
        return streamRepository.getActivities(this.feed, type, filter);
    }
}






© 2015 - 2024 Weber Informatics LLC | Privacy Policy