示例#1
0
        /// <summary>
        /// Returns the credentials attached to an authentication token.
        /// http://www.flickr.com/services/api/flickr.auth.checkToken.html
        /// </summary>
        public FlickrAuthInfo CheckToken(string token)
        {
            Dictionary <string, string> args = new Dictionary <string, string>();

            args.Add("method", "flickr.auth.checkToken");
            args.Add("api_key", API_Key);
            args.Add("auth_token", token);
            args.Add("api_sig", GetAPISig(args));

            string response = SendRequest(HttpMethod.POST, API_URL, args);

            Auth = new FlickrAuthInfo(ParseResponse(response, "auth"));

            return(Auth);
        }
示例#2
0
        /// <summary>
        /// Returns the auth token for the given frob, if one has been attached.
        /// http://www.flickr.com/services/api/flickr.auth.getToken.html
        /// </summary>
        /// <returns></returns>
        public FlickrAuthInfo GetToken(string frob)
        {
            Dictionary<string, string> args = new Dictionary<string, string>();
            args.Add("method", "flickr.auth.getToken");
            args.Add("api_key", API_Key);
            args.Add("frob", frob);
            args.Add("api_sig", GetAPISig(args));

            string response = SendRequest(HttpMethod.POST, API_URL, args);

            Auth = new FlickrAuthInfo(ParseResponse(response, "auth"));

            return Auth;
        }
示例#3
0
 public FlickrUploader(string key, string secret, FlickrAuthInfo auth, FlickrSettings settings)
     : this(key, secret)
 {
     Auth = auth;
     Settings = settings;
 }
示例#4
0
 public FlickrUploader(string key, string secret, FlickrAuthInfo auth, FlickrSettings settings)
     : this(key, secret)
 {
     Auth     = auth;
     Settings = settings;
 }