package com.musicocracy.fpgk.ioc.activity;

import com.musicocracy.fpgk.domain.spotify.Browser;
import com.musicocracy.fpgk.mvp.model.SongSelectModel;
import com.musicocracy.fpgk.mvp.presenter.SongSelectPresenter;

import dagger.Module;
import dagger.Provides;

@Module
public class SongSelectModule {
    @Provides
    public SongSelectModel provideSongSelectModel(Browser browser) {
        return new SongSelectModel(browser, api);
    }

    @Provides
    public SongSelectPresenter provideSongSelectPresenter(SongSelectModel model) {
        return new SongSelectPresenter(model);
    }
}

package com.musicocracy.fpgk.ioc.activity;

import com.musicocracy.fpgk.domain.spotify.Browser;
import com.musicocracy.fpgk.mvp.model.SongSelectModel;
import com.musicocracy.fpgk.mvp.presenter.SongSelectPresenter;

import dagger.Module;
import dagger.Provides;
import kaaes.spotify.webapi.android.SpotifyApi;

@Module
public class SongSelectModule {
    @Provides
    public SongSelectModel provideSongSelectModel(Browser browser, SpotifyApi api) {
        return new SongSelectModel(browser, api);
    }

    @Provides
    public SongSelectPresenter provideSongSelectPresenter(SongSelectModel model) {
        return new SongSelectPresenter(model);
    }
}

Set up dependency injection for spotify module including Spotify Api, Spotify Service, and the Browser.
Set up dependency injection for spotify module including Spotify Api, Spotify Service, and the Browser.
