/*
 * Copyright 2014 Uwe Trottmann
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.battlelancer.seriesguide.api;

import android.content.Intent;

public class Intents {

    public static final String ACTION_VIEW_EPISODE
            = "com.battlelancer.seriesguide.api.action.VIEW_EPISODE";

    public static final String EXTRA_EPISODE_TVDBID = "episode_tvdbid";

    /**
     * Builds an implicit {@link android.content.Intent} to view an episode in SeriesGuide. Make
     * sure to check with {@link Intent#resolveActivity(android.content.pm.PackageManager)} if
     * SeriesGuide (or another app capable of handling this intent) is available.
     */
    public static Intent buildViewEpisodeIntent(int episodeTvdbId) {
        return new Intent(ACTION_VIEW_EPISODE)
                .putExtra(EXTRA_EPISODE_TVDBID, episodeTvdbId);
    }
}

@@ -667,16 +667,88 @@
 ntent;%0A%0A
+/**%0A * Helper methods to view shows or episodes within SeriesGuide.%0A */%0A
 public c
@@ -916,29 +916,137 @@
  String 
-EXTRA_EPISODE
+ACTION_VIEW_SHOW%0A            = %22com.battlelancer.seriesguide.api.action.VIEW_SHOW%22;%0A%0A    public static final String EXTRA
 _TVDBID 
@@ -1052,16 +1052,8 @@
  = %22
-episode_
 tvdb
@@ -1496,23 +1496,475 @@
 a(EXTRA_
-EPISODE
+TVDBID, episodeTvdbId);%0A    %7D%0A%0A    /**%0A     * Builds an implicit %7B@link android.content.Intent%7D to view an episode in SeriesGuide. Make%0A     * sure to check with %7B@link Intent#resolveActivity(android.content.pm.PackageManager)%7D if%0A     * SeriesGuide (or another app capable of handling this intent) is available.%0A     */%0A    public static Intent buildViewShowIntent(int showTvdbId) %7B%0A        return new Intent(ACTION_VIEW_SHOW)%0A                .putExtra(EXTRA
 _TVDBID,
@@ -1956,39 +1956,36 @@
 a(EXTRA_TVDBID, 
-episode
+show
 TvdbId);%0A    %7D%0A%7D

Support building show view intents from API as well.