Skip to content

Commit fbf14e5

Browse files
committed
Added support for "token" parameter
1 parent bd15a3c commit fbf14e5

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

src/Skybrud.Social.TwentyThree/Options/Photos/TwentyThreeGetPhotosOptions.cs

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
using System;
2-
using Skybrud.Social.Http;
1+
using Skybrud.Social.Http;
32
using Skybrud.Social.Interfaces.Http;
43

54
namespace Skybrud.Social.TwentyThree.Options.Photos {
@@ -13,6 +12,16 @@ public class TwentyThreeGetPhotosOptions : IHttpGetOptions {
1312
/// </summary>
1413
public string PhotoId { get; set; }
1514

15+
/// <summary>
16+
/// Gets or sets the token for a specific video/photo or an album − depending on whether <c>photo_id</c> or
17+
/// <c>album_id</c> is set.
18+
///
19+
/// Specifying either an <c>album_id/token</c> or a <c>photo_id/token</c> will give the client access to
20+
/// information about the <c>video/photo/album/channel</c> irregardless of permission level. When requesting a
21+
/// single photo object, tokens can be explicitly time-limited.
22+
/// </summary>
23+
public string Token { get; set; }
24+
1625
/// <summary>
1726
/// Gets or sets whether videos should be included in the response.
1827
///
@@ -34,7 +43,8 @@ public IHttpQueryString GetQueryString() {
3443

3544
IHttpQueryString query = new SocialHttpQueryString();
3645

37-
if (String.IsNullOrWhiteSpace(PhotoId) == false) query.Add("photo_id", PhotoId);
46+
if (string.IsNullOrWhiteSpace(PhotoId) == false) query.Add("photo_id", PhotoId);
47+
if (string.IsNullOrWhiteSpace(Token) == false) query.Add("token", Token);
3848

3949
switch (Video) {
4050
case TwentyThreeVideoParameter.OnlyVideos:

0 commit comments

Comments
 (0)