diff options
author | Evan Prodromou <evan@status.net> | 2010-12-13 14:35:42 -0500 |
---|---|---|
committer | Evan Prodromou <evan@status.net> | 2010-12-13 14:35:42 -0500 |
commit | 027c73a4a1e1509b7cacc6068dacfb4fc778c872 (patch) | |
tree | f0127e35e046836148fd090663e6754db5cbbe37 /actions/apiatomservice.php | |
parent | bb55784e902388f12ae9a0beddf283b48f19531e (diff) | |
parent | 1033e1e5199bd0c5889ecbc915c6b644cff23c10 (diff) |
Merge branch 'activityatompub' into 0.9.x
Diffstat (limited to 'actions/apiatomservice.php')
-rw-r--r-- | actions/apiatomservice.php | 34 |
1 files changed, 33 insertions, 1 deletions
diff --git a/actions/apiatomservice.php b/actions/apiatomservice.php index fb9d6aee8..b60b312fc 100644 --- a/actions/apiatomservice.php +++ b/actions/apiatomservice.php @@ -80,7 +80,8 @@ class ApiAtomServiceAction extends ApiBareAuthAction $this->startXML(); $this->elementStart('service', array('xmlns' => 'http://www.w3.org/2007/app', - 'xmlns:atom' => 'http://www.w3.org/2005/Atom')); + 'xmlns:atom' => 'http://www.w3.org/2005/Atom', + 'xmlns:activity' => 'http://activitystrea.ms/spec/1.0/')); $this->elementStart('workspace'); $this->element('atom:title', null, _('Main')); $this->elementStart('collection', @@ -92,6 +93,37 @@ class ApiAtomServiceAction extends ApiBareAuthAction sprintf(_("%s timeline"), $this->user->nickname)); $this->element('accept', null, 'application/atom+xml;type=entry'); + $this->element('activity:verb', null, ActivityVerb::POST); + $this->elementEnd('collection'); + $this->elementStart('collection', + array('href' => common_local_url('AtomPubSubscriptionFeed', + array('subscriber' => $this->user->id)))); + $this->element('atom:title', + null, + sprintf(_("%s subscriptions"), + $this->user->nickname)); + $this->element('accept', null, 'application/atom+xml;type=entry'); + $this->element('activity:verb', null, ActivityVerb::FOLLOW); + $this->elementEnd('collection'); + $this->elementStart('collection', + array('href' => common_local_url('AtomPubFavoriteFeed', + array('profile' => $this->user->id)))); + $this->element('atom:title', + null, + sprintf(_("%s favorites"), + $this->user->nickname)); + $this->element('accept', null, 'application/atom+xml;type=entry'); + $this->element('activity:verb', null, ActivityVerb::FAVORITE); + $this->elementEnd('collection'); + $this->elementStart('collection', + array('href' => common_local_url('AtomPubMembershipFeed', + array('profile' => $this->user->id)))); + $this->element('atom:title', + null, + sprintf(_("%s memberships"), + $this->user->nickname)); + $this->element('accept', null, 'application/atom+xml;type=entry'); + $this->element('activity:verb', null, ActivityVerb::JOIN); $this->elementEnd('collection'); $this->elementEnd('workspace'); $this->elementEnd('service'); |