-
Notifications
You must be signed in to change notification settings - Fork 0
/
FlickrManager.cs
46 lines (39 loc) · 1.05 KB
/
FlickrManager.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
using System;
using System.Net;
using System.Windows;
using FlickrNet;
using System.Threading.Tasks;
using System.IO;
using System.Collections.Generic;
using System.Text;
namespace Backupr
{
public class FlickrManager
{
public const string ApiKey = "ef1a18ae69ef655405c304e4bd6d1c50";
public const string SharedSecret = "ba2d470e7339f83b";
public static Flickr GetInstance()
{
return new Flickr(ApiKey, SharedSecret);
}
public static Flickr GetAuthInstance()
{
var f = GetInstance();
f.OAuthAccessToken = OAuthToken.Token;
f.OAuthAccessTokenSecret = OAuthToken.TokenSecret;
return f;
}
public static OAuthAccessToken OAuthToken
{
get
{
return Properties.Settings.Default.OAuthToken;
}
set
{
Properties.Settings.Default.OAuthToken = value;
Properties.Settings.Default.Save();
}
}
}
}