コード例 #1
0
ファイル: User.cs プロジェクト: darocha/Photobucket.NET
      internal static User CreateFromXmlDocument(XmlNode userNode)
      {
         User user = new User("username");

         user.ParseFromXmlNode(userNode);

         return user;
      }
コード例 #2
0
 public MediaItemList GetAllUsersImageMedia(ref User user)
 {
    user.SetImageMediaList = GetAllUsersImageMedia(user.Username);
    return user.ImageMediaList;
 }
コード例 #3
0
 public MediaItemList GetAllUsersVideoMedia(ref User user)
 {
    user.SetVideoMediaList = GetAllUsersVideoMedia(user.Username);
    return user.VideoMediaList;
 }
コード例 #4
0
      /// <summary>
      /// Requests the token and secret for the user that logged in
      /// </summary>
      public UserToken RequestUserToken()
      {
         if (!AppAuthorized)
         {
            throw ( new PhotobucketApiException( "App Not Authorized" ) );
         }

         string userTokenUrl = OAuth.GenerateURL( _apiUrl, _userTokenUrl, _userTokenMethod, _consumerToken );

         ResponseMessage userTokenResponseMessage = GetResponseMessageFromUrl( userTokenUrl, _userTokenMethod );

         _userToken = OAuth.GetUserTokenFromResponse( userTokenResponseMessage.ResponseString );
         _userLoggedOn = true;
         _appAuthorized = false;
         _consumerToken = null;
         _currentUser = new User(_userToken.Username);
         
         return _userToken;
      }