Flickrex.Flickr.Machinetags (flickrex v0.8.1) View Source
Link to this section Summary
Functions
Return a list of unique namespaces, optionally limited by a given predicate, in alphabetical order.
Return a list of unique namespace and predicate pairs, optionally limited by predicate or namespace, in alphabetical order.
Return a list of unique predicates, optionally limited by a given namespace.
Fetch recently used (or created) machine tags values.
Return a list of unique values for a namespace and predicate.
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
Return a list of unique namespaces, optionally limited by a given predicate, in alphabetical order.
This method does not require authentication.
Options
predicate- Limit the list of namespaces returned to those that have the following predicate.per_page- Number of photos to return per page. If this argument is omitted, it defaults to 100. The maximum allowed value is 500.page- The page of results to return. If this argument is omitted, it defaults to 1.
Example response
%{
"namespaces" => %{
"namespace" => [
%{"_content" => "aero", "predicates" => "13", "usage" => "6538"},
%{"_content" => "flickr", "predicates" => "24", "usage" => "9072"},
%{"_content" => "geo", "predicates" => "35", "usage" => "670270"},
%{"_content" => "taxonomy", "predicates" => "36", "usage" => "23903"},
%{"_content" => "upcoming", "predicates" => "4", "usage" => "50449"}
],
"page" => "1",
"pages" => "1",
"perpage" => "500",
"total" => "5"
},
"stat" => "ok"
} Specs
Return a list of unique namespace and predicate pairs, optionally limited by predicate or namespace, in alphabetical order.
This method does not require authentication.
Options
namespace- Limit the list of pairs returned to those that have the following namespace.predicate- Limit the list of pairs returned to those that have the following predicate.per_page- Number of photos to return per page. If this argument is omitted, it defaults to 100. The maximum allowed value is 500.page- The page of results to return. If this argument is omitted, it defaults to 1.
Example response
%{
"pairs" => %{
"page" => "1",
"pages" => "3",
"pair" => [
%{
"_content" => "aero:airline",
"namespace" => "aero",
"predicate" => "airline",
"usage" => "1093"
},
%{
"_content" => "aero:icao",
"namespace" => "aero",
"predicate" => "icao",
"usage" => "4"
},
%{
"_content" => "aero:model",
"namespace" => "aero",
"predicate" => "model",
"usage" => "1026"
},
%{
"_content" => "aero:tail",
"namespace" => "aero",
"predicate" => "tail",
"usage" => "1048"
}
],
"perpage" => "500",
"total" => "1228"
},
"stat" => "ok"
} Specs
Return a list of unique predicates, optionally limited by a given namespace.
This method does not require authentication.
Options
namespace- Limit the list of predicates returned to those that have the following namespace.per_page- Number of photos to return per page. If this argument is omitted, it defaults to 100. The maximum allowed value is 500.page- The page of results to return. If this argument is omitted, it defaults to 1.
Example response
%{
"predicates" => %{
"page" => "1",
"pages" => "1",
"perpage" => "500",
"predicate" => [
%{"_content" => "elbow", "namespaces" => "1", "usage" => "20"},
%{"_content" => "face", "namespaces" => "2", "usage" => "52"},
%{"_content" => "hand", "namespaces" => "1", "usage" => "10"}
],
"total" => "3"
},
"stat" => "ok"
} Specs
Fetch recently used (or created) machine tags values.
This method does not require authentication.
Options
namespace- A namespace that all values should be restricted to.predicate- A predicate that all values should be restricted to.added_since- Only return machine tags values that have been added since this timestamp, in epoch seconds.
Example response
%{
"stat" => "ok",
"values" => %{
"namespace" => "taxonomy",
"page" => "1",
"pages" => "1",
"perpage" => "500",
"predicate" => "common",
"total" => "500",
"value" => %{
"_content" => "maui chaff flower",
"first_added" => "1244232796",
"last_added" => "1244232796",
"namespace" => "taxonomy",
"predicate" => "common",
"usage" => "4"
}
}
} Specs
Return a list of unique values for a namespace and predicate.
This method does not require authentication.
Arguments
namespace- The namespace that all values should be restricted to.predicate- The predicate that all values should be restricted to.
Options
per_page- Number of photos to return per page. If this argument is omitted, it defaults to 100. The maximum allowed value is 500.page- The page of results to return. If this argument is omitted, it defaults to 1.
Example response
%{
"stat" => "ok",
"values" => %{
"namespace" => "upcoming",
"page" => "1",
"pages" => "1",
"perpage" => "500",
"predicate" => "event",
"total" => "3",
"value" => [
%{"_content" => "123", "usage" => "3"},
%{"_content" => "456", "usage" => "1"},
%{"_content" => "789", "usage" => "147"}
]
}
}