PageRenderTime 19ms CodeModel.GetById 13ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

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