/// <summary> /// Returns the number of views on the given date for the given collection. Only <see cref="Stats.Views"/> will be populated. /// </summary> /// <param name="date">The date to return stats for.</param> /// <param name="collectionId">The collection to return stats for.</param> /// <returns>The stats. Only <see cref="Stats.Views"/> will be populated.</returns> public Stats StatsGetCollectionStats(DateTime date, string collectionId) { CheckRequiresAuthentication(); Dictionary <string, string> parameters = new Dictionary <string, string>(); parameters.Add("method", "flickr.stats.getCollectionStats"); parameters.Add("date", UtilityMethods.DateToUnixTimestamp(date)); parameters.Add("collection_id", UtilityMethods.CleanCollectionId(collectionId)); return(GetResponseCache <Stats>(parameters)); }
/// <summary> /// Returns the number of views on the given date for the given collection. Only <see cref="Stats.Views"/> will be populated. /// </summary> /// <param name="date">The date to return stats for.</param> /// <param name="collectionId">The collection to return stats for.</param> /// <param name="callback">Callback method to call upon return of the response from Flickr.</param> public void StatsGetCollectionStatsAsync(DateTime date, string collectionId, Action <FlickrResult <Stats> > callback) { CheckRequiresAuthentication(); Dictionary <string, string> parameters = new Dictionary <string, string>(); parameters.Add("method", "flickr.stats.getCollectionStats"); parameters.Add("date", UtilityMethods.DateToUnixTimestamp(date)); parameters.Add("collection_id", UtilityMethods.CleanCollectionId(collectionId)); GetResponseAsync <Stats>(parameters, callback); }
/// <summary> /// Get a list of referring domains for a collection. /// </summary> /// <param name="date">Stats will be returned for this date. A day according to Flickr Stats starts at midnight GMT for all users, and timestamps will automatically be rounded down to the start of the day.</param> /// <param name="collectionId">The id of the collection to get stats for. If not provided, stats for all collections will be returned.</param> /// <param name="page">The page of results to return. If this argument is omitted, it defaults to 1.</param> /// <param name="perPage">Number of domains to return per page. If this argument is omitted, it defaults to 25. The maximum allowed value is 100.</param> /// <returns></returns> public StatDomainCollection StatsGetCollectionDomains(DateTime date, string collectionId, int page, int perPage) { CheckRequiresAuthentication(); Dictionary <string, string> parameters = new Dictionary <string, string>(); parameters.Add("method", "flickr.stats.getCollectionDomains"); parameters.Add("date", UtilityMethods.DateToUnixTimestamp(date)); if (!String.IsNullOrEmpty(collectionId)) { parameters.Add("collection_id", UtilityMethods.CleanCollectionId(collectionId)); } if (page > 0) { parameters.Add("page", page.ToString(System.Globalization.NumberFormatInfo.InvariantInfo)); } if (perPage > 0) { parameters.Add("per_page", perPage.ToString(System.Globalization.NumberFormatInfo.InvariantInfo)); } return(GetResponseCache <StatDomainCollection>(parameters)); }