/modules/mod_atom/mod_atom.erl

http://github.com/zotonic/zotonic · Erlang · 36 lines · 11 code · 6 blank · 19 comment · 1 complexity · 138b5764faf4391582409fa0f3b5e610 MD5 · raw file

  1. %% @author Arjan Scherpenisse <arjan@scherpenisse.net>
  2. %% @copyright 2009 Arjan Scherpenisse
  3. %% Date: 2009-10-02
  4. %% @doc Atom support.
  5. %% Copyright 2009 Arjan Scherpenisse
  6. %%
  7. %% Licensed under the Apache License, Version 2.0 (the "License");
  8. %% you may not use this file except in compliance with the License.
  9. %% You may obtain a copy of the License at
  10. %%
  11. %% http://www.apache.org/licenses/LICENSE-2.0
  12. %%
  13. %% Unless required by applicable law or agreed to in writing, software
  14. %% distributed under the License is distributed on an "AS IS" BASIS,
  15. %% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  16. %% See the License for the specific language governing permissions and
  17. %% limitations under the License.
  18. -module(mod_atom).
  19. -author("Arjan Scherpenisse <arjan@scherpenisse.net>").
  20. -mod_title("Atom module").
  21. -mod_description("Provides atom (RFC 4287) representations for resources.").
  22. -mod_prio(1000).
  23. %% interface functions
  24. -export([
  25. observe_content_types_dispatch/3
  26. ]).
  27. -include_lib("zotonic.hrl").
  28. %% Dispatch to the atom representation.
  29. observe_content_types_dispatch(#content_types_dispatch{}, Acc, _Context) ->
  30. [{"application/atom+xml", atom_entry} | Acc].