aboutsummaryrefslogtreecommitdiffstats
path: root/mediagoblin/api
Commit message (Collapse)AuthorAgeFilesLines
* Fix some unused imports and local variables.Ben Sturmfels2021-09-231-4/+5
|
* Apply pyupgrade --py36-plus.Ben Sturmfels2021-09-231-20/+20
| | | | This removes some 'u' prefixes and converts simple format() calls to f-strings.
* Apply `pyupgrade --py3-plus` to remove Python 2 compatibility code.Ben Sturmfels2021-03-052-28/+28
|
* always guess the same filetypeBoris Bobrov2018-07-121-2/+5
|
* Change API filename upload using custom headerRomain Porte2017-11-111-2/+7
| | | | | | | | | When uploading a file using the API its same is always going to be 'unknown.<extension>', which is not good looking for file urls. This patch proposes a custom header named 'X-File-Name' that allows to specify a file name using an API client. This changeset was tested with a local OAuth1 client.
* Fix #5408 - ignore non-int offset in api feedLoic Dachary2016-01-251-1/+6
| | | | | | | | | In the same fashion limit=BAD fallsback to the default value, fallback to zero when offset=WORSE. Also add test coverage verifying limit/offset do the right thing. Signed-off-by: Loic Dachary <loic@dachary.org>
* Allow API client to GET another user's outboxayleph2015-11-241-2/+2
| | | | Signed-off-by: Jessica Tallon <tsyesika@tsyesika.se>
* Comment changes for federationJessica Tallon2015-10-201-21/+58
| | | | | | | | | | | | | | This adds a new Comment link table that is used to link between some object and then the comment object, which can be more or less any object in Mediagoblin. The MediaComment has been renamed to TextComment as that more aptly describes what it is. There is migrations for these changes. There is also the conslidation of the Report tables into a single Report table, the same with the Notification objects. This is because both of them split out MediaEntry and Comment versions into their own polymorphic versions from a base, this is no longer a meaningful distinction as comments can be anything.
* Add public_id fixes throughout the codeJessica Tallon2015-10-071-0/+4
| | | | | | | | This adds several things, mainly code which checks for the public id and if it doesn't exist generating it where it can. This is to because we need to keep the public_id to be able to effectively soft delete models. This also adds a public_id field to the Activity along with a migration.
* Collection changes and migration for federationJessica Tallon2015-10-071-8/+6
| | | | | | | - Adds a "type" column to the Collection object and allows the CollectionItem model to contain any object. - Changes "items" to "num_items" as per TODO - Renames "uploader", "creator" and "user" to a common "actor" in most places
* Fix some unit tests and bugsJessica Tallon2015-08-241-5/+5
| | | | | | | | | | | | | | | | | | This fixes a lot of the issues with the LocalUser changes that were merged recently. There was a problem where the attributes of LocalUser were not being eagerly loaded and because the Session was detached an exception was being raised when they were accessed. This also fixes some typo's which were introduced. Finally this adds a temporary fix for a potential SQLAlchemy bug, this is a bug where doing: User.query.filter(LocalUser.username == "some_username").first() does NOT yeild a user with the username "some_username" but all users on the site. The temp fix is to just query the LocalUser, this should be resolved when bug is confirmed and fixed upstream.
* Change codebase to query or create correct User modelJessica Tallon2015-07-312-7/+6
| | | | | | | The code base had many references to User.username and other specific to LocalUser attributes as that was the way it use to exist. This updates those to query on the generic User model but filtering by attributes on the LocalUser.
* Change 'federation' name to 'api' which is more suitableJessica Tallon2015-02-154-0/+1004