Commit Graph

33 Commits

Author SHA1 Message Date
Mikael Nordfeldth
29d0871e5a Making many of the API actions more consistent with coding style
clientError and serverError exit after they're done so no need for
break or return. Also, $this->format is default.

We also got rid of the incredibly verbose version of $this->isPost()
which was spread all over the place.

Not all of this cleaning up is done yet.
2013-10-15 03:07:40 +02:00
Mikael Nordfeldth
34a6624452 Qvitter API changes (thanks hannes2peer)
I implemented changes from quitter.se's new API that their front-end qvitter
uses, https://github.com/hannesmannerheim/qvitter/blob/master/api-changes-1.1.1/CHANGES

However I left out the URL shortening commens, since I believe whatever behaviour
they experienced that caused them to implement this was a bug (or many) and should
be fixed in their proper areas and that shortening should not be entirely left
out in API calls.
2013-10-06 21:51:50 +02:00
Evan Prodromou
cf2457f03f correct link for apitimelinegroup 2011-09-18 17:33:25 -04:00
Evan Prodromou
20396ce8e1 ActivityStreamJSONDocument served as application/stream+json 2011-06-23 11:38:46 -04:00
Zach Copley
68017392ff Make other timeline API endpoints output Activity Streams JSON 2011-02-18 15:43:40 -08:00
Evan Prodromou
ab92496ddc Stop using <activity:subject> for atom feeds 2010-12-27 10:03:34 -08:00
Siebrand Mazeland
04ae500749 * i18n/L10n fixes.
* translator documentation updated.
* superfluous whitespace removed.
2010-10-28 01:21:21 +02:00
Brion Vibber
64cdbe6c55 Ticket #2750: fixes to HTTP caching behavior across login/logout boundaries
* now ignoring if-modified-since if we failed an etag if-none-match comparison, per spec
* now including a hash of user id/nickname in most etags, so we'll update the view properly after login/logout

For API methods, checking the API-auth'ed user. (Many change results to include things like 'you're subscribed to this user' or 'this is one of your favorites', so user info is again needed)

There'll still be some last-modified stamps that aren't including user info properly, probably.
2010-09-20 13:42:58 -07:00
Zach Copley
0faa988e91 Fix for issue ID 2290: make sure errors are returned in the right
format, and use callback for errors when the request is JSONP
2010-07-29 20:31:22 +00:00
Craig Andrews
6317f7d92b Assigning my copyrights to the Free Software Foundation 2010-05-27 18:27:33 -04:00
Zach Copley
c5b61078e1 Pass auth user into Atom feed generators (needed for outputting favorited status in statusnet:notice_info tag) 2010-05-27 13:49:23 -07:00
Siebrand Mazeland
166c1edba9 Fix inconsistencies in clientError() messages
* use correct punctuation
* single quotes when replace was possible
* wording updated when needed
2010-04-09 16:11:20 -07:00
Zach Copley
e1537d8387 More generalized method for calculating Atom rel="self" links 2010-03-12 01:40:52 +00:00
Zach Copley
212b20e876 Add self link to user and group rss2 feeds 2010-03-11 23:43:03 +00:00
Brion Vibber
9fadf8da11 Put all required field setup into AtomUserNoticeFeed and AtomGroupNoticeFeed, consolidating some code. (RSS feeds pulling title, logo etc from the Atom data structure so we don't dupe it.)
OStatus now calling the feed classes directly instead of faking a call into the API, should be less flakey.
2010-03-03 16:33:20 -08:00
Brion Vibber
c04c8ae59a quick fix: skip notice from unused variable on group atom feed generation 2010-03-03 13:00:09 -08:00
Brion Vibber
6b134ae4c7 Dropped deprecated timestamp-based 'since' parameter for all API methods. When it sneaks in it can cause some very slow queries due to mismatches with the indexing.
Twitter removed 'since' support some time ago, and we've already removed it from the public timeline, so it shouldn't be missed.
2010-03-02 11:54:02 -08:00
Zach Copley
792f0942f7 Fix atom feed IDs in user and group atom feeds 2010-02-25 18:13:06 -08:00
Brion Vibber
d410df0406 OStatus group delivery initial implementation.
- added rel="ostatus:attention" links for group delivery
- added events for plugins to override group profile/permalink pages
- pulled Notice::saveGroups up to save-time so we can override;
  it's relatively cheap and gives us a clean list of target
  groups for distrib time even with customized delivery.
- fixed notice::getGroups to return group objects as expected
- added some doc on new parameters to Notice::saveNew
 - 'groups' list of group IDs to push to in place of parsing
- messages that come in via PuSH and contain local group targets
  are delivered to local group members
- messages that come in via PuSH and contain remote group targets
  are delivered to local members of the remote group

Todo:
- handle group posts that only come through Salmon
- handle conflicts in case something comes in both through Salmon and PuSH
- better source verification
- need a cleaner interface to look up groups by URI
- need a way to handle remote groups with conflicting names
2010-02-23 00:44:45 +00:00
Evan Prodromou
f3b08461bd Change to use TagURI::base() instead of common_config()
I changed the way that tag: URIs are minted, so we now use the right
base. Ideally most of these would use HTTP URIs instead, but for
now at least they use the right base.
2010-02-20 13:31:20 -05:00
Zach Copley
f3a82e787c Add OStatus PuSH hub and Salmon links back into user and group feeds 2010-02-12 19:02:27 -08:00
Zach Copley
506c2d7491 Initial upgraded Atom output for group timelines 2010-02-12 12:24:29 -08:00
Brion Vibber
8449256817 OStatus partial support for group subscriptions:
* detection of group feeds is currently a nasty hack based on presence of '/groups/' in URL -- should use some property on the feed?
* listing for the remote group is kinda cruddy; needs to be named more cleanly
* still need to establish per-author profiles (easier once we have the updated Atom code in)
* group delivery probably not right yet
* saving of group messages still triggering some weird behavior

Added support for since_id and max_id on group timeline feeds as a free extra. Enjoy!
2010-02-09 18:32:52 -08:00
Siebrand Mazeland
4af6b7f5c3 Lots of tiny message changes.
* Mostly punctuation updates so that the same message is used consistently in all of StatusNet.
* Some cases of "Title Case" removed, because that does not appear to be used consistently.
2010-01-10 12:26:24 +01:00
Hue Bastard
59e5958d3a ticket 2055: added logos to Atom and RSS feeds 2009-12-11 16:15:22 -08:00
Eric Helgeson
e14c88f6c5 Consistant error for groups that dont exist in API 2009-11-16 15:00:36 -05:00
Zach Copley
1ef1f59fe8 Fix for Ticket #1957 - API methods are not accessible when site is private (0.8->0.9 regression) 2009-11-04 22:03:41 -08:00
Zach Copley
870b091693 Added in credits. 2009-10-12 16:36:00 -07:00
Zach Copley
061af8fa06 CamelCase all function names in the API code 2009-10-09 17:53:35 -07:00
Zach Copley
b08d16ef2b These same params are used in most API actions; moved to base API class 2009-10-09 17:32:53 -07:00
Zach Copley
559918826a Remove more redundant $formats 2009-10-09 17:11:40 -07:00
Zach Copley
bb08611def Delete action/api.php and rename lib/twitterapi.php to lib/api.php 2009-10-09 14:22:18 -07:00
Zach Copley
170b009865 New action for group timelines via API 2009-10-06 17:26:45 -07:00