Phylopic
Phylopic._get_uuids_at_page Method
_get_uuids_at_page(query, page)
This function is an internal helped function to return an array of pairs, wherein each pair maps a name to a UUID, for a given query and page. These outpurs are collected in a dictionary by Phylopic.names
.
Phylopic.attribution Method
Phylopic.attribution(uuid::UUIDs.UUID)
Generates a string for the attribution of an image, as identified by its uuid
. This string is markdown-formatted, and will include a link to the license.
Phylopic.autocomplete Method
Phylopic.autocomplete(query::AbstractString)
Performs an autocomplete query based on a string, which must be at least two characters in length.
This function will return an array of strings, which can be empty if there are no matches. In you want to do things depending on the values returned, check them with isempty
, not isnothing
.
The output of this function, when not empty, can be passed to either Phylopic.nodes
or Phylopic.images
using their filter_name
keyword argument. Note that the filter_name
argument accepts a single name, not an array of names.
Phylopic.available_resolutions Method
Phylopic.available_resolutions(uuid::UUIDs.UUID)
Returns the available resolutions for a raster image given its UUID. The resolutions are given as a string, and can be passed as a second argument to the Phylopic.raster
function. As the raster sizes can be different, there is no default argument to Phylopic.raster, and the first image will be used instead.
Phylopic.imagesof Method
imagesof(name::AbstractString; items=1, attribution=false, sharealike=false, nocommercial=false)
Returns a mapping between names and UUIDs of images for a given text (see also Phylopic.autocomplete
to find relevant names). By default, the search will return images that come without BY, SA, and NC clauses (i.e. public domain dedication), but this can be changed using the keyword arguments.
items
: Default to 1 : Specifies the number of items to return. When a single item is returned, it is return as a pair mapping the name to the UUID; when there are more than 1, they are returned as a dictionary
attribution
: Default to false
: Specifies whether the images returned require attribution to the creator
sharealike
: Default to false
: Specifies whether the images returned require sharing of derived products using a license with a SA clause
nocommercial
: Default to false
: Specifies whether the images returned are prevented from being used in commercial projects
Phylopic.ping Method
Phylopic.ping()
This function will perform a simple ping of the API, and return nothing
if it is responding, and throw and ErrorException
(containing the string "not responding"
) if the API does not returns a 204 No Content
success status.
Phylopic.raster Method
Phylopic.raster(uuid::UUIDs.UUID, resl)
Returns the URL to an image in raster format, at the given resolution. Available resolutions for any image can be obtained with Phylopic.available_resolutions
.
Phylopic.raster Method
Phylopic.raster(uuid::UUIDs.UUID)
Returns the URL to an image in raster format when no resolution is specified. In this case, the first (usually the largest) image will be returned.
Phylopic.thumbnail Method
Phylopic.thumbnail(uuid::UUIDs.UUID; resolution=192)
Returns the URL (if it exists) to the thumbnails for the silhouette. The thumbnail resolution
can be 64
, 128
, or 192
(the default).
Phylopic.twitterimage Method
Phylopic.twitterimage(uuid::UUIDs.UUID)
Returns the twitter image for a UUID.
Phylopic.vector Method
Phylopic.vector(uuid::UUIDs.UUID)
Returns the URL (if it exists) to the original vector image for the silhouette. Note that the image must be identified by its UUID, not by a string.