View Source Mobilizon.Federation.ActivityStream.Converter.Resource (Mobilizon v4.1.0-alpha.1)

Resource converter.

This module allows to convert resources from ActivityStream format to our own internal one, and back.

Summary

Functions

Converts an AP object data to our internal data structure.

Convert an resource struct to an ActivityStream representation

Functions

Link to this function

as_to_model_data(object)

View Source
@spec as_to_model_data(map()) :: map() | {:error, any()}

Converts an AP object data to our internal data structure.

@spec model_to_as(Mobilizon.Resources.Resource.t()) :: map()

Convert an resource struct to an ActivityStream representation