Ejemplo n.º 1
0
        public static string ReturnId(string format, IRestResponse apiResponse)
        {
            string idValue = GoRestAPISteps.idValue;

            if (format.Equals("json"))
            {
                string response = apiResponse.Content;
                var    jObject  = JObject.Parse(response);
                idValue = JObject.Parse(apiResponse.Content)["result"][0]["user_id"].Value <string>();
            }
            else if (format.Equals("xml"))
            {
                idValue = Deserialization.AlbumIdDeserialization(apiResponse);
            }
            return(idValue);
        }