Skip to content

Commit 2539805

Browse files
author
Qiming Yuan
committed
Update specs.
1 parent ba999ac commit 2539805

File tree

12 files changed

+501
-60
lines changed

12 files changed

+501
-60
lines changed

dropbox-sdk-dotnet/Dropbox.Api/AppProperties/AssemblyInfo.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@
1818
[assembly: AssemblyCulture("")]
1919

2020
[assembly: AssemblyVersion("4.0.0")]
21-
[assembly: AssemblyFileVersion("4.0.6488")]
21+
[assembly: AssemblyFileVersion("4.0.6489")]

dropbox-sdk-dotnet/Dropbox.Api/Dropbox.Api.Doc.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,7 @@
205205
<Compile Include="Generated\Files\ListFolderResult.cs" />
206206
<Compile Include="Generated\Files\ListRevisionsArg.cs" />
207207
<Compile Include="Generated\Files\ListRevisionsError.cs" />
208+
<Compile Include="Generated\Files\ListRevisionsMode.cs" />
208209
<Compile Include="Generated\Files\ListRevisionsResult.cs" />
209210
<Compile Include="Generated\Files\LookupError.cs" />
210211
<Compile Include="Generated\Files\MediaInfo.cs" />

dropbox-sdk-dotnet/Dropbox.Api/Dropbox.Api.Portable.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,7 @@
201201
<Compile Include="Generated\Files\ListFolderResult.cs" />
202202
<Compile Include="Generated\Files\ListRevisionsArg.cs" />
203203
<Compile Include="Generated\Files\ListRevisionsError.cs" />
204+
<Compile Include="Generated\Files\ListRevisionsMode.cs" />
204205
<Compile Include="Generated\Files\ListRevisionsResult.cs" />
205206
<Compile Include="Generated\Files\LookupError.cs" />
206207
<Compile Include="Generated\Files\MediaInfo.cs" />

dropbox-sdk-dotnet/Dropbox.Api/Dropbox.Api.Portable40.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,7 @@
225225
<Compile Include="Generated\Files\ListFolderResult.cs" />
226226
<Compile Include="Generated\Files\ListRevisionsArg.cs" />
227227
<Compile Include="Generated\Files\ListRevisionsError.cs" />
228+
<Compile Include="Generated\Files\ListRevisionsMode.cs" />
228229
<Compile Include="Generated\Files\ListRevisionsResult.cs" />
229230
<Compile Include="Generated\Files\LookupError.cs" />
230231
<Compile Include="Generated\Files\MediaInfo.cs" />

dropbox-sdk-dotnet/Dropbox.Api/Dropbox.Api.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,7 @@
206206
<Compile Include="Generated\Files\ListFolderResult.cs" />
207207
<Compile Include="Generated\Files\ListRevisionsArg.cs" />
208208
<Compile Include="Generated\Files\ListRevisionsError.cs" />
209+
<Compile Include="Generated\Files\ListRevisionsMode.cs" />
209210
<Compile Include="Generated\Files\ListRevisionsResult.cs" />
210211
<Compile Include="Generated\Files\LookupError.cs" />
211212
<Compile Include="Generated\Files\MediaInfo.cs" />

dropbox-sdk-dotnet/Dropbox.Api/Dropbox.Api.nuspec

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,9 @@
1313
<description>Portable class library for accessing the Dropbox v2 API</description>
1414
<releaseNotes>
1515
What's New:
16-
- ListFolder now supports shared links.
17-
16+
- Files:
17+
- ListFolder now supports shared links.
18+
- Added Mode parameter to ListRevisions.
1819
</releaseNotes>
1920
<copyright>Copyright (c) Dropbox Inc. 2016</copyright>
2021
<tags>Dropbox Api</tags>

dropbox-sdk-dotnet/Dropbox.Api/Generated/Files/FilesUserRoutes.cs

Lines changed: 58 additions & 32 deletions
Large diffs are not rendered by default.

dropbox-sdk-dotnet/Dropbox.Api/Generated/Files/ListFolderArg.cs

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,6 @@ public class ListFolderArg
3131
/// <para>Initializes a new instance of the <see cref="ListFolderArg" /> class.</para>
3232
/// </summary>
3333
/// <param name="path">A unique identifier for the file.</param>
34-
/// <param name="sharedLink">A shared link to list the contents of, if the link is
35-
/// protected provide the password. if this field is present, <see
36-
/// cref="Dropbox.Api.Files.ListFolderArg.Path" /> will be relative to root of the
37-
/// shared link. Only non-recursive mode is supported for shared link.</param>
3834
/// <param name="recursive">If true, the list folder operation will be applied
3935
/// recursively to all subfolders and the response will contain contents of all
4036
/// subfolders.</param>
@@ -51,14 +47,18 @@ public class ListFolderArg
5147
/// <param name="limit">The maximum number of results to return per request. Note: This
5248
/// is an approximate number and there can be slightly more entries returned in some
5349
/// cases.</param>
50+
/// <param name="sharedLink">A shared link to list the contents of. If the link is
51+
/// password-protected, the password must be provided. If this field is present, <see
52+
/// cref="Dropbox.Api.Files.ListFolderArg.Path" /> will be relative to root of the
53+
/// shared link. Only non-recursive mode is supported for shared link.</param>
5454
public ListFolderArg(string path,
55-
SharedLink sharedLink = null,
5655
bool recursive = false,
5756
bool includeMediaInfo = false,
5857
bool includeDeleted = false,
5958
bool includeHasExplicitSharedMembers = false,
6059
bool includeMountedFolders = true,
61-
uint? limit = null)
60+
uint? limit = null,
61+
SharedLink sharedLink = null)
6262
{
6363
if (path == null)
6464
{
@@ -82,13 +82,13 @@ public ListFolderArg(string path,
8282
}
8383

8484
this.Path = path;
85-
this.SharedLink = sharedLink;
8685
this.Recursive = recursive;
8786
this.IncludeMediaInfo = includeMediaInfo;
8887
this.IncludeDeleted = includeDeleted;
8988
this.IncludeHasExplicitSharedMembers = includeHasExplicitSharedMembers;
9089
this.IncludeMountedFolders = includeMountedFolders;
9190
this.Limit = limit;
91+
this.SharedLink = sharedLink;
9292
}
9393

9494
/// <summary>
@@ -111,14 +111,6 @@ public ListFolderArg()
111111
/// </summary>
112112
public string Path { get; protected set; }
113113

114-
/// <summary>
115-
/// <para>A shared link to list the contents of, if the link is protected provide the
116-
/// password. if this field is present, <see
117-
/// cref="Dropbox.Api.Files.ListFolderArg.Path" /> will be relative to root of the
118-
/// shared link. Only non-recursive mode is supported for shared link.</para>
119-
/// </summary>
120-
public SharedLink SharedLink { get; protected set; }
121-
122114
/// <summary>
123115
/// <para>If true, the list folder operation will be applied recursively to all
124116
/// subfolders and the response will contain contents of all subfolders.</para>
@@ -156,6 +148,14 @@ public ListFolderArg()
156148
/// </summary>
157149
public uint? Limit { get; protected set; }
158150

151+
/// <summary>
152+
/// <para>A shared link to list the contents of. If the link is password-protected, the
153+
/// password must be provided. If this field is present, <see
154+
/// cref="Dropbox.Api.Files.ListFolderArg.Path" /> will be relative to root of the
155+
/// shared link. Only non-recursive mode is supported for shared link.</para>
156+
/// </summary>
157+
public SharedLink SharedLink { get; protected set; }
158+
159159
#region Encoder class
160160

161161
/// <summary>
@@ -171,10 +171,6 @@ private class ListFolderArgEncoder : enc.StructEncoder<ListFolderArg>
171171
public override void EncodeFields(ListFolderArg value, enc.IJsonWriter writer)
172172
{
173173
WriteProperty("path", value.Path, writer, enc.StringEncoder.Instance);
174-
if (value.SharedLink != null)
175-
{
176-
WriteProperty("shared_link", value.SharedLink, writer, global::Dropbox.Api.Files.SharedLink.Encoder);
177-
}
178174
WriteProperty("recursive", value.Recursive, writer, enc.BooleanEncoder.Instance);
179175
WriteProperty("include_media_info", value.IncludeMediaInfo, writer, enc.BooleanEncoder.Instance);
180176
WriteProperty("include_deleted", value.IncludeDeleted, writer, enc.BooleanEncoder.Instance);
@@ -184,6 +180,10 @@ public override void EncodeFields(ListFolderArg value, enc.IJsonWriter writer)
184180
{
185181
WriteProperty("limit", value.Limit.Value, writer, enc.UInt32Encoder.Instance);
186182
}
183+
if (value.SharedLink != null)
184+
{
185+
WriteProperty("shared_link", value.SharedLink, writer, global::Dropbox.Api.Files.SharedLink.Encoder);
186+
}
187187
}
188188
}
189189

@@ -219,9 +219,6 @@ protected override void SetField(ListFolderArg value, string fieldName, enc.IJso
219219
case "path":
220220
value.Path = enc.StringDecoder.Instance.Decode(reader);
221221
break;
222-
case "shared_link":
223-
value.SharedLink = global::Dropbox.Api.Files.SharedLink.Decoder.Decode(reader);
224-
break;
225222
case "recursive":
226223
value.Recursive = enc.BooleanDecoder.Instance.Decode(reader);
227224
break;
@@ -240,6 +237,9 @@ protected override void SetField(ListFolderArg value, string fieldName, enc.IJso
240237
case "limit":
241238
value.Limit = enc.UInt32Decoder.Instance.Decode(reader);
242239
break;
240+
case "shared_link":
241+
value.SharedLink = global::Dropbox.Api.Files.SharedLink.Decoder.Decode(reader);
242+
break;
243243
default:
244244
reader.Skip();
245245
break;

dropbox-sdk-dotnet/Dropbox.Api/Generated/Files/ListRevisionsArg.cs

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,11 @@ public class ListRevisionsArg
3232
/// class.</para>
3333
/// </summary>
3434
/// <param name="path">The path to the file you want to see the revisions of.</param>
35+
/// <param name="mode">Determines the behavior of the API in listing the revisions for
36+
/// a given file path or id.</param>
3537
/// <param name="limit">The maximum number of revision entries returned.</param>
3638
public ListRevisionsArg(string path,
39+
ListRevisionsMode mode = null,
3740
ulong limit = 10)
3841
{
3942
if (path == null)
@@ -45,6 +48,10 @@ public ListRevisionsArg(string path,
4548
throw new sys.ArgumentOutOfRangeException("path", @"Value should match pattern '\A(?:/(.|[\r\n])*|id:.*|(ns:[0-9]+(/.*)?))\z'");
4649
}
4750

51+
if (mode == null)
52+
{
53+
mode = global::Dropbox.Api.Files.ListRevisionsMode.Path.Instance;
54+
}
4855
if (limit < 1UL)
4956
{
5057
throw new sys.ArgumentOutOfRangeException("limit", "Value should be greater or equal than 1");
@@ -55,6 +62,7 @@ public ListRevisionsArg(string path,
5562
}
5663

5764
this.Path = path;
65+
this.Mode = mode;
5866
this.Limit = limit;
5967
}
6068

@@ -67,6 +75,7 @@ public ListRevisionsArg(string path,
6775
[sys.ComponentModel.EditorBrowsable(sys.ComponentModel.EditorBrowsableState.Never)]
6876
public ListRevisionsArg()
6977
{
78+
this.Mode = global::Dropbox.Api.Files.ListRevisionsMode.Path.Instance;
7079
this.Limit = 10;
7180
}
7281

@@ -75,6 +84,12 @@ public ListRevisionsArg()
7584
/// </summary>
7685
public string Path { get; protected set; }
7786

87+
/// <summary>
88+
/// <para>Determines the behavior of the API in listing the revisions for a given file
89+
/// path or id.</para>
90+
/// </summary>
91+
public ListRevisionsMode Mode { get; protected set; }
92+
7893
/// <summary>
7994
/// <para>The maximum number of revision entries returned.</para>
8095
/// </summary>
@@ -95,6 +110,7 @@ private class ListRevisionsArgEncoder : enc.StructEncoder<ListRevisionsArg>
95110
public override void EncodeFields(ListRevisionsArg value, enc.IJsonWriter writer)
96111
{
97112
WriteProperty("path", value.Path, writer, enc.StringEncoder.Instance);
113+
WriteProperty("mode", value.Mode, writer, global::Dropbox.Api.Files.ListRevisionsMode.Encoder);
98114
WriteProperty("limit", value.Limit, writer, enc.UInt64Encoder.Instance);
99115
}
100116
}
@@ -131,6 +147,9 @@ protected override void SetField(ListRevisionsArg value, string fieldName, enc.I
131147
case "path":
132148
value.Path = enc.StringDecoder.Instance.Decode(reader);
133149
break;
150+
case "mode":
151+
value.Mode = global::Dropbox.Api.Files.ListRevisionsMode.Decoder.Decode(reader);
152+
break;
134153
case "limit":
135154
value.Limit = enc.UInt64Decoder.Instance.Decode(reader);
136155
break;

0 commit comments

Comments
 (0)