private IList<album> GetAlbums(long uid, List<string> aids, bool isAsync, GetAlbumsCallback callback, Object state)
        {
            var parameterList = new Dictionary<string, string> {{"method", "facebook.photos.getAlbums"}};
            Utilities.AddOptionalParameter(parameterList, "uid", uid);
            Utilities.AddList(parameterList, "aids", aids);

            if (isAsync)
            {
                SendRequestAsync<photos_getAlbums_response, IList<album>>(parameterList, new FacebookCallCompleted<IList<album>>(callback), state, "album");
               return null;
            }

            var response = SendRequest<photos_getAlbums_response>(parameterList);
            return response == null ? null : response.album;
        }
 /// <summary>
 /// Returns metadata about all of the photo albums uploaded by the specified user.
 /// </summary>
 /// <example>
 /// <code>
 /// private static void RunDemoAsync()
 /// {
 ///     Api api = new Api(new DesktopSession(Constants.ApplicationKey, Constants.ApplicationSecret, Constants.ApplicationSecret, Constants.SessionKey));
 ///     api.Photos.GetAlbumsAsync(Constants.UserId, new List&lt;string&gt; {Constants.AlbumId.ToString()}, AsyncDemoCompleted, null);
 /// }
 /// 
 /// private static void AsyncDemoCompleted(IList&lt;album&gt; result, Object state, FacebookException e)
 /// {
 ///     var actual = result;
 /// }
 /// </code>
 /// </example>
 /// <param name="uid">Return albums created by this user.</param>
 /// <param name="aids">Return albums with aids in this list. This is a List of aids. You must specify either uid or aids. The aids parameter has no default value.</param>
 /// <param name="callback">The AsyncCallback delegate</param>
 /// <param name="state">An object containing state information for this asynchronous request</param>        
 /// <returns>This method returns all visible photos satisfying the filters specified. The method can be used to return all photo albums created by a user, query a specific set of albums by a list of aids, or filter on any combination of these two. The album ids returned by this function can be passed in to facebook.photos.get.</returns>
 /// <remarks>It is an error to omit both of the uid and aids parameters. They have no defaults. In this call, an album owned by a user will be returned to an application if that user has not turned off access to the Facbook Platform.</remarks>
 public void GetAlbumsAsync(long uid, List<string> aids, GetAlbumsCallback callback, Object state)
 {
     GetAlbums(uid, aids, true, callback, state);
 }
 /// <summary>
 /// Returns metadata about all of the photo albums uploaded by the specified user.
 /// </summary>
 /// <example>
 /// <code>
 /// private static void RunDemoAsync()
 /// {
 ///     Api api = new Api(new DesktopSession(Constants.ApplicationKey, Constants.ApplicationSecret, Constants.ApplicationSecret, Constants.SessionKey));
 ///     api.Photos.GetAlbumsAsync(Constants.UserId, AsyncDemoCompleted, null);
 /// }
 /// 
 /// private static void AsyncDemoCompleted(IList&lt;album&gt; result, Object state, FacebookException e)
 /// {
 ///     var actual = result;
 /// }
 /// </code>
 /// </example>
 /// <param name="uid">Return albums created by this user.</param>
 /// <param name="callback">The AsyncCallback delegate</param>
 /// <param name="state">An object containing state information for this asynchronous request</param>        
 /// <returns>This method returns all visible photos satisfying the filters specified. The method can be used to return all photo albums created by a user, query a specific set of albums by a list of aids, or filter on any combination of these two. The album ids returned by this function can be passed in to facebook.photos.get.</returns>
 /// <remarks>It is an error to omit both of the uid and aids parameters. They have no defaults. In this call, an album owned by a user will be returned to an application if that user has not turned off access to the Facbook Platform.</remarks>
 public void GetAlbumsAsync(long uid, GetAlbumsCallback callback, Object state)
 {
     GetAlbumsAsync(uid, null, callback, state);
 }
 /// <summary>
 /// Returns metadata about all of the photo albums uploaded by the specified user.
 /// </summary>
 /// <example>
 /// <code>
 /// private static void RunDemoAsync()
 /// {
 ///     Api api = new Api(new DesktopSession(Constants.ApplicationKey, Constants.ApplicationSecret, Constants.ApplicationSecret, Constants.SessionKey));
 ///     api.Photos.GetAlbumsAsync(new List&lt;string&gt; {Constants.AlbumId.ToString()}, AsyncDemoCompleted, null);
 /// }
 /// 
 /// private static void AsyncDemoCompleted(IList&lt;album&gt; result, Object state, FacebookException e)
 /// {
 ///     var actual = result;
 /// }
 /// </code>
 /// </example>
 /// <param name="aids">Return albums with aids in this list. This is a List of aids. You must specify either uid or aids. The aids parameter has no default value.</param>
 /// <param name="callback">The AsyncCallback delegate</param>
 /// <param name="state">An object containing state information for this asynchronous request</param>        
 /// <returns>This method returns all visible photos satisfying the filters specified. The method can be used to return all photo albums created by a user, query a specific set of albums by a list of aids, or filter on any combination of these two. The album ids returned by this function can be passed in to facebook.photos.get.</returns>
 /// <remarks>It is an error to omit both of the uid and aids parameters. They have no defaults. In this call, an album owned by a user will be returned to an application if that user has not turned off access to the Facbook Platform.</remarks>
 public void GetAlbumsAsync(List<string> aids, GetAlbumsCallback callback, Object state)
 {
     GetAlbumsAsync(0, aids, callback, state);
 }
 /// <summary>
 /// Returns metadata about all of the photo albums uploaded by the specified user.
 /// </summary>
 /// <example>
 /// <code>
 /// private static void RunDemoAsync()
 /// {
 ///     Api api = new Api(new DesktopSession(Constants.ApplicationKey, Constants.ApplicationSecret, Constants.ApplicationSecret, Constants.SessionKey));
 ///     api.Photos.GetAlbumsAsync(AsyncDemoCompleted, null);
 /// }
 /// 
 /// private static void AsyncDemoCompleted(IList&lt;album&gt; result, Object state, FacebookException e)
 /// {
 ///     var actual = result;
 /// }
 /// </code>
 /// </example>
 /// <param name="callback">The AsyncCallback delegate</param>
 /// <param name="state">An object containing state information for this asynchronous request</param>        
 /// <returns>This method returns all visible photos satisfying the filters specified. The method can be used to return all photo albums created by a user, query a specific set of albums by a list of aids, or filter on any combination of these two. The album ids returned by this function can be passed in to facebook.photos.get.</returns>
 /// <remarks>It is an error to omit both of the uid and aids parameters. They have no defaults. In this call, an album owned by a user will be returned to an application if that user has not turned off access to the Facbook Platform.</remarks>
 public void GetAlbumsAsync(GetAlbumsCallback callback, Object state)
 {
     GetAlbumsAsync(Session.UserId, null, callback, state);
 }