예제 #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 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);
        }
        /// <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 = SendPostRequest(API_URL, args);

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

            return(this.Auth);
        }
예제 #4
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 = SendPostRequest(API_URL, args);

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

            return Auth;
        }
예제 #5
0
 public FlickrUploader(string key, string secret, FlickrAuthInfo auth, FlickrSettings settings)
     : this(key, secret)
 {
     Auth = auth;
     Settings = settings;
 }
예제 #6
0
 public FlickrUploader(string key, string secret, FlickrAuthInfo auth, FlickrSettings settings)
     : this(key, secret)
 {
     Auth     = auth;
     Settings = settings;
 }