<?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: Why are we enforced to use `is_*` methods of tagged union in Dropbox API Support &amp; Feedback</title>
    <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Why-are-we-enforced-to-use-is-methods-of-tagged-union/m-p/320919#M18908</link>
    <description>&lt;P&gt;Thanks Greg!&lt;/P&gt;&lt;P&gt;I'm using a hacky approach to get the results. I wasn't&amp;nbsp;confident using '_tag' attribute as it's private&amp;nbsp;and implementation changes might break my code.&amp;nbsp;&lt;/P&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;</description>
    <pubDate>Wed, 02 Jan 2019 20:35:56 GMT</pubDate>
    <dc:creator>rk90</dc:creator>
    <dc:date>2019-01-02T20:35:56Z</dc:date>
    <item>
      <title>Why are we enforced to use `is_*` methods of tagged union</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Why-are-we-enforced-to-use-is-methods-of-tagged-union/m-p/320852#M18904</link>
      <description>&lt;P&gt;I am trying to list all members in a column/row format.&lt;/P&gt;&lt;P&gt;For example, column1=email, column2=status&lt;/P&gt;&lt;P&gt;I can add email to the column1 row just fine, but I cannot access the status tag. I am enforced to call each is_* methods until I get a True response and then figure which is_* method returned True and the corresponding tag to the column2 row. Why can't we simply access the tag? Why this overhead of calling each is_* method and why not just add an attribute that returns the tag (I am reluctant to use the _tag attribute).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 29 May 2019 09:08:34 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Why-are-we-enforced-to-use-is-methods-of-tagged-union/m-p/320852#M18904</guid>
      <dc:creator>rk90</dc:creator>
      <dc:date>2019-05-29T09:08:34Z</dc:date>
    </item>
    <item>
      <title>Re: Why are we enforced to use `is_*` methods of tagged union</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Why-are-we-enforced-to-use-is-methods-of-tagged-union/m-p/320864#M18905</link>
      <description>&lt;P&gt;Thanks for the feedback! In general, the SDKs are meant to abstract away the concept of the "tag", but I'll pass this along as a feature request for a public accessor for the tag value itself.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;(Also, "_tag" is considered private, but that said, it's unlikely to change.)&lt;/P&gt;</description>
      <pubDate>Wed, 02 Jan 2019 18:41:39 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Why-are-we-enforced-to-use-is-methods-of-tagged-union/m-p/320864#M18905</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2019-01-02T18:41:39Z</dc:date>
    </item>
    <item>
      <title>Re: Why are we enforced to use `is_*` methods of tagged union</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Why-are-we-enforced-to-use-is-methods-of-tagged-union/m-p/320873#M18906</link>
      <description>&lt;P&gt;I appreciate your response, Greg.&lt;/P&gt;&lt;P&gt;Please consider use cases where the value of the tag is necessary. For example, let's say I want to export all users/groups to a CSV file with column names that correspond to the tag names and rows that correspond to the value of the tag.&lt;/P&gt;&lt;P&gt;Columns: id, firstname, lastname, email, status&lt;/P&gt;&lt;P&gt;Rows: &amp;lt;id&amp;gt;, X, Y, x.y@noemail.com, &amp;lt;active|suspended&amp;gt;&lt;/P&gt;&lt;P&gt;In this case, I just need be to extract the value associated with `status` (i.e. user.status should either evaluate to 'active|suspended|removed'). This is unfortunately not possible with the current specification. Is there any other way to retrieve what I want?&lt;/P&gt;&lt;P&gt;Also, can you explain what following in the SDK implies? What are corresponding get_* methods here? I couldn't find any get_* methods.&lt;/P&gt;&lt;PRE&gt;This class acts as a tagged union. Only one of the is_* methods will return true. To get the associated value of a tag (if one exists), use the corresponding get_* method.&lt;/PRE&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;</description>
      <pubDate>Wed, 02 Jan 2019 19:13:52 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Why-are-we-enforced-to-use-is-methods-of-tagged-union/m-p/320873#M18906</guid>
      <dc:creator>rk90</dc:creator>
      <dc:date>2019-01-02T19:13:52Z</dc:date>
    </item>
    <item>
      <title>Re: Why are we enforced to use `is_*` methods of tagged union</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Why-are-we-enforced-to-use-is-methods-of-tagged-union/m-p/320887#M18907</link>
      <description>&lt;P&gt;With the Python SDK, you can use the "_tag" property to access the value.&amp;nbsp;It is private, and so not officially supported, but I don't expect it to change. Just make sure you test it whenver you update to a new version of the SDK.&lt;/P&gt;
&lt;P&gt;The get_* methods can be used to retrieve the value of the set union field. The field may not always have a typed value to return, so you won't always see the get_* methods on any particular class. You can see an example of one at &lt;A href="https://dropbox-sdk-python.readthedocs.io/en/latest/api/files.html?highlight=get_path#dropbox.files.CreateFolderError" target="_self"&gt;CreateFolderError&lt;/A&gt;.get_path though.&lt;/P&gt;</description>
      <pubDate>Wed, 02 Jan 2019 19:29:21 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Why-are-we-enforced-to-use-is-methods-of-tagged-union/m-p/320887#M18907</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2019-01-02T19:29:21Z</dc:date>
    </item>
    <item>
      <title>Re: Why are we enforced to use `is_*` methods of tagged union</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Why-are-we-enforced-to-use-is-methods-of-tagged-union/m-p/320919#M18908</link>
      <description>&lt;P&gt;Thanks Greg!&lt;/P&gt;&lt;P&gt;I'm using a hacky approach to get the results. I wasn't&amp;nbsp;confident using '_tag' attribute as it's private&amp;nbsp;and implementation changes might break my code.&amp;nbsp;&lt;/P&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;</description>
      <pubDate>Wed, 02 Jan 2019 20:35:56 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Why-are-we-enforced-to-use-is-methods-of-tagged-union/m-p/320919#M18908</guid>
      <dc:creator>rk90</dc:creator>
      <dc:date>2019-01-02T20:35:56Z</dc:date>
    </item>
  </channel>
</rss>

