aboutsummaryrefslogtreecommitdiff
path: root/glifestream/templates/stream.json
blob: 90227da0794b709cf52b349c4102fd3183a8e8ba (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
{% load gls_filters %}{% if callback %}{{ callback }}({% endif %}{
  "title": "{% firstof page.title "Lifestream" %}",
  "updated": "{{ page.updated|gls_hdate }}",
  "generator": "gLifestream",
  "id": "{{ page.taguri }}",
  "icon": "{{ page.icon }}",
  "author": {"name": "{{ page.author_name }}"},
  "link": [
    {"rel": "self", "type": "application/json", "href": "{{ page.site_url }}{% url 'index' %}?format=json"},{% if page.start %}
    {"rel": "previous", "type": "application/json", "href": "{{ page.site_url }}{% url 'index' %}{{ page.urlparams }}start={{ page.start }}&format=json"},{% endif %}
    {"rel": "alternate", "type": "text/html", "href": "{{ page.site_url }}{% url 'index' %}"}
  ],
  "entries": [
{% for entry in entries %}
     {
       "id": "{{ entry.guid }}",
{% if entry.author_name %}       "author": {"name": {{ entry.author_name|encode_json }}{% if entry.author_email %}, "email": "{{ entry.author_email }}"{% endif %}{% if entry.author_uri %}, "uri": "{{ entry.author_uri }}"{% endif %}},{% endif %}
       "category": {"term": "{{ entry.service.cls }}"},
       "updated": "{{ entry.date_published|gls_hdate }}",
       "link": [{"rel": "alternate", "type": "text/html", "href": "{{ entry.gls_absolute_link }}"}{% if entry.link_image %}, {"rel": "image", "href": "{{ entry.link_image|gls_media }}"}{% endif %}],{% if entry.geolat and entry.geolng %}
       "geolat": "{{ entry.geolat }}",
       "geolng": "{{ entry.geolng }}",
{% endif %}
       "title": {{ entry|gls_title:entry|encode_json }},
       "content": {% ifnotequal entry.service.display "title" %}{{ entry|gls_content:entry|encode_json }}{% else %}null{% endifnotequal %}
     }{% if not forloop.last %},{% endif %}
{% endfor %}
  ]
}{% if callback %});{% endif %}

Return to:

Send suggestions and report system problems to the System administrator.