Siftsciex v0.3.1 Siftsciex.Event.Payload.Image View Source
An image for Sift Science
Link to this section Summary
Functions
Creates a new Siftsciex.Event.Payload.Image.t/0
struct for use in an Event Payload
Link to this section Types
Link to this type
t()
View Source
t() :: %Siftsciex.Event.Payload.Image{ "$description": Siftsciex.Event.Payload.payload_string(), "$link": Siftsciex.Event.Payload.payload_string(), "$md5_hash": Siftsciex.Event.Payload.payload_string() }
Link to this section Functions
Creates a new Siftsciex.Event.Payload.Image.t/0
struct for use in an Event Payload.
Parameters
data
: The image data, this should be in the form of aSiftsciex.Event.Payload.Image.data/0
map
Examples
iex> Image.new(%{md5: "5", link: "https://example.com", description: "Image"})
%Image{"$md5_hash": "5", "$link": "https://example.com", "$description": "Image"}
iex> Image.new([%{md5: "5", link: "https://example.com"}, %{md5: "6", description: "Image"}])
[%Image{"$md5_hash": "5", "$link": "https://example.com"}, %Image{"$md5_hash": "6", "$description": "Image"}]