<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: how to extract name and pathdisplay from swiftydropbox searchv2 results in Discuss Dropbox Developer &amp; API</title>
    <link>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/how-to-extract-name-and-pathdisplay-from-swiftydropbox-searchv2/m-p/481139#M1662</link>
    <description>&lt;P&gt;Thanks so much!&lt;/P&gt;</description>
    <pubDate>Mon, 21 Dec 2020 18:06:29 GMT</pubDate>
    <dc:creator>dahunter</dc:creator>
    <dc:date>2020-12-21T18:06:29Z</dc:date>
    <item>
      <title>how to extract name and pathdisplay from swiftydropbox searchv2 results</title>
      <link>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/how-to-extract-name-and-pathdisplay-from-swiftydropbox-searchv2/m-p/481123#M1660</link>
      <description>&lt;P&gt;I have an app in which I was using the SwiftyDropbox function&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;client.files.search&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and now I'm upgrading to the new&lt;/P&gt;&lt;PRE&gt;client.files.searchV2&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, the results have also changed structure (to Files.MetadataV2). Where I used to get my results with the following&lt;/P&gt;&lt;PRE&gt;let match = matches[0] // Matches is the array of Files.Metadata        
let fileName = match.metadata.name
let filePath = match.metadata.pathDisplay&lt;/PRE&gt;&lt;P&gt;now metadata contains none of these fields.&amp;nbsp; What's the process to get them?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 21 Dec 2020 17:00:01 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/how-to-extract-name-and-pathdisplay-from-swiftydropbox-searchv2/m-p/481123#M1660</guid>
      <dc:creator>dahunter</dc:creator>
      <dc:date>2020-12-21T17:00:01Z</dc:date>
    </item>
    <item>
      <title>Re: how to extract name and pathdisplay from swiftydropbox searchv2 results</title>
      <link>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/how-to-extract-name-and-pathdisplay-from-swiftydropbox-searchv2/m-p/481138#M1661</link>
      <description>&lt;P&gt;With the new method, you can access the metadata like this:&lt;/P&gt;
&lt;PRE&gt;client.files.searchV2(query: query).response { response, error in
    if let response = response {
        for entry in response.matches {
            switch entry.metadata {
            case .metadata(let metadata):
                switch metadata {
                    case let fileMetadata as Files.FileMetadata:
                        print("File name: \(fileMetadata.name)")
                        print("File display path: \(fileMetadata.pathDisplay ?? "")")
                    case let folderMetadata as Files.FolderMetadata:
                        print("Folder name: \(folderMetadata.name)")
                        print("Folder display path: \(folderMetadata.pathDisplay ?? "")")
                    case let deletedMetadata as Files.DeletedMetadata:
                        print("Deleted entry name: \(deletedMetadata.name)")
                default:
                    print("unknown metadata type")
                }
            default:
                print("unknown entry type")
            }
        print("")
        }
    } else if let error = error {
        print(error)
    }
}&lt;/PRE&gt;</description>
      <pubDate>Mon, 21 Dec 2020 18:04:53 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/how-to-extract-name-and-pathdisplay-from-swiftydropbox-searchv2/m-p/481138#M1661</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2020-12-21T18:04:53Z</dc:date>
    </item>
    <item>
      <title>Re: how to extract name and pathdisplay from swiftydropbox searchv2 results</title>
      <link>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/how-to-extract-name-and-pathdisplay-from-swiftydropbox-searchv2/m-p/481139#M1662</link>
      <description>&lt;P&gt;Thanks so much!&lt;/P&gt;</description>
      <pubDate>Mon, 21 Dec 2020 18:06:29 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/how-to-extract-name-and-pathdisplay-from-swiftydropbox-searchv2/m-p/481139#M1662</guid>
      <dc:creator>dahunter</dc:creator>
      <dc:date>2020-12-21T18:06:29Z</dc:date>
    </item>
  </channel>
</rss>

