Flickrex.Flickr.Stats (flickrex v0.8.1) View Source
Link to this section Summary
Functions
Get a list of referring domains for a collection
Get a list of referrers from a given domain to a collection
Get the number of views on a collection for a given date.
Returns a list of URLs for text files containing <i>all</i> your stats data (from November 26th 2007 onwards) for the currently auth'd user.
Get a list of referring domains for a photo
Get a list of referrers from a given domain to a photo
Get the number of views, comments and favorites on a photo for a given date.
Get a list of referring domains for a photoset
Get a list of referrers from a given domain to a photoset
Get the number of views on a photoset for a given date.
Get a list of referring domains for a photostream
Get a list of referrers from a given domain to a user's photostream
Get the number of views on a user's photostream for a given date.
List the photos with the most views, comments or favorites
Get the overall view counts for an account
Link to this section Types
Specs
arg() :: String.Chars.t()
Specs
operation() :: Flickrex.Operation.Rest.t()
Specs
opts() :: Flickrex.Rest.args()
Link to this section Functions
Specs
Get a list of referring domains for a collection
This method requires authentication with "read" permission.
Arguments
date- Stats will be returned for this date. This should be in either be in YYYY-MM-DD or unix timestamp format. 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.
Options
collection_id- The id of the collection to get stats for. If not provided, stats for all collections will be returned.per_page- Number of domains to return per page. If this argument is omitted, it defaults to 25. The maximum allowed value is 100.page- The page of results to return. If this argument is omitted, it defaults to 1.
Example response
%{
"domains" => %{
"domain" => [
%{"name" => "images.search.yahoo.com", "views" => "127"},
%{"name" => "flickr.com", "views" => "122"},
%{"name" => "images.google.com", "views" => "70"}
],
"page" => "1",
"pages" => "1",
"perpage" => "25",
"total" => "3"
},
"stat" => "ok"
} Specs
Get a list of referrers from a given domain to a collection
This method requires authentication with "read" permission.
Arguments
date- Stats will be returned for this date. This should be in either be in YYYY-MM-DD or unix timestamp format. 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.domain- The domain to return referrers for. This should be a hostname (eg: "flickr.com") with no protocol or pathname.
Options
collection_id- The id of the collection to get stats for. If not provided, stats for all collections will be returned.per_page- Number of referrers to return per page. If this argument is omitted, it defaults to 25. The maximum allowed value is 100.page- The page of results to return. If this argument is omitted, it defaults to 1.
Example response
%{
"domain" => %{
"name" => "flickr.com",
"page" => "1",
"pages" => "1",
"perpage" => "25",
"referrer" => [
%{"url" => "http://flickr.com/", "views" => "11"},
%{"url" => "http://flickr.com/photos/friends/", "views" => "8"},
%{
"searchterm" => "stats api",
"url" => "http://flickr.com/search/?q=stats+api",
"views" => "2"
}
],
"total" => "3"
},
"stat" => "ok"
} Specs
Get the number of views on a collection for a given date.
This method requires authentication with "read" permission.
Arguments
date- Stats will be returned for this date. This should be in either be in YYYY-MM-DD or unix timestamp format. 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.collection_id- The id of the collection to get stats for.
Example response
%{"stat" => "ok", "stats" => %{"views" => "24"}} Specs
Returns a list of URLs for text files containing <i>all</i> your stats data (from November 26th 2007 onwards) for the currently auth'd user.
Please note, these files will only be available until June 1, 2010 Noon PDT.For more information <a href="/help/stats/#1369409">please check out this FAQ</a>, or just <a href="/photos/me/stats/downloads/">go download your files</a>.
This method requires authentication with "read" permission.
Example response
%{
"stat" => "ok",
"stats" => %{
"csvfiles" => %{
"_content" => "....\n ",
"csv" => [
%{
"date" => "2010-04-01",
"href" => "http://farm4.static.flickr.com/3496/stats/72157623902771865_faaa.csv",
"type" => "daily"
},
%{
"date" => "2010-04-01",
"href" => "http://farm4.static.flickr.com/3376/stats/72157624027152370_fbbb.csv",
"type" => "monthly"
},
%{
"date" => "2010-03-01",
"href" => "http://farm5.static.flickr.com/4006/stats/72157623627769689_fccc.csv",
"type" => "daily"
}
]
}
}
} Specs
Get a list of referring domains for a photo
This method requires authentication with "read" permission.
Arguments
date- Stats will be returned for this date. This should be in either be in YYYY-MM-DD or unix timestamp format. 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.
Options
photo_id- The id of the photo to get stats for. If not provided, stats for all photos will be returned.per_page- Number of domains to return per page. If this argument is omitted, it defaults to 25. The maximum allowed value is 100.page- The page of results to return. If this argument is omitted, it defaults to 1.
Example response
%{
"domains" => %{
"domain" => [
%{"name" => "images.search.yahoo.com", "views" => "127"},
%{"name" => "flickr.com", "views" => "122"},
%{"name" => "images.google.com", "views" => "70"}
],
"page" => "1",
"pages" => "1",
"perpage" => "25",
"total" => "3"
},
"stat" => "ok"
} Specs
Get a list of referrers from a given domain to a photo
This method requires authentication with "read" permission.
Arguments
date- Stats will be returned for this date. This should be in either be in YYYY-MM-DD or unix timestamp format. 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.domain- The domain to return referrers for. This should be a hostname (eg: "flickr.com") with no protocol or pathname.
Options
photo_id- The id of the photo to get stats for. If not provided, stats for all photos will be returned.per_page- Number of referrers to return per page. If this argument is omitted, it defaults to 25. The maximum allowed value is 100.page- The page of results to return. If this argument is omitted, it defaults to 1.
Example response
%{
"domain" => %{
"name" => "flickr.com",
"page" => "1",
"pages" => "1",
"perpage" => "25",
"referrer" => [
%{"url" => "http://flickr.com/", "views" => "11"},
%{"url" => "http://flickr.com/photos/friends/", "views" => "8"},
%{
"searchterm" => "stats api",
"url" => "http://flickr.com/search/?q=stats+api",
"views" => "2"
}
],
"total" => "3"
},
"stat" => "ok"
} Specs
Get the number of views, comments and favorites on a photo for a given date.
This method requires authentication with "read" permission.
Arguments
date- Stats will be returned for this date. This should be in either be in YYYY-MM-DD or unix timestamp format. 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.photo_id- The id of the photo to get stats for.
Example response
%{
"stat" => "ok",
"stats" => %{"comments" => "4", "favorites" => "1", "views" => "24"}
} Specs
Get a list of referring domains for a photoset
This method requires authentication with "read" permission.
Arguments
date- Stats will be returned for this date. This should be in either be in YYYY-MM-DD or unix timestamp format. 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.
Options
photoset_id- The id of the photoset to get stats for. If not provided, stats for all sets will be returned.per_page- Number of domains to return per page. If this argument is omitted, it defaults to 25. The maximum allowed value is 100.page- The page of results to return. If this argument is omitted, it defaults to 1.
Example response
%{
"domains" => %{
"domain" => [
%{"name" => "images.search.yahoo.com", "views" => "127"},
%{"name" => "flickr.com", "views" => "122"},
%{"name" => "images.google.com", "views" => "70"}
],
"page" => "1",
"pages" => "1",
"perpage" => "25",
"total" => "3"
},
"stat" => "ok"
} Specs
Get a list of referrers from a given domain to a photoset
This method requires authentication with "read" permission.
Arguments
date- Stats will be returned for this date. This should be in either be in YYYY-MM-DD or unix timestamp format. 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.domain- The domain to return referrers for. This should be a hostname (eg: "flickr.com") with no protocol or pathname.
Options
photoset_id- The id of the photoset to get stats for. If not provided, stats for all sets will be returned.per_page- Number of referrers to return per page. If this argument is omitted, it defaults to 25. The maximum allowed value is 100.page- The page of results to return. If this argument is omitted, it defaults to 1.
Example response
%{
"domain" => %{
"name" => "flickr.com",
"page" => "1",
"pages" => "1",
"perpage" => "25",
"referrer" => [
%{"url" => "http://flickr.com/", "views" => "11"},
%{"url" => "http://flickr.com/photos/friends/", "views" => "8"},
%{
"searchterm" => "stats api",
"url" => "http://flickr.com/search/?q=stats+api",
"views" => "2"
}
],
"total" => "3"
},
"stat" => "ok"
} Specs
Get the number of views on a photoset for a given date.
This method requires authentication with "read" permission.
Arguments
date- Stats will be returned for this date. This should be in either be in YYYY-MM-DD or unix timestamp format. 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.photoset_id- The id of the photoset to get stats for.
Example response
%{"stat" => "ok", "stats" => %{"comments" => "1", "views" => "24"}} Specs
Get a list of referring domains for a photostream
This method requires authentication with "read" permission.
Arguments
date- Stats will be returned for this date. This should be in either be in YYYY-MM-DD or unix timestamp format. 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.
Options
per_page- Number of domains to return per page. If this argument is omitted, it defaults to 25. The maximum allowed value is 100page- The page of results to return. If this argument is omitted, it defaults to 1.
Example response
%{
"domains" => %{
"domain" => [
%{"name" => "images.search.yahoo.com", "views" => "127"},
%{"name" => "flickr.com", "views" => "122"},
%{"name" => "images.google.com", "views" => "70"}
],
"page" => "1",
"pages" => "1",
"perpage" => "25",
"total" => "3"
},
"stat" => "ok"
} Specs
Get a list of referrers from a given domain to a user's photostream
This method requires authentication with "read" permission.
Arguments
date- Stats will be returned for this date. This should be in either be in YYYY-MM-DD or unix timestamp format. 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.domain- The domain to return referrers for. This should be a hostname (eg: "flickr.com") with no protocol or pathname.
Options
per_page- Number of referrers to return per page. If this argument is omitted, it defaults to 25. The maximum allowed value is 100.page- The page of results to return. If this argument is omitted, it defaults to 1.
Example response
%{
"domain" => %{
"name" => "flickr.com",
"page" => "1",
"pages" => "1",
"perpage" => "25",
"referrer" => [
%{"url" => "http://flickr.com/", "views" => "11"},
%{"url" => "http://flickr.com/photos/friends/", "views" => "8"},
%{
"searchterm" => "stats api",
"url" => "http://flickr.com/search/?q=stats+api",
"views" => "2"
}
],
"total" => "3"
},
"stat" => "ok"
} Specs
Get the number of views on a user's photostream for a given date.
This method requires authentication with "read" permission.
Arguments
date- Stats will be returned for this date. This should be in either be in YYYY-MM-DD or unix timestamp format. 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.
Example response
%{"stat" => "ok", "stats" => %{"views" => "24"}} Specs
List the photos with the most views, comments or favorites
This method requires authentication with "read" permission.
Options
date- Stats will be returned for this date. This should be in either be in YYYY-MM-DD or unix timestamp format. 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. If no date is provided, all time view counts will be returned.sort- The order in which to sort returned photos. Defaults to views. The possible values are views, comments and favorites. Other sort options are available through <a href="https://www.flickr.com/services/api/flickr.photos.search.html">flickr.photos.search</a>.per_page- Number of referrers to return per page. If this argument is omitted, it defaults to 25. The maximum allowed value is 100.page- The page of results to return. If this argument is omitted, it defaults to 1.
Example response
%{
"photos" => %{
"page" => "2",
"pages" => "89",
"perpage" => "10",
"photo" => [
%{
"id" => "2636",
"isfamily" => "0",
"isfriend" => "0",
"ispublic" => "1",
"owner" => "47058503995@N01",
"secret" => "a123456",
"server" => "2",
"stats" => %{"comments" => "18", "favorites" => "2", "views" => "941"},
"title" => "test_04"
},
%{
"id" => "2635",
"isfamily" => "1",
"isfriend" => "1",
"ispublic" => "0",
"owner" => "47058503995@N01",
"secret" => "b123456",
"server" => "2",
"stats" => %{"comments" => "1", "favorites" => "2", "views" => "141"},
"title" => "test_03"
}
],
"total" => "881"
},
"stat" => "ok"
} Specs
Get the overall view counts for an account
This method requires authentication with "read" permission.
Options
date- Stats will be returned for this date. This should be in either be in YYYY-MM-DD or unix timestamp format. 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. If no date is provided, all time view counts will be returned.
Example response
%{
"stat" => "ok",
"stats" => %{
"collections" => %{"views" => "0"},
"photos" => %{"views" => "386"},
"photostream" => %{"views" => "72"},
"sets" => %{"views" => "11"},
"total" => %{"views" => "469"}
}
}