Example #1
0
        /// <summary>
        /// Bookmarks this gfy using the specified bookmark folder
        /// </summary>
        /// <param name="folder"></param>
        /// <param name="options">The options for this request</param>
        /// <returns></returns>
        public async Task BookmarkAsync(BookmarkFolder folder = null, RequestOptions options = null)
        {
            await Client.ApiClient.BookmarkGfyAsync(Id, folder?.Id, options).ConfigureAwait(false);

            await UpdateAsync().ConfigureAwait(false);

            await(folder?.UpdateAsync()).ConfigureAwait(false);
        }
Example #2
0
        /// <summary>
        /// Moves the specified gfys to another bookmark folder
        /// </summary>
        /// <param name="folderToMoveTo"></param>
        /// <param name="gfysToMove"></param>
        /// <param name="options"></param>
        /// <returns></returns>
        public async Task MoveGfysAsync(BookmarkFolder folderToMoveTo, IEnumerable <Gfy> gfysToMove, RequestOptions options = null)
        {
            await Client.ApiClient.MoveBookmarkedGfysAsync(Id, new API.GfyFolderAction()
            {
                Action = "move_contents", GfycatIds = gfysToMove.Select(g => g.Id), ParentId = folderToMoveTo.Id
            }, options).ConfigureAwait(false);

            await UpdateAsync(options).ConfigureAwait(false);

            await folderToMoveTo.UpdateAsync().ConfigureAwait(false);
        }