<?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: API example for SwiftyDropBox v2.0 sharing  in Dropbox API Support &amp; Feedback</title>
    <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/API-example-for-SwiftyDropBox-v2-0-sharing/m-p/142949#M4559</link>
    <description>&lt;P&gt;In the Swift SDK, that should be the sharing listFolders method, as you have in your original post. The documentation can be found here:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://dropbox.github.io/SwiftyDropbox/api-docs/latest/Classes/SharingRoutes.html#/s:FC13SwiftyDropbox13SharingRoutes11listFoldersFS0_FT_GCS_15BabelRpcRequestCCS_7Sharing27ListFoldersResultSerializerCS_14VoidSerializer_" rel="nofollow noreferrer"&gt;https://dropbox.github.io/SwiftyDropbox/api-docs/latest/Classes/SharingRoutes.html#/s:FC13SwiftyDropbox13SharingRoutes11listFoldersFS0_FT_GCS_15BabelRpcRequestCCS_7Sharing27ListFoldersResultSerializerCS_14VoidSerializer_&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 17 Dec 2015 02:23:31 GMT</pubDate>
    <dc:creator>Greg-DB</dc:creator>
    <dc:date>2015-12-17T02:23:31Z</dc:date>
    <item>
      <title>API example for SwiftyDropBox v2.0 sharing</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/API-example-for-SwiftyDropBox-v2-0-sharing/m-p/142944#M4554</link>
      <description>&lt;PRE class="default prettyprint prettyprinted"&gt;&lt;CODE&gt;&lt;SPAN class="com"&gt;#!/usr/bin/python&lt;/SPAN&gt;
&lt;SPAN class="kwd"&gt;import&lt;/SPAN&gt;&lt;SPAN class="pln"&gt; dropbox
dbx &lt;/SPAN&gt;&lt;SPAN class="pun"&gt;=&lt;/SPAN&gt;&lt;SPAN class="pln"&gt; dropbox&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;.&lt;/SPAN&gt;&lt;SPAN class="typ"&gt;Dropbox&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;(&lt;/SPAN&gt;&lt;SPAN class="str"&gt;'ab-X'&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;)&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;
dbx&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;users_get_current_account&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;()&lt;/SPAN&gt;
&lt;SPAN class="kwd"&gt;for&lt;/SPAN&gt;&lt;SPAN class="pln"&gt; entry &lt;/SPAN&gt;&lt;SPAN class="kwd"&gt;in&lt;/SPAN&gt;&lt;SPAN class="pln"&gt; dbx&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;files_list_folder&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;(&lt;/SPAN&gt;&lt;SPAN class="str"&gt;'/Shared'&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;).&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;entries&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;:&lt;/SPAN&gt;
    &lt;SPAN class="kwd"&gt;print&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;(&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;entry&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;name&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;)&lt;/SPAN&gt;

&lt;SPAN class="com"&gt;# OUTPUT:&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;
dbx&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;files_download_to_file&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;(&lt;/SPAN&gt;&lt;SPAN class="str"&gt;'Dog.jpg'&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;,&lt;/SPAN&gt;&lt;SPAN class="str"&gt;'/Shared/Samba.png'&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;)&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Tried, signed in ok... and the code compiles, got the user and files part working but sharing no. So my python call to dx.files_list_folder works on my dropbox, but my swift code&amp;nbsp;does nothing?&lt;/P&gt;
&lt;PRE class="default prettyprint prettyprinted"&gt;&lt;CODE&gt;&lt;SPAN class="kwd"&gt;if&lt;/SPAN&gt; &lt;SPAN class="kwd"&gt;let&lt;/SPAN&gt;&lt;SPAN class="pln"&gt; client &lt;/SPAN&gt;&lt;SPAN class="pun"&gt;=&lt;/SPAN&gt; &lt;SPAN class="typ"&gt;Dropbox&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;authorizedClient &lt;/SPAN&gt;&lt;SPAN class="pun"&gt;{&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;

client&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;sharing&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;listFolders&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;().&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;response&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;({&lt;/SPAN&gt;&lt;SPAN class="pln"&gt; response&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;,&lt;/SPAN&gt;&lt;SPAN class="pln"&gt; error &lt;/SPAN&gt;&lt;SPAN class="kwd"&gt;in&lt;/SPAN&gt;
            &lt;SPAN class="kwd"&gt;if&lt;/SPAN&gt; &lt;SPAN class="kwd"&gt;let&lt;/SPAN&gt;&lt;SPAN class="pln"&gt; link &lt;/SPAN&gt;&lt;SPAN class="pun"&gt;=&lt;/SPAN&gt;&lt;SPAN class="pln"&gt; response &lt;/SPAN&gt;&lt;SPAN class="pun"&gt;{&lt;/SPAN&gt;
                &lt;SPAN class="kwd"&gt;print&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;(&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;link&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;entries&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;)&lt;/SPAN&gt;
            &lt;SPAN class="pun"&gt;}&lt;/SPAN&gt; &lt;SPAN class="kwd"&gt;else&lt;/SPAN&gt; &lt;SPAN class="pun"&gt;{&lt;/SPAN&gt;
                &lt;SPAN class="kwd"&gt;print&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;(&lt;/SPAN&gt;&lt;SPAN class="str"&gt;"nothing ..."&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;)&lt;/SPAN&gt;
            &lt;SPAN class="pun"&gt;}&lt;/SPAN&gt;
        &lt;SPAN class="pun"&gt;})&lt;/SPAN&gt;
&lt;SPAN class="pun"&gt;}&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Have I missed something? Can somebody share some working v2 code that does the same thing as the python example?&lt;/P&gt;
&lt;P&gt;Using Swift 2.0 under IOS 9.2 with Xcode client 7.1.1 running under El Capitan.&lt;/P&gt;</description>
      <pubDate>Wed, 29 May 2019 09:37:25 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/API-example-for-SwiftyDropBox-v2-0-sharing/m-p/142944#M4554</guid>
      <dc:creator>Mark L.45</dc:creator>
      <dc:date>2019-05-29T09:37:25Z</dc:date>
    </item>
    <item>
      <title>Re: API example for SwiftyDropBox v2.0 sharing</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/API-example-for-SwiftyDropBox-v2-0-sharing/m-p/142945#M4555</link>
      <description>&lt;P&gt;To clarify, does the Swift version literally do nothing, or does it print out&amp;nbsp;"nothing ..."? In either case, you should make sure you're handling the error in that else block in the Swift version.&lt;/P&gt;
&lt;P&gt;Also, note that these two aren't really equivalent. In the Python version, files_list_folder('/Shared') is listing the folder at the specific path "/Shared", while the Swift version uses&amp;nbsp;sharing.listFolders which would&amp;nbsp;list any and all shared folders. The equivalent of&amp;nbsp;files_list_folder would be the &lt;A href="https://dropbox.github.io/SwiftyDropbox/api-docs/latest/Classes/FilesRoutes.html#/s:FC13SwiftyDropbox11FilesRoutes10listFolderFS0_FT4pathSS9recursiveSb16includeMediaInfoSb14includeDeletedSb_GCS_15BabelRpcRequestCCS_5Files26ListFolderResultSerializerCS2_25ListFolderErrorSerializer_" target="_blank" rel="nofollow noreferrer"&gt;listFolder file route&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Tue, 15 Dec 2015 03:38:08 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/API-example-for-SwiftyDropBox-v2-0-sharing/m-p/142945#M4555</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2015-12-15T03:38:08Z</dc:date>
    </item>
    <item>
      <title>Re: API example for SwiftyDropBox v2.0 sharing</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/API-example-for-SwiftyDropBox-v2-0-sharing/m-p/142946#M4556</link>
      <description>&lt;P&gt;OK, clarification. It literally does nothing, it doesn't print anything at all. What I want to do is list the shared folders, so the swift call is the right one; only it doesn't work for me. The Shared folder is a folder I have shared to user B; I also got user B&amp;nbsp;to share a folder with me. I see neither with this call. This is not an app share, its the other sort of share?&lt;/P&gt;</description>
      <pubDate>Tue, 15 Dec 2015 05:24:09 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/API-example-for-SwiftyDropBox-v2-0-sharing/m-p/142946#M4556</guid>
      <dc:creator>Mark L.45</dc:creator>
      <dc:date>2015-12-15T05:24:09Z</dc:date>
    </item>
    <item>
      <title>Re: API example for SwiftyDropBox v2.0 sharing</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/API-example-for-SwiftyDropBox-v2-0-sharing/m-p/142947#M4557</link>
      <description>&lt;P&gt;What do you mean by "app share"? There are two types of sharing in Dropbox, "shared links" and "shared folders". Shared links&amp;nbsp;won't appear in&amp;nbsp;sharing.listFolders, but shared folders will.&lt;/P&gt;
&lt;P&gt;Anyway, is your client object going out of scope by any chance? The API call is asynchronous, so that could be a reason you're not getting any output.&lt;/P&gt;</description>
      <pubDate>Tue, 15 Dec 2015 05:46:25 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/API-example-for-SwiftyDropBox-v2-0-sharing/m-p/142947#M4557</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2015-12-15T05:46:25Z</dc:date>
    </item>
    <item>
      <title>Re: API example for SwiftyDropBox v2.0 sharing</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/API-example-for-SwiftyDropBox-v2-0-sharing/m-p/142948#M4558</link>
      <description>&lt;P&gt;Ok, try again. Lets try with a different example. I run this.&lt;/P&gt;
&lt;P&gt;/usr/bin/curl -X POST &lt;A href="https://api.dropboxapi.com/2/sharing/list_folders" rel="nofollow noreferrer"&gt;https://api.dropboxapi.com/2/sharing/list_folders&lt;/A&gt; &amp;nbsp;--header "Authorization: Bearer ab-X"&lt;/P&gt;
&lt;P&gt;I get this...&lt;/P&gt;
&lt;P&gt;{"entries": [{"path_lower": "/shared", "name": "Shared", "shared_folder_id": "dbsfid:blah", "access_type": {".tag": "owner"}, "is_team_folder": false, "policy": {"acl_update_policy": {".tag": "editors"}, "shared_link_policy": {".tag": "anyone"}}}, {"path_lower": "/myshared", "name": "myShared", "shared_folder_id": "dbsfid:blah", "access_type": {".tag": "editor"}, "is_team_folder": false, "policy": {"acl_update_policy": {".tag": "editors"}, "shared_link_policy": {".tag": "anyone"}}}]}&lt;/P&gt;
&lt;P&gt;Now I want to do that in swift?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 16 Dec 2015 18:45:30 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/API-example-for-SwiftyDropBox-v2-0-sharing/m-p/142948#M4558</guid>
      <dc:creator>Mark L.45</dc:creator>
      <dc:date>2015-12-16T18:45:30Z</dc:date>
    </item>
    <item>
      <title>Re: API example for SwiftyDropBox v2.0 sharing</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/API-example-for-SwiftyDropBox-v2-0-sharing/m-p/142949#M4559</link>
      <description>&lt;P&gt;In the Swift SDK, that should be the sharing listFolders method, as you have in your original post. The documentation can be found here:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://dropbox.github.io/SwiftyDropbox/api-docs/latest/Classes/SharingRoutes.html#/s:FC13SwiftyDropbox13SharingRoutes11listFoldersFS0_FT_GCS_15BabelRpcRequestCCS_7Sharing27ListFoldersResultSerializerCS_14VoidSerializer_" rel="nofollow noreferrer"&gt;https://dropbox.github.io/SwiftyDropbox/api-docs/latest/Classes/SharingRoutes.html#/s:FC13SwiftyDropbox13SharingRoutes11listFoldersFS0_FT_GCS_15BabelRpcRequestCCS_7Sharing27ListFoldersResultSerializerCS_14VoidSerializer_&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 17 Dec 2015 02:23:31 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/API-example-for-SwiftyDropBox-v2-0-sharing/m-p/142949#M4559</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2015-12-17T02:23:31Z</dc:date>
    </item>
  </channel>
</rss>

