Flickrex.Flickr.Tags (flickrex v0.8.1) View Source
Link to this section Summary
Functions
Returns the first 24 photos for a given tag cluster
Gives you a list of tag clusters for the given tag.
Returns a list of hot tags for the given period.
Get the tag list for a given photo.
Get the tag list for a given user (or the currently logged in user).
Get the popular tags for a given user (or the currently logged in user).
Get the raw versions of a given tag (or all tags) for the currently logged-in user.
Returns a list of most frequently used tags for a user.
Returns a list of tags 'related' to the given tag, based on clustered usage analysis.
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
Returns the first 24 photos for a given tag cluster
This method does not require authentication.
Arguments
tag- The tag that this cluster belongs to.cluster_id- The top three tags for the cluster, separated by dashes (just like the url).
Specs
Gives you a list of tag clusters for the given tag.
This method does not require authentication.
Arguments
tag- The tag to fetch clusters for.
Example response
%{
"clusters" => %{
"cluster" => [
%{
"tag" => [
%{"_content" => "farm"},
%{"_content" => "animals"},
%{"_content" => "cattle"}
],
"total" => "3"
},
%{
"tag" => [
%{"_content" => "green"},
%{"_content" => "landscape"},
%{"_content" => "countryside"}
],
"total" => "3"
}
],
"source" => "cows",
"total" => "2"
},
"stat" => "ok"
} Specs
Returns a list of hot tags for the given period.
This method does not require authentication.
Options
period- The period for which to fetch hot tags. Valid values are <code>day</code> and <code>week</code> (defaults to <code>day</code>).count- The number of tags to return. Defaults to 20. Maximum allowed value is 200.
Example response
%{
"hottags" => %{
"count" => "6",
"period" => "day",
"tag" => [
%{"_content" => "northerncalifornia", "score" => "20"},
%{"_content" => "top20", "score" => "18"},
%{"_content" => "keychain", "score" => "15"},
%{"_content" => "zb", "score" => "10"},
%{"_content" => "selfportraittuesday", "score" => "9"},
%{"_content" => "jan06", "score" => "4"}
]
},
"stat" => "ok"
} Specs
Get the tag list for a given photo.
This method does not require authentication.
Arguments
photo_id- The id of the photo to return tags for.
Example response
%{
"photo" => %{
"id" => "2619",
"tags" => %{
"tag" => [
%{
"_content" => "tag1",
"author" => "12037949754@N01",
"authorname" => "Bees",
"id" => "156",
"raw" => "tag 1"
},
%{
"_content" => "tag2",
"author" => "12037949754@N01",
"authorname" => "Bees",
"id" => "157",
"raw" => "tag 2"
}
]
}
},
"stat" => "ok"
} Specs
Get the tag list for a given user (or the currently logged in user).
This method does not require authentication.
Options
user_id- The NSID of the user to fetch the tag list for. If this argument is not specified, the currently logged in user (if any) is assumed.
Example response
%{
"stat" => "ok",
"who" => %{
"id" => "12037949754@N01",
"tags" => %{
"tag" => [
%{"_content" => "gull"},
%{"_content" => "tag1"},
%{"_content" => "tag2"},
%{"_content" => "tags"},
%{"_content" => "test"}
]
}
}
} Specs
Get the popular tags for a given user (or the currently logged in user).
This method does not require authentication.
Options
user_id- The NSID of the user to fetch the tag list for. If this argument is not specified, the currently logged in user (if any) is assumed.count- Number of popular tags to return. defaults to 10 when this argument is not present.
Example response
%{
"stat" => "ok",
"who" => %{
"id" => "12037949754@N01",
"tags" => %{
"tag" => [
%{"_content" => "bar", "count" => "10"},
%{"_content" => "foo", "count" => "11"},
%{"_content" => "gull", "count" => "147"},
%{"_content" => "tags", "count" => "3"},
%{"_content" => "test", "count" => "3"}
]
}
}
} Specs
Get the raw versions of a given tag (or all tags) for the currently logged-in user.
This method does not require authentication.
Options
tag- The tag you want to retrieve all raw versions for.
Example response
%{
"stat" => "ok",
"who" => %{
"id" => "12037949754@N01",
"tags" => %{
"tag" => %{
"clean" => "foo",
"raw" => [
%{"_content" => "foo"},
%{"_content" => "Foo"},
%{"_content" => "f:oo"}
]
}
}
}
} Specs
Returns a list of most frequently used tags for a user.
This method requires authentication with "read" permission.
Example response
%{
"stat" => "ok",
"who" => %{
"id" => "30135021@N05",
"tags" => %{
"tag" => [
%{"_content" => "blah", "count" => "1"},
%{"_content" => "publicdomain", "count" => "5"}
]
}
}
}