Takes in a show ID and outputs the TVShow Object

@param      $ID
@param null $embed_cast

@return array
545943
public function getShowByShowID($ID, $embed_cast=null){
		if($embed_cast === true){
			$url = self::APIURL.'/shows/'.$ID.'?embed=cast';
		}else{
			$url = self::APIURL.'/shows/'.$ID;
		}

		$show = $this->getFile($url);

		$cast = [];
		foreach($show['_embedded']['cast'] as $person){
			$actor = new Actor($person['person']);
			$character = new Character($person['character']);
			$cast[] = [$actor, $character];
		}

		$TVShow = new TVShow($show);

		return $embed_cast === true ? [$TVShow, $cast] : [$TVShow];
	}
523889
public function show($id, array $params = array())
    {
        return $this->get($this->getPath().'/'.rawurlencode($id), $params);
    }
1171053
public function renderAdUnit($id)
    {
        $add = isset($this->_slots[$id]) ? $this->_slots[$id] : null ;
        if ($add) {
            return "
                <!-- " . $add['unitName'] . " -->
                <div id='" . $add['divId'] . "' style='width:" . $add['width'] . "px; height:" . $add['height'] . "px;'>
                <script type='text/javascript'>
                googletag.cmd.push(function() { googletag.display('" . $add['divId'] . "'); });
                </script>
                </div>";
        }

        return;
    }
1246345
static function fetchByContentObjectID( $contentObjectID, $languageCode = null, $asObject = true )
    {
        $condition = array();
        $condition['contentobject_id'] = $contentObjectID;
        $condition['data_type_string'] = 'ezmedia';
        if ( $languageCode != null )
        {
            $condition['language_code'] = $languageCode;
        }
        $custom = array( array( 'operation' => 'DISTINCT id',
                             'name' => 'id' ) );
        $ids = eZPersistentObject::fetchObjectList( eZContentObjectAttribute::definition(),
                                             array(),
                                             $condition,
                                             null,
                                             null,
                                             false,
                                             false,
                                             $custom );
        $mediaFiles = array();
        foreach ( $ids as $id )
        {
            $mediaFileObjectAttribute = eZMedia::fetch( $id['id'], null, $asObject );
            $mediaFiles = array_merge( $mediaFiles, $mediaFileObjectAttribute );
        }
        return $mediaFiles;
    }
958450
protected function serializeEmbedOne(EmbedMetadata $embedMeta, Embed $embed = null)
    {
        if (null === $embed) {
            return;
        }
        $serialized = [];
        foreach ($embedMeta->getAttributes() as $key => $attrMeta) {
            $serialized[$key] = $this->serializeAttribute($embed->get($key), $attrMeta);
        }
        foreach ($embedMeta->getEmbeds() as $key => $embeddedPropMeta) {
            $serialized[$key] = $this->serializeEmbed($embed->get($key), $embeddedPropMeta);
        }

        return empty($serialized) ? null : $serialized;
    }
526984
public function getCastParams()
    {
        if ($this->getIncrementing()) {
            return array_merge(
                [
                    $this->getKeyName() => $this->getKeyType(),
                ],
                $this->getAttributesFromSchema('cast', true)
            );
        }

        return $this->getAttributesFromSchema('cast-params', true);
    }
446579
public function embedEpisodeAction(Request $request)
    {
        $uniqID = $request->query->get('uniqID');
        $episode = $this->get('oktolab_media')->getEpisode($uniqID);
        return ['episode' => $episode];
    }
1145186
public function getStoryEmbedAction(Request $request, $databox_id, $record_id)
    {
        $record = $this->findDataboxById($databox_id)->get_record($record_id);

        $devices = $request->get('devices', []);
        $mimes = $request->get('mimes', []);

        $ret = array_values(array_filter(array_map(function ($media) use ($request, $record) {
            return $this->listEmbeddableMedia($request, $record, $media);
        }, $record->get_embedable_medias($devices, $mimes))));

        return Result::create($request, ["embed" => $ret])->createResponse();
    }
1202636
public function getById($id, $embed = '')
    {
        $this->getLogger()->info('Getting layout ID ' . $id);
        $hydratedRegions = [];
        $hydratedWidgets = [];
        $response = $this->doGet($this->url, [
            'layoutId' => $id, 'retired' => -1, 'embed' => $embed
        ]);

        if (count($response) <= 0)
            throw new XiboApiException('Expecting a single record, found ' . count($response));

        /** @var XiboLayout $layout */
        $layout = $this->hydrate($response[0]);

        foreach ($layout->regions as $item) {
            /** @var XiboRegion $region */
            $region = new XiboRegion($this->getEntityProvider());
            $region->hydrate($item);
            if (strpos($embed, 'playlists') !== false) {
                /** @var XiboPlaylist $playlist */
                $playlist = new XiboPlaylist($this->getEntityProvider());
                $playlist->hydrate($item['regionPlaylist']);
                foreach ($playlist->widgets as $widget) {
                    /** @var XiboWidget $widgetObject */
                    $widgetObject = new XiboWidget($this->getEntityProvider());
                    $widgetObject->hydrate($widget);
                    $hydratedWidgets[] = $widgetObject;
                }
                $playlist->widgets = $hydratedWidgets;
                $region->regionPlaylist = $playlist;
            }
            // Add to parent object
            $hydratedRegions[] = $region;
        }
        $layout->regions = $hydratedRegions;

        return clone $layout;
    }
838493
function _removeEmbed(state, id) {
  // get existing embed
  var embeds = state.embeds;
  var embed = embeds[id];
  var parent = embed.parent;
  var property = embed.property;

  // create reference to replace embed
  var subject = {'@id': id};

  // remove existing embed
  if(_isArray(parent)) {
    // replace subject with reference
    for(var i = 0; i < parent.length; ++i) {
      if(jsonld.compareValues(parent[i], subject)) {
        parent[i] = subject;
        break;
      }
    }
  }
  else {
    // replace subject with reference
    var useArray = _isArray(parent[property]);
    jsonld.removeValue(parent, property, subject, {propertyIsArray: useArray});
    jsonld.addValue(parent, property, subject, {propertyIsArray: useArray});
  }

  // recursively remove dependent dangling embeds
  var removeDependents = function(id) {
    // get embed keys as a separate array to enable deleting keys in map
    var ids = Object.keys(embeds);
    for(var i = 0; i < ids.length; ++i) {
      var next = ids[i];
      if(next in embeds && _isObject(embeds[next].parent) &&
        embeds[next].parent['@id'] === id) {
        delete embeds[next];
        removeDependents(next);
      }
    }
  };
  removeDependents(id);
}
648626
public function show($id)
    {
        $options = $this->getParams('includes');

        $product = Subbly::api('subbly.product')->find($id, $options);

        return $this->jsonResponse(array(
            'product' => $this->presenter->single($product),
        ));
    }
107977
public Series getSeries(String id, String language) throws TvDbException {
        StringBuilder urlBuilder = new StringBuilder();
        urlBuilder.append(BASE_URL)
                  .append(apiKey)
                  .append(SERIES_URL)
                  .append(id)
                  .append("/");
        if (StringUtils.isNotBlank(language)) {
            urlBuilder.append(language).append(XML_EXTENSION);
        }

        LOG.trace(URL, urlBuilder.toString());
        List<Series> seriesList = TvdbParser.getSeriesList(urlBuilder.toString());
        if (seriesList.isEmpty()) {
            return null;
        } else {
            return seriesList.get(0);
        }
    }
1333752
public function getVideoList($id)
    {
        $this->setId($id);

        $list = array();
        $data = $this->getData(str_replace('{key}', $this->key, $this->baseChannelUrl));

        if(!isset($data->items))
        {
            throw new \Exception("Video channel not found");
        }

        foreach($data->items as $value)
        {
            $list[] = $this->getVideoDetail($value->contentDetails->videoId);
        }

        return $list;
    }
1081424
function() {
		var self = this;

		// Get Media ID
		this.media_id = this.data.url.replace(/.*?:\/\//g, "");

		if (this.options.api_key_embedly) {
			// API URL
			api_url = "https://api.embed.ly/1/extract?key=" + this.options.api_key_embedly + "&url=" + this.media_id + "&callback=?";

			// API Call
			TL.getJSON(api_url, function(d) {
				self.createMedia(d);
			});
		} else {
			this.createCardContent();
		}
	}
1354997
def cache_embed_data
      data = JSON.parse(API::Server.embed(@bot.token, @id))
      @embed_enabled = data['enabled']
      @embed_channel_id = data['channel_id']
    end
1215443
public static function renderBlockAttrs(array $embed): string
    {
        // attributes to be rendered
        $classes = array();
        $styles = array();
        // shortcuts
        $d = &$embed['dimension'];
        // determine classes
        $classes[] = 'videoblock';
        if ($d->dynamic) {
            $classes[] = 'videoblock-dynamic';
        }
        // determine inline CSS style(s)
        // if scale model is no-scale, allow to "force dynamic"
        // by setting "dynamic" to TRUE
        if ($d->dynamic) {
            $styles[] = 'max-width:'.$d->width.'px';
        } else {
            $styles[] = 'width: '.$d->width.'px';
        }
        // render the attributes
        $class = implode(' ', $classes);
        $style = implode('; ', $styles) . (!empty($styles) ? ';' : '');
        return 'class="'.$class.'" style="'.$style.'"';
    }
499761
def render_embed_js(self, js_embed: Iterable[bytes]) -> bytes:
        
        return (
            b'<script type="text/javascript">\n//<![CDATA[\n'
            + b"\n".join(js_embed)
            + b"\n//]]>\n</script>"
        )