Logo Search packages:      
Sourcecode: f-spot version File versions  Download package

FlickrNet::Flickr Class Reference

List of all members.


Detailed Description

The main Flickr class.

Create an instance of this class and then call its methods to perform methods on Flickr.

FlickrNet.Flickr flickr = new FlickrNet.Flickr();
          User user = flickr.PeopleFindByEmail("cal@iamcal.com");
          Console.WriteLine("User Id is " + u.UserId);

Definition at line 24 of file Flickr.cs.


Public Member Functions

string AuthCalcUrl (string frob, AuthLevel authLevel)
 Calculates the URL to redirect the user to Flickr web site for authentication. Used by desktop application. See AuthGetFrob for example code.
string AuthCalcWebUrl (AuthLevel authLevel)
 Calculates the URL to redirect the user to Flickr web site for auehtntication. Used by Web applications. See AuthGetFrob for example code.
Auth AuthCheckToken (string token)
 Checks a authentication token with the flickr service to make sure it is still valid.
string AuthGetFrob ()
 Retrieve a temporary FROB from the Flickr service, to be used in redirecting the user to the Flickr web site for authentication. Only required for desktop authentication.
Auth AuthGetToken (string frob)
 After the user has authenticated your application on the flickr web site call this method with the FROB (either stored from AuthGetFrob or returned in the URL from the Flickr web site) to get the users token.
Blogs BlogGetList ()
 Gets a list of blogs that have been set up by the user. Requires authentication.
bool BlogPostPhoto (int blogId, int photoId, string title, string description, string blogPassword)
 Posts a photo already uploaded to a blog. Requires authentication.
bool BlogPostPhoto (int blogId, int photoId, string title, string description)
 Posts a photo already uploaded to a blog. Requires authentication.
Contacts ContactsGetList ()
 Gets a list of contacts for the logged in user. Requires authentication.
Contacts ContactsGetPublicList (string userId)
 Gets a list of the given users contact, or those that are publically avaiable.
System.IO.Stream DownloadPicture (string url)
 Downloads the picture from a internet and transfers it to a stream object.
bool FavoritesAdd (string photoId)
 Adds a photo to the logged in favourites. Requires authentication.
Photos FavoritesGetList (string userId, int perPage, int page)
 Get a list of favourites for the specified user.
Photos FavoritesGetList (string userId)
 Get a list of favourites for the specified user.
Photos FavoritesGetList (int perPage, int page)
 Get a list of the currently logger in users favourites. Requires authentication.
Photos FavoritesGetList ()
 Get a list of the currently logger in users favourites. Requires authentication.
Photos FavoritesGetPublicList (string userId, int perPage, int page)
 Gets the public favourites for a specified user.
Photos FavoritesGetPublicList (string userId)
 Gets the public favourites for a specified user.
bool FavoritesRemove (string photoId)
 Removes a photograph from the logged in users favourites. Requires authentication.
 Flickr (string apiKey, string sharedSecret, string token)
 Create a new instance of the Flickr class with the email address and password given.
 Flickr (string apiKey, string sharedSecret)
 Creates a new instance of the Flickr class with an API key and a Shared Secret. This is only useful really useful for calling the Auth functions as all other authenticationed methods also require the API Token.
 Flickr (string apiKey)
 Create a new instance of the Flickr class with no authentication.
 Flickr ()
 Constructor loads configuration settings from app.config or web.config file if they exist.
void FlushCache (string url)
 Clears the cache for a particular URL.
void FlushCache ()
 Clears the cache completely.
void ForceCacheSave ()
 Forces the Cache to save to disk.
PictureCacheItem[] GetCachePictures ()
 Provides static access to the list of cached photos.
bool GroupPoolAdd (string photoId, string groupId)
 Adds a photo to a pool you have permission to add photos to.
Context GroupPoolGetContext (string photoId, string groupId)
 Gets the context for a photo from within a group. This provides the id and thumbnail url for the next and previous photos in the group.
PoolGroups GroupPoolGetGroups ()
 Gets a list of.
Photos GroupPoolGetPhotos (string groupId, string tags, int perPage, int page)
 Gets a list of photos for a given group.
Photos GroupPoolGetPhotos (string groupId, int perPage, int page)
 Gets a list of photos for a given group.
Photos GroupPoolGetPhotos (string groupId, string tags)
 Gets a list of photos for a given group.
Photos GroupPoolGetPhotos (string groupId)
 Gets a list of photos for a given group.
bool GroupPoolRemove (string photoId, string groupId)
 Remove a picture from a group.
Category GroupsBrowse (long catId)
 Returns the Category specified by the category id with a list of sub-categories and groups.
Category GroupsBrowse ()
 Returns the top Category with a list of sub-categories and groups. (The top category does not have any groups in it but others may).
ActiveGroups GroupsGetActiveList ()
 Returns a list of currently active groups.
GroupInfo GroupsGetInfo (string groupId)
 Returns a GroupInfo object containing details about a group.
string NotesAdd (string photoId, int noteX, int noteY, int noteWidth, int noteHeight, string noteText)
 Add a note to a picture.
void NotesDelete (string noteId)
 Delete an existing note.
void NotesEdit (string noteId, int noteX, int noteY, int noteWidth, int noteHeight, string noteText)
 Edit and update a note.
User PeopleFindByEmail (string emailAddress)
 Used to fid a flickr users details by specifying their email address.
User PeopleFindByUsername (string username)
 Returns a User object matching the screen name.
Person PeopleGetInfo (string userId)
 Gets the Person object for the given user id.
Online PeopleGetOnlineList ()
 Get a list of people online in Flickr Live. Obsolete now.
PoolGroups PeopleGetPublicGroups (string userId)
 Get a list of public groups for a user.
Photos PeopleGetPublicPhotos (string userId)
 Gets a users public photos. Excludes private photos.
void PhotosAddTags (string photoId, string tags)
 Add a selection of tags to a photo.
void PhotosAddTags (string photoId, string[] tags)
 Add a selection of tags to a photo.
Photos PhotoSearch (PhotoSearchOptions options)
void PhotosetsAddPhoto (string photosetId, string photoId)
Photoset PhotosetsCreate (string title, string description, string primaryPhotoId)
Photoset PhotosetsCreate (string title, string primaryPhotoId)
bool PhotosetsDelete (string photosetId)
void PhotosetsDeletePhoto (string photosetId, string photoId)
bool PhotosetsEditMeta (string photosetId, string title, string description)
bool PhotosetsEditPhotos (string photosetId, string primaryPhotoId, string photoIds)
bool PhotosetsEditPhotos (string photosetId, string primaryPhotoId, string[] photoIds)
Context PhotosetsGetContext (string photoId, string photosetId)
 Gets the context of the specified photo within the photoset.
Photoset PhotosetsGetInfo (string photosetId)
Photosets PhotosetsGetList (string userId)
Photosets PhotosetsGetList ()
Photoset PhotosetsGetPhotos (string photosetId)
bool PhotosetsOrderSets (string photosetIds)
bool PhotosetsOrderSets (string[] photosetIds)
AllContexts PhotosGetAllContexts (string photoId)
 Get all the contexts (group, set and photostream 'next' and 'previous' pictures) for a photo.
Photos PhotosGetContactsPhotos (long count, bool justFriends, bool singlePhoto, bool includeSelf)
 Gets your contacts most recent photos.
Photos PhotosGetContactsPhotos (long count)
 Gets the most recent photos from your contacts.
Photos PhotosGetContactsPhotos ()
 Gets the most recent 10 photos from your contacts.
Photos PhotosGetContactsPublicPhotos (string userId, long count, bool justFriends, bool singlePhoto, bool includeSelf)
Photos PhotosGetContactsPublicPhotos (string userId, long count)
Photos PhotosGetContactsPublicPhotos (string userId)
Context PhotosGetContext (string photoId)
PhotoCounts PhotosGetCounts (string dates)
PhotoCounts PhotosGetCounts (DateTime[] dates)
 Returns count of photos between each pair of dates in the list.
ExifPhoto PhotosGetExif (string photoId, string secret)
ExifPhoto PhotosGetExif (string photoId)
 Gets the EXIF data for a given Photo ID.
PhotoInfo PhotosGetInfo (string photoId, string secret)
PhotoInfo PhotosGetInfo (string photoId)
Photos PhotosGetNotInSet (int perPage, int page, PhotoSearchExtras extras)
 Gets a list of a users photos which are not in a set.
Photos PhotosGetNotInSet (int perPage, int page)
 Gets a specific page of the list of photos which are not in sets. Defaults to include all extra fields.
Photos PhotosGetNotInSet (int page)
 Gets a specific page of the list of photos which are not in sets. Defaults to include all extra fields.
Photos PhotosGetNotInSet ()
 Gets a list of photos not in sets. Defaults to include all extra fields.
PhotoPermissions PhotosGetPerms (string photoId)
Photos PhotosGetRecent (long perPage, long page)
Photos PhotosGetRecent ()
Sizes PhotosGetSizes (string photoId)
Photos PhotosGetUntagged (int perPage, int page)
Photos PhotosGetUntagged ()
Licenses PhotosLicensesGetInfo ()
 Gets a list of all current licenses.
bool PhotosRemoveTag (long tagId)
 Remove an existing tag.
Photos PhotosSearch (string userId, string tags, TagMode tagMode, string text, DateTime minUploadDate, DateTime maxUploadDate, int license, int perPage, int page, PhotoSearchExtras extras)
Photos PhotosSearch (string userId, string tags, TagMode tagMode, string text, PhotoSearchExtras extras)
Photos PhotosSearch (string userId, string tags, TagMode tagMode, string text)
Photos PhotosSearch (string userId, string tags, TagMode tagMode, string text, int perPage, int page, PhotoSearchExtras extras)
Photos PhotosSearch (string userId, string tags, TagMode tagMode, string text, int perPage, int page)
Photos PhotosSearch (string userId, string tags, int license, PhotoSearchExtras extras)
Photos PhotosSearch (string userId, string tags, int license)
Photos PhotosSearch (string userId, string tags, PhotoSearchExtras extras)
Photos PhotosSearch (string userId, string tags)
Photos PhotosSearch (string tags, TagMode tagMode, string text, PhotoSearchExtras extras)
Photos PhotosSearch (string tags, TagMode tagMode, string text)
Photos PhotosSearch (string tags, TagMode tagMode, string text, int perPage, int page, PhotoSearchExtras extras)
Photos PhotosSearch (string tags, TagMode tagMode, string text, int perPage, int page)
Photos PhotosSearch (string tags, int license)
Photos PhotosSearch (string tags, int license, PhotoSearchExtras extras)
Photos PhotosSearch (string userId, string[] tags, TagMode tagMode, string text, DateTime minUploadDate, DateTime maxUploadDate, int license, int perPage, int page)
Photos PhotosSearch (string userId, string[] tags, TagMode tagMode, string text, DateTime minUploadDate, DateTime maxUploadDate, int license, int perPage, int page, PhotoSearchExtras extras)
Photos PhotosSearch (string userId, string[] tags, TagMode tagMode, string text, PhotoSearchExtras extras)
Photos PhotosSearch (string userId, string[] tags, TagMode tagMode, string text)
Photos PhotosSearch (string userId, string[] tags, TagMode tagMode, string text, int perPage, int page, PhotoSearchExtras extras)
Photos PhotosSearch (string userId, string[] tags, TagMode tagMode, string text, int perPage, int page)
Photos PhotosSearch (string userId, string[] tags, int license, PhotoSearchExtras extras)
Photos PhotosSearch (string userId, string[] tags, int license)
Photos PhotosSearch (string userId, string[] tags, PhotoSearchExtras extras)
Photos PhotosSearch (string userId, string[] tags)
Photos PhotosSearch (string[] tags, TagMode tagMode, string text, PhotoSearchExtras extras)
Photos PhotosSearch (string[] tags, TagMode tagMode, string text)
Photos PhotosSearch (string[] tags, TagMode tagMode, string text, int perPage, int page, PhotoSearchExtras extras)
Photos PhotosSearch (string[] tags, TagMode tagMode, string text, int perPage, int page)
Photos PhotosSearch (string[] tags, int license)
Photos PhotosSearch (string[] tags, int license, PhotoSearchExtras extras)
Photos PhotosSearch (string[] tags)
Photos PhotosSearch (string[] tags, PhotoSearchExtras extras)
Photos PhotosSearchText (string text, int license, PhotoSearchExtras extras)
Photos PhotosSearchText (string text, int license)
Photos PhotosSearchText (string text)
Photos PhotosSearchText (string text, PhotoSearchExtras extras)
Photos PhotosSearchText (string userId, string text, int license, PhotoSearchExtras extras)
Photos PhotosSearchText (string userId, string text, int license)
Photos PhotosSearchText (string userId, string text, PhotoSearchExtras extras)
Photos PhotosSearchText (string userId, string text)
bool PhotosSetDates (string photoId, DateTime datePosted, DateTime dateTaken, DateGranularity granularity)
bool PhotosSetDates (string photoId, DateTime datePosted)
bool PhotosSetDates (string photoId, DateTime dateTaken, DateGranularity granularity)
bool PhotosSetMeta (string photoId, string title, string description)
 Sets the title and description of the photograph.
bool PhotosSetPerms (string photoId, bool isPublic, bool isFriend, bool isFamily, PermissionComment permComment, PermissionAddMeta permAddMeta)
bool PhotosSetPerms (string photoId, int isPublic, int isFriend, int isFamily, PermissionComment permComment, PermissionAddMeta permAddMeta)
bool PhotosSetTags (string photoId, string tags)
bool PhotosSetTags (string photoId, string[] tags)
PhotoInfo TagsGetListPhoto (string photoId)
WhoInfo TagsGetListUser (string userId)
WhoInfo TagsGetListUser ()
WhoInfo TagsGetListUserPopular (string userId, long count)
WhoInfo TagsGetListUserPopular (string userId)
WhoInfo TagsGetListUserPopular (int count)
WhoInfo TagsGetListUserPopular ()
PhotoInfoTags TagsGetRelated (string tag)
XmlElement[] TestEcho (string echoParameter, string echoValue)
 Runs the flickr.test.echo method and returned an array of XmlElement items.
User TestLogin ()
 Test the logged in state of the current Filckr object.
string UploadPicture (string filename, string title, string description, string tags, bool isPublic, bool isFamily, bool isFriend)
 Uploads a file to Flickr.
string UploadPicture (string filename, string title, string description, string tags)
 Uploads a file to Flickr.
string UploadPicture (string filename, string title, string description)
 Uploads a file to Flickr.
string UploadPicture (string filename, string title)
 Uploads a file to Flickr.
string UploadPicture (string filename)
 Uploads a file to Flickr.
delegate void UploadProgressHandler (object sender, UploadProgressEventArgs e)
GroupInfo UrlsGetGroup (string groupId)
User UrlsGetUserPhotos (string userId)
User UrlsGetUserProfile (string userId)
GroupInfo UrlsLookupGroup (string urlToFind)
User UrlsLookupUser (string urlToFind)

Static Public Member Functions

static bool AuthenticationTest (string email, string password)
 No longer supported.

Properties

string ApiKey [get, set]
 Get or set the API Key to be used by all calls. API key is mandatory for all calls to Flickr.
string ApiSecret [get, set]
 API shared secret is required for all calls that require signing, which includes all methods that require authentication, as well as the actual flickr.auth.* calls.
string ApiToken [get, set]
 The API token is required for all calls that require authentication. A FlickrException will be raised by Flickr if the API token is not set when required.
long CacheSizeLimit [get, set]
 CacheSizeLimit is the cache file size in bytes for downloaded pictures. The default is 50MB (or 50 * 1024 * 1025 in bytes).
TimeSpan CacheTimeout [get, set]
 All GET calls to Flickr are cached by the Flickr.Net API. Set the CacheTimeout to determine how long these calls should be cached (make this as long as possible!).
int HttpTimeout [get, set]
 Internal timeout for all web requests in milliseconds. Defaults to 30 seconds.
bool IsAuthenticated [get]
 Checks to see if a shared secret and an api token are stored in the object. Does not check if these values are valid values.
string LastRequest [get]
 Returns the last URL requested. Includes API signing.
string LastResponse [get]
 Returns the raw XML returned from the last response. Only set it the response was not returned from cache.
WebProxy Proxy [get, set]
 You can set the WebProxy or alter its properties. It defaults to your internet explorer proxy settings.

Events

UploadProgressHandler OnUploadProgress
 UploadProgressHandler is fired during a synchronous upload process to signify that a segment of uploading has been completed. This is approximately 50 bytes. The total uploaded is recorded in the UploadProgressEventArgs class.

Private Member Functions

Stream DoDownloadPicture (string url)
 Download a picture (or anything else actually).
string DoGetResponse (string url)
 A private method which performs the actual HTTP web request if the details are not found within the cache.
Response GetResponse (NameValueCollection parameters, TimeSpan cacheTimeout)
Response GetResponseAlwaysCache (NameValueCollection parameters)
Response GetResponseCache (NameValueCollection parameters)
Response GetResponseNoCache (NameValueCollection parameters)
string Md5Hash (string unhashed)
string UploadPicture (string filename, Stream stream, string title, string description, string tags, int isPublic, int isFamily, int isFriend)
 Private method that does all the uploading work.

Static Private Member Functions

static Response Deserialize (string responseString)
 Converts the response string (in XML) into the Response object.

Private Attributes

string _apiKey
string _apiToken
const string _authUrl = "http://www.flickr.com/tools/auth.gne"
const string _baseUrl = "http://www.flickr.com/services/rest/"
string _lastRequest
string _lastResponse
WebProxy _proxy = WebProxy.GetDefaultProxy()
string _sharedSecret
int _timeout = 30000
const string _uploadUrl = "http://www.flickr.com/services/upload/"
const string UserAgent = "Mozilla/4.0 FlickrNet API (compatible; MSIE 6.0; Windows NT 5.1)"

Static Private Attributes

static XmlSerializer _responseSerializer = new XmlSerializer(typeof(FlickrNet.Response))
static XmlSerializer _uploaderSerializer = new XmlSerializer(typeof(FlickrNet.Uploader))

The documentation for this class was generated from the following file:

Generated by  Doxygen 1.6.0   Back to index