mirror of
https://git.friendi.ca/friendica/friendica.git
synced 2025-06-17 02:05:19 +02:00
Merge pull request #2216 from fabrixxm/feature-api-like
Works on API and a small refractor, updated docs
This commit is contained in:
commit
99861b9fa6
10 changed files with 1436 additions and 850 deletions
21
view/templates/api_photo_detail_xml.tpl
Normal file
21
view/templates/api_photo_detail_xml.tpl
Normal file
|
@ -0,0 +1,21 @@
|
|||
|
||||
<photo>
|
||||
<id>{{$photo.id}}</id>
|
||||
<created>{{$photo.created}}</created>
|
||||
<edited>{{$photo.edited}}</edited>
|
||||
<title>{{$photo.title}}</title>
|
||||
<desc>{{$photo.desc}}</desc>
|
||||
<album>{{$photo.album}}</album>
|
||||
<filename>{{$photo.filename}}</filename>
|
||||
<type>{{$photo.type}}</type>
|
||||
<height>{{$photo.height}}</height>
|
||||
<width>{{$photo.width}}</width>
|
||||
<datasize>{{$photo.datasize}}</datasize>
|
||||
<profile>1</profile>
|
||||
<links type="array">{{foreach $photo.link as $scale => $url}}
|
||||
<link type="{{$photo.type}}" scale="{{$scale}}" href="{{$url}}" />
|
||||
{{/foreach}}</links>
|
||||
{{if $photo.data}}
|
||||
<data encode="base64">{{$photo.data}}</data>
|
||||
{{/if}}
|
||||
</photo>
|
5
view/templates/api_photos_list_xml.tpl
Normal file
5
view/templates/api_photos_list_xml.tpl
Normal file
|
@ -0,0 +1,5 @@
|
|||
|
||||
<photos type="array">
|
||||
{{foreach $photos as $photo}}
|
||||
<photo id="{{$photo.id}}" album="{{$photo.album}}" filename="{{$photo.filename}}" type="{{$photo.type}}">{{$photo.thumb}}</photo>
|
||||
{{/foreach}}</photos>
|
|
@ -1,5 +1,7 @@
|
|||
|
||||
<statuses type="array" xmlns:statusnet="http://status.net/schema/api/1/">
|
||||
<statuses type="array"
|
||||
xmlns:statusnet="http://status.net/schema/api/1/"
|
||||
xmlns:friendica="http://friendi.ca/schema/api/1/">
|
||||
{{foreach $statuses as $status}} <status>
|
||||
<text>{{$status.text}}</text>
|
||||
<truncated>{{$status.truncated}}</truncated>
|
||||
|
@ -17,5 +19,8 @@
|
|||
<coordinates>{{$status.coordinates}}</coordinates>
|
||||
<place>{{$status.place}}</place>
|
||||
<contributors>{{$status.contributors}}</contributors>
|
||||
<friendica:activities>{{foreach $status.friendica_activities as $k=>$v}}
|
||||
<friendica:{{$k}}>{{$v}}</friendica:{{$k}}>
|
||||
{{/foreach}}</friendica:activities>
|
||||
</status>
|
||||
{{/foreach}}</statuses>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue