aboutsummaryrefslogtreecommitdiffstats
path: root/include/api.php
Commit message (Collapse)AuthorAgeFilesLines
* some improvements in api direct messagesfriendica2014-12-221-4/+9
|
* direct messages in api have some issues, not properly ported from friendica ↵friendica2014-12-221-9/+10
| | | | | | originally. Here's a start. I think at best they may return encrypted gibberish currently, but let's work through them one at a time.
* PostgreSQL support initial commitHabeas Codice2014-11-131-14/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There were 11 main types of changes: - UPDATE's and DELETE's sometimes had LIMIT 1 at the end of them. This is not only non-compliant but it would certainly not do what whoever wrote it thought it would. It is likely this mistake was just copied from Friendica. All of these instances, the LIMIT 1 was simply removed. - Bitwise operations (and even some non-zero int checks) erroneously rely on MySQL implicit integer-boolean conversion in the WHERE clauses. This is non-compliant (and bad programming practice to boot). Proper explicit boolean conversions were added. New queries should use proper conventions. - MySQL has a different operator for bitwise XOR than postgres. Rather than add yet another dba_ func, I converted them to "& ~" ("AND NOT") when turning off, and "|" ("OR") when turning on. There were no true toggles (XOR). New queries should refrain from using XOR when not necessary. - There are several fields which the schema has marked as NOT NULL, but the inserts don't specify them. The reason this works is because mysql totally ignores the constraint and adds an empty text default automatically. Again, non-compliant, obviously. In these cases a default of empty text was added. - Several statements rely on a non-standard MySQL feature (http://dev.mysql.com/doc/refman/5.5/en/group-by-handling.html). These queries can all be rewritten to be standards compliant. Interestingly enough, the newly rewritten standards compliant queries run a zillion times faster, even on MySQL. - A couple of function/operator name translations were needed (RAND/RANDOM, GROUP_CONCAT/STRING_AGG, UTC_NOW, REGEXP/~, ^/#) -- assist functions added in the dba_ - INTERVALs: postgres requires quotes around the value, mysql requires that there are not quotes around the value -- assist functions added in the dba_ - NULL_DATE's -- Postgres does not allow the invalid date '0000-00-00 00:00:00' (there is no such thing as year 0 or month 0 or day 0). We use '0001-01-01 00:00:00' for postgres. Conversions are handled in Zot/item packets automagically by quoting all dates with dbescdate(). - char(##) specifications in the schema creates fields with blank spaces that aren't trimmed in the code. MySQL apparently treats char(##) as varchar(##), again, non-compliant. Since postgres works better with text fields anyway, this ball of bugs was simply side-stepped by using 'text' datatype for all text fields in the postgres schema. varchar was used in a couple of places where it actually seemed appropriate (size constraint), but without rigorously vetting that all of the PHP code actually validates data, new bugs might come out from under the rug. - postgres doesn't store nul bytes and a few other non-printables in text fields, even when quoted. bytea fields were used when storing binary data (photo.data, attach.data). A new dbescbin() function was added to handle this transparently. - postgres does not support LIMIT #,# syntax. All databases support LIMIT # OFFSET # syntax. Statements were updated to be standard. These changes require corresponding changes in the coding standards. Please review those before adding any code going forward. Still on my TODO list: - remove quotes from non-reserved identifiers and make reserved identifiers use dba func for quoting - Rewrite search queries for better results (both MySQL and Postgres)
* API: xchan get/createfriendica2014-10-231-0/+12
|
* jsonp support (thankxs fabrixxm)friendica2014-10-161-1/+4
|
* optionally include wall items (posts) in import/exportfriendica2014-09-251-2/+2
|
* red group/collection query calls for apifriendica2014-09-111-0/+33
|
* api - foreach warningsfriendica2014-08-141-10/+15
|
* allow channel login to the api, just like with the cloudfriendica2014-08-101-4/+24
|
* little fixes of hopefully nil significancefriendica2014-03-161-10/+4
|
* this is the correct fixfriendica2014-03-161-2/+2
|
* API: statusnet_html:trim was trimming too muchChristian Vogeley2014-03-151-1/+2
|
* Red API: /api/red/item/new ; which is like /api/statuses/update except it ↵friendica2014-03-041-0/+48
| | | | uses Red semantics and returns success/failure indication.
* some tweaks to items_fetch for the apifriendica2014-01-251-17/+16
|
* Merge pull request #284 from cvogeley/masterfriendica2014-01-251-19/+37
|\ | | | | API changes
| * Check user_info['self] in api user_timelineChristian Vogeley2014-01-251-4/+13
| |
| * remove wall restrictionChristian Vogeley2014-01-251-2/+1
| | | | | | | | original didn’t have that
| * API My wall postsChristian Vogeley2014-01-251-18/+28
| |
* | fix api/red/photos when supplied with an album namefriendica2014-01-221-1/+1
|/
* split off mod_connections into mod_connections & mod_connedit - lots of ↵friendica2013-12-181-1/+2
| | | | links to fix
* synchronise deletion of comments between red and wpfriendica2013-11-281-0/+10
|
* delete from the wp side as well as from the red sidefriendica2013-11-261-11/+27
|
* api fixesfriendica2013-11-261-4/+12
|
* replaced rhash icontuscanhobbit2013-11-231-2/+2
|
* oauth wasn't logging in properly, also fixed api status_show to return last ↵friendica2013-10-151-3/+5
| | | | public post, not the last private post
* more work on viewing obscured api postsfriendica2013-09-161-3/+5
|
* use prepare_body in api calls to properly render content, add 'mode' to ↵friendica2013-09-161-7/+7
| | | | conversation templates so that themes can use the module context to suppress or show comments as desired
* several oauth fixes - shred doesn't completely work yet, but it also doesn't ↵friendica2013-09-161-3/+8
| | | | completely NOT work, so at least there's some improvement
* fix media uploads in api (specifically friendica for android)friendica2013-07-251-3/+11
|
* use (numeric) abook_id for friends/followers in Twitter API. Many existing ↵friendica2013-07-181-7/+7
| | | | clients won't be able to handle xchans. Save those for the Red specific API.
* update friends/followers API so Friendica Android client won't chokefriendica2013-07-171-5/+5
|
* add photos and albums enumeration to Red API (will allow us to export either ↵friendica2013-05-291-0/+18
| | | | all our photos or individual albums using a script)
* zidify img links, delay notifier until actually published for time ↵friendica2013-05-271-1/+5
| | | | travelling posts
* use http_authorization header with nginxfriendica2013-05-231-0/+10
|
* and the obligatory typofriendica2013-05-221-0/+1
|
* add api/red/channel/stream POST method (post_activity_item()), add ↵friendica2013-05-221-0/+12
| | | | additional endpoint to channel export to api/red/channel/export/basic
* It's a red matrix, and matrix is better indicated by # than by ! - and would ↵friendica2013-05-111-2/+2
| | | | otherwise be similar to the Diaspora 5-pointed asterisk except that Red's has no center.
* turn all Red links into zrls (not the old zrls, the new bbcode zrl which ↵friendica2013-04-151-1/+1
| | | | means we can zidify them)
* more cleanupfriendica2013-04-141-1/+1
|
* begin to cut the umbilicalfriendica2013-04-141-4/+4
|
* rename 'uri' (and parent_uri) to 'mid' (and parent_mid) since these no ↵friendica2013-03-211-6/+6
| | | | longer remotely resemble uri's and are actually message_id's. This change is potentially destabilising because it touches a lot of code and structure. But it has to get done and there's no better time than the present.
* .friendica2013-03-101-1/+1
|
* start formatting for Doxygenfriendica2013-02-251-1/+1
|
* fix con"n"nectionsOliver2013-02-021-1/+1
|
* sort out yet more api functionsfriendica2013-01-201-26/+35
|
* preserve event item[uri] if presentfriendica2013-01-201-9/+22
|
* more heavy lifting on API - though need to re-visit events and give them all ↵friendica2013-01-191-36/+23
| | | | message_ids from the origination site.
* more hard slogging on the apifriendica2013-01-191-131/+108
|
* provide other ways to export the basic infofriendica2013-01-161-34/+2
|
* api/export/basic - how we'll migrate youfriendica2013-01-161-0/+51
|