Exemplo n.º 1
0
        internal static MediaTagList CreateFromXmlNodeList(XmlNodeList mediaTagNodes)
        {
            MediaTagList mediaTagList = new MediaTagList();

            foreach (XmlNode mediaTagNode in mediaTagNodes)
            {
                mediaTagList.Add(MediaTag.CreateFromXmlNode(mediaTagNode));
            }

            return(mediaTagList);
        }
        public MediaTagList GetUsersMediaTags(string username)
        {
            string relativePath = GenerateRelativeUserMediaTagsUrl(username);

            QueryParameterList paramaters = new QueryParameterList();

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

            string getUsersMediaTagsUrl = OAuth.GenerateURL(ApiUrl, relativePath, _getUsersMediaTagsMethod, Token, paramaters);

            XmlResponseMessage getUsersMediaTagsResponseMessage = GetXmlResponseMessageFromUrl(getUsersMediaTagsUrl, _getUsersMediaTagsMethod);

            return(MediaTagList.CreateFromXmlResponseMessage(getUsersMediaTagsResponseMessage));
        }
Exemplo n.º 3
0
        public MediaTagList GetMediaTags(ref MediaItem mediaItem)
        {
            string relativePath = GenerateRelativeMediaTagUrl(mediaItem.Url);

            QueryParameterList paramaters = new QueryParameterList();

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

            string getMediaTagUrl = OAuth.GenerateURL(ApiUrl, relativePath, _getMediaTagMethod, Token, paramaters);

            XmlResponseMessage getMediaTagResponseMessage = GetXmlResponseMessageFromUrl(getMediaTagUrl, _getMediaTagMethod);

            mediaItem.SetMediaTags = MediaTagList.CreateFromXmlResponseMessage(getMediaTagResponseMessage);
            return(mediaItem.MediaTags);
        }