<?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: Extracting variable from SearchMatchV2 Result in Dropbox API Support &amp; Feedback</title>
    <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Extracting-variable-from-SearchMatchV2-Result/m-p/534179#M25728</link>
    <description>&lt;P&gt;The &lt;A href="https://dropbox-sdk-python.readthedocs.io/en/latest/api/dropbox.html#dropbox.dropbox_client.Dropbox.files_search_v2" target="_self"&gt;files_search_v2&lt;/A&gt; method returns a &lt;A href="https://dropbox-sdk-python.readthedocs.io/en/latest/api/files.html#dropbox.files.SearchV2Result" target="_self"&gt;SearchV2Result&lt;/A&gt;, which has a list of &lt;A href="https://dropbox-sdk-python.readthedocs.io/en/latest/api/files.html#dropbox.files.SearchMatchV2" target="_self"&gt;SearchMatchV2&lt;/A&gt; in its 'matches' variable. Each &lt;A href="https://dropbox-sdk-python.readthedocs.io/en/latest/api/files.html#dropbox.files.SearchMatchV2" target="_self"&gt;SearchMatchV2&lt;/A&gt; has a&amp;nbsp;&lt;A href="https://dropbox-sdk-python.readthedocs.io/en/latest/api/files.html#dropbox.files.MetadataV2" target="_self"&gt;MetadataV2&lt;/A&gt; object in its 'metadata' variable, so you can access the &lt;A href="https://dropbox-sdk-python.readthedocs.io/en/latest/api/files.html#dropbox.files.Metadata" target="_self"&gt;Metadata&lt;/A&gt; object and its variables, such as 'path_lower', like this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="python"&gt;search_result = dbx.files_search_v2('Test')

for match in search_result.matches:
    if match.metadata.is_metadata():
        print(match.metadata.get_metadata().path_lower)
    else:
        # handling for other types here
        pass&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 20 Jul 2021 16:02:15 GMT</pubDate>
    <dc:creator>Greg-DB</dc:creator>
    <dc:date>2021-07-20T16:02:15Z</dc:date>
    <item>
      <title>Extracting variable from SearchMatchV2 Result</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Extracting-variable-from-SearchMatchV2-Result/m-p/534011#M25722</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am using the search function in the Dropbox API for Python, and I need to be able to extract the path_lower variable from the SearchV2Result. &amp;nbsp;Hopefully someone can help me with this.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My Code:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="python"&gt;dbx.files_search_v2('Test')&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Output:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="python"&gt;SearchV2Result(cursor=NOT_SET, has_more=False, matches=[SearchMatchV2(highlight_spans=NOT_SET, match_type=SearchMatchTypeV2('filename', None), metadata=MetadataV2('metadata', FolderMetadata(id='id:CMgvcnxDzGAAAAAAAAAAVA', name='Test', parent_shared_folder_id=NOT_SET, path_display='/wyss-predictive-bioanalytics/Yianni/Test', path_lower='/wyss-predictive-bioanalytics/yianni/test', property_groups=NOT_SET, shared_folder_id=NOT_SET, sharing_info=FolderSharingInfo(no_access=False, parent_shared_folder_id='9501352096', read_only=False, shared_folder_id=NOT_SET, traverse_only=False))))])&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Again, I would like to extract the path_lower variable, so in this case, it would be '/wyss-predictive-bioanalytics/yianni/test'. &amp;nbsp;Thanks!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 26 Jul 2021 22:31:23 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Extracting-variable-from-SearchMatchV2-Result/m-p/534011#M25722</guid>
      <dc:creator>yiannimercer</dc:creator>
      <dc:date>2021-07-26T22:31:23Z</dc:date>
    </item>
    <item>
      <title>Re: Extracting variable from SearchMatchV2 Result</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Extracting-variable-from-SearchMatchV2-Result/m-p/534179#M25728</link>
      <description>&lt;P&gt;The &lt;A href="https://dropbox-sdk-python.readthedocs.io/en/latest/api/dropbox.html#dropbox.dropbox_client.Dropbox.files_search_v2" target="_self"&gt;files_search_v2&lt;/A&gt; method returns a &lt;A href="https://dropbox-sdk-python.readthedocs.io/en/latest/api/files.html#dropbox.files.SearchV2Result" target="_self"&gt;SearchV2Result&lt;/A&gt;, which has a list of &lt;A href="https://dropbox-sdk-python.readthedocs.io/en/latest/api/files.html#dropbox.files.SearchMatchV2" target="_self"&gt;SearchMatchV2&lt;/A&gt; in its 'matches' variable. Each &lt;A href="https://dropbox-sdk-python.readthedocs.io/en/latest/api/files.html#dropbox.files.SearchMatchV2" target="_self"&gt;SearchMatchV2&lt;/A&gt; has a&amp;nbsp;&lt;A href="https://dropbox-sdk-python.readthedocs.io/en/latest/api/files.html#dropbox.files.MetadataV2" target="_self"&gt;MetadataV2&lt;/A&gt; object in its 'metadata' variable, so you can access the &lt;A href="https://dropbox-sdk-python.readthedocs.io/en/latest/api/files.html#dropbox.files.Metadata" target="_self"&gt;Metadata&lt;/A&gt; object and its variables, such as 'path_lower', like this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="python"&gt;search_result = dbx.files_search_v2('Test')

for match in search_result.matches:
    if match.metadata.is_metadata():
        print(match.metadata.get_metadata().path_lower)
    else:
        # handling for other types here
        pass&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Jul 2021 16:02:15 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Extracting-variable-from-SearchMatchV2-Result/m-p/534179#M25728</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2021-07-20T16:02:15Z</dc:date>
    </item>
  </channel>
</rss>

