Example #1
0
        public MediaItem GetMediaInformation(ref MediaItem mediaItem)
        {
            string relativePath = GenerateRelativeMediaInformationUrl(mediaItem.Url);

            QueryParameterList paramaters = new QueryParameterList();

            paramaters.Add(new QueryParameter(_format, "xml"));

            string getMediaInformationUrl = OAuth.GenerateURL(ApiUrl, relativePath, _getMediaInformationMethod, Token, paramaters);

            XmlResponseMessage getMediaInformationResponseMessage = GetXmlResponseMessageFromUrl(getMediaInformationUrl, _getMediaInformationMethod);

            mediaItem = MediaItem.CreateFromXmlNode(mediaItem.MediaType, getMediaInformationResponseMessage.ResponseXml.SelectSingleNode("descendant::media"));
            return(mediaItem);
        }
        internal Album(XmlNode albumNode)
        {
            ParseFromXmlNode(albumNode);

            XmlNodeList subAlbumNodes = albumNode.SelectNodes("descendant::album");

            foreach (XmlNode subAlbumNode in subAlbumNodes)
            {
                _subAlbums.Add(Album.CreateFromXmlNode(subAlbumNode));
            }

            XmlNodeList mediaNodeList = albumNode.SelectNodes("descendant::media");

            foreach (XmlNode mediaNode in mediaNodeList)
            {
                _mediaList.Add(MediaItem.CreateFromXmlNode(mediaNode));
            }
        }