Microsoft.Research.DataOnboarding.RepositoryAdapters.SkyDrive.SkyDriveAdapter.GetChildFolders C# (CSharp) Method

GetChildFolders() private method

Returns the list of child folder.
private GetChildFolders ( string parentFolderId, AuthToken token ) : Structure
parentFolderId string Parent Folder Id.
token Microsoft.Research.DataOnboarding.DomainModel.AuthToken AuthToken instance.
return Structure
        private Structure GetChildFolders(string parentFolderId, AuthToken token)
        {
            HttpWebRequest request = WebRequest.Create(string.Format("{0}/{1}/files?access_token={2}", skydriveBaseUrl, parentFolderId, token.AccessToken)) as HttpWebRequest;
            request.Method = "GET";
            using (HttpWebResponse response = request.GetResponse() as HttpWebResponse)
            {
                DataContractJsonSerializer serializer = new DataContractJsonSerializer(typeof(Structure));
                Structure structure = serializer.ReadObject(response.GetResponseStream()) as Structure;
                return structure;
            }
        }