A modern, fully-featured .NET client library for the Flickr API with comprehensive support for photos, albums, galleries, and user management.
- 🖼️ Photo Management - Upload, download, search, and organize photos
- 📚 Albums & Collections - Create and manage photo albums and collections
- 🎨 Galleries - Browse and interact with Flickr galleries
- 👥 User Management - Access user profiles, contacts, and favorites
- 🔍 Advanced Search - Powerful search capabilities with filtering
- 🏷️ Tags & Metadata - Full support for tags, EXIF data, and metadata
- 🔐 OAuth Authentication - Secure authentication with OAuth 1.0a
- ⚡ Async/Await - Modern async API throughout
- 📦 Strongly Typed - Type-safe API with comprehensive models
- 🔄 Rate Limiting - Built-in rate limit handling
Install via NuGet Package Manager:
dotnet add package Flickr.NetOr via Package Manager Console:
Install-Package Flickr.NetusingFlickr.Net;// Initialize with API keyvarflickr=newFlickrNet("your-api-key","your-api-secret");// OAuth authenticationvarrequestToken=awaitflickr.OAuthGetRequestTokenAsync("oob");varauthUrl=flickr.OAuthCalculateAuthorizationUrl(requestToken.Token,AuthLevel.Read);// Open authUrl in browser, get verification codevaraccessToken=awaitflickr.OAuthGetAccessTokenAsync(requestToken,"verification-code");// Now you're authenticated!varoptions=newPhotoSearchOptions{Text="sunset",Tags="nature,landscape",PerPage=20,Page=1,Extras=PhotoSearchExtras.All};varphotos=awaitflickr.PhotosSearchAsync(options);foreach(varphotoinphotos.Photos){Console.WriteLine($"{photo.Title} by {photo.OwnerName}");Console.WriteLine($"URL: {photo.LargeUrl}");}varuploadOptions=newUploadOptions{Title="My Vacation Photo",Description="Beautiful sunset at the beach",Tags=new[]{"vacation","sunset","beach"},IsPublic=true,IsFamily=false,IsFriend=false};varphotoId=awaitflickr.UploadPictureAsync("path/to/photo.jpg",uploadOptions);Console.WriteLine($"Photo uploaded with ID: {photoId}");varuserId="123456789@N00";// Flickr user IDvarphotos=awaitflickr.PeopleGetPhotosAsync(userId,SafetyLevel.Safe,1,50);foreach(varphotoinphotos.Photos){Console.WriteLine($"{photo.Title} - {photo.DateTaken}");}// Create an albumvaralbumId=awaitflickr.PhotosetsCreateAsync("Vacation 2024","Summer vacation photos","primary-photo-id");// Add photos to albumawaitflickr.PhotosetsAddPhotoAsync(albumId,"photo-id-1");awaitflickr.PhotosetsAddPhotoAsync(albumId,"photo-id-2");// Get album photosvaralbumPhotos=awaitflickr.PhotosetsGetPhotosAsync(albumId);varsearchOptions=newPhotoSearchOptions{UserId="user-id",MinUploadDate=DateTime.Now.AddMonths(-1),MaxUploadDate=DateTime.Now,MediaType=MediaType.Photos,ContentType=ContentType.Photo,SafetyLevel=SafetyLevel.Safe,SortOrder=PhotoSearchSortOrder.DatePostedDesc,PerPage=100,Extras=PhotoSearchExtras.DateUploaded|PhotoSearchExtras.DateTaken|PhotoSearchExtras.Url_O};varresults=awaitflickr.PhotosSearchAsync(searchOptions);// Add to favoritesawaitflickr.FavoritesAddAsync("photo-id");// Get user's favoritesvarfavorites=awaitflickr.FavoritesGetListAsync("user-id",perPage:50);// Remove from favoritesawaitflickr.FavoritesRemoveAsync("photo-id");// Add a commentvarcommentId=awaitflickr.PhotosCommentsAddCommentAsync("photo-id","Great photo!");// Get all commentsvarcomments=awaitflickr.PhotosCommentsGetListAsync("photo-id");// Add a note to a photoawaitflickr.PhotosNotesAddAsync("photo-id",100,100,50,50,"This is a note");varflickr=newFlickrNet("api-key","api-secret"){HttpTimeout=TimeSpan.FromSeconds(30),InstanceCacheDisabled=false};varproxy=newWebProxy("proxy-server:port");flickr.Proxy=proxy;For detailed API documentation, visit:
Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
- .NET 10.0 or higher
- Flickr API key and secret (Get yours here)
This project is licensed under the MIT License - see the LICENSE file for details.
- Original FlickrNet library by Sam Judson
**Built with ❤️ for the .NET