Commit graph

54 commits

Author SHA1 Message Date
Liam
476363d4f7 Use compile with opts for post queries 2024-07-13 14:47:45 -04:00
Liam
e9eb638d79 Use compile with opts for filter queries 2024-07-13 14:42:37 -04:00
Liam
fc2ab285c7 Use compile with opts for comment queries 2024-07-13 14:38:20 -04:00
Liam
677ecc265c Fix API upload 2024-06-23 12:36:19 -04:00
Liam
566ba9d4c1 Split out query features to PhilomenaQuery namespace 2024-06-03 21:08:33 -04:00
Luna D
e0eb226abe
fix source url display, provide all source urls 2023-05-29 13:06:41 +02:00
byte[]
38c134668a Add missing deleted filter on featured lookup (fixes philomena-dev/philomena#124) 2021-07-15 20:02:54 -04:00
byte[]
4f040da3fa expand oembed to a proper view 2021-02-10 20:01:05 -05:00
VcSaJen
24b22f78be
Public filter search (#88) 2021-01-18 13:00:35 -05:00
parasprite
39fe2cbd55
Fixes batch tagging messing with complex spoilers (#49) 2020-12-03 14:23:32 -05:00
byte[]
ecfe60bcaa don't recode tag slugs, fixes #18 2020-09-10 11:20:25 -04:00
byte[]
3fce31b658 separate search definition building from search execution 2020-08-23 15:47:42 -04:00
byte[]
a97f8d23ad fix discord embed cards 2020-08-22 22:53:21 -04:00
byte[]
539eb223ff Fix all but one dialyzer warning 2020-08-11 19:15:32 -04:00
byte[]
cec8b605a8 add additional live events 2020-06-15 19:57:33 -04:00
byte[]
64428907f5 somewhat fix random ordering 2020-05-28 19:55:02 -04:00
byte[]
84d784d33a move reindex logic to context for reports, image creation 2020-05-07 23:15:43 -04:00
byte[]
00415b062c hoist ImageNavigator, ImageScope, ImageSorter to web namespace 2020-05-07 22:10:54 -04:00
byte[]
4b86e783ef you have to halt the plug pipeline explicitly 2020-05-04 03:18:36 -04:00
SomewhatDamaged
3e7ee76fe2
Api create image (#105)
* added new method (POST) to /api/v1/json/images

* Cleaned up debug

* added require_authorization plug, fixed up issues with image_controller

* make user do work

* Fixed inefficient function use

* added api fingerprinting

* more robust

* corrected holdover from merging files
2020-05-01 00:40:57 -04:00
byte[]
5f9e9d98a6 api relevance sorting, fixes #83 2020-04-08 11:11:58 -04:00
byte[]
1c12c010fa mix format 2020-03-31 11:39:11 -04:00
liamwhite
723bfa213f
Use JSON views for API (#64)
* AwardJson, LinkJson, UserJson to views

* FilterJson -> view

* ForumJson -> view

* TopicJson -> view

* PostJson -> view

* TagJson -> view

* CommentJson -> view

* GalleryJson -> view
2020-03-29 21:11:38 -04:00
SomewhatDamaged
196c5e14b6
API additions for user interactions on single images (#63)
* API additions for user interactions on single images

* removed ability to render without supplying interactions
2020-03-29 20:51:35 -04:00
liamwhite
b1de5389eb
Change ImageJson to view (#62) 2020-03-29 19:39:36 -04:00
SomewhatDamaged
44a20a7888
Adjusted to suit standard (#58) 2020-03-27 01:07:24 -04:00
SomewhatDamaged
84ac9d27d7
Adds /api/v1/json/filters endpoints (#55)
* Adds /api/v1/json/filters endpoint

* Modified as per discussion

* Using Repo.paginate properly now

* Added total count to output
2020-03-25 11:32:25 -04:00
SomewhatDamaged
7ddd8b8ec4
New /filters/:id API endpoint (#48)
* New /filters/:id API endpoint

* Fix to use can? permissions

* Fixes requested
2020-03-12 12:53:25 -04:00
Byron Mulvogue
7a164944b4 Fixed user.avatar failure. Ran mix format. 2020-03-03 11:23:53 +00:00
Byron Mulvogue
297e0909d6 This will add the endpoint to the API. 2020-03-03 03:49:02 +00:00
byte[]
ed44160603 run formatter 2020-01-10 23:20:19 -05:00
SomewhatDamaged
035b887f53 Somewhat damaged patch 1 (#20)
* Add new route

Adding route for
`/api/v1/json/posts/:id`

* Adding route controller

Adding route for
`/api/v1/json/posts/:id`
2020-01-07 10:35:24 -05:00
SomewhatDamaged
e918375c83 Somewhat damaged patch 1 (#19)
* Fix for module placement

Correcting my own mistake when I first made these routes

* Correcting module location

* Correcting module location

* Fix

Fixes a potential crash when no posts are returned.
2020-01-07 02:02:49 -05:00
SomewhatDamaged
24b9863699 Featured image API route (#18)
* Add route

`/api/v1/json/features`

Shows current featured image

* Add route

`/api/v1/json/features`

Shows current featured image.

* Removed binding

* Moving this file to a more appropriate name.

* Correctly named and placed

Correctly named and placed to match its module name

* Updated per review

* Changed as per review

Renamed to `PhilomenaWeb.Api.Json.FeaturedController`
Moved to `lib/philomena_web/controllers/api/json/featured_controller.ex`

* Updated route

Route `/api/v1/json/images/featured` now uses `PhilomenaWeb.Api.Json.FeaturedController`

* like this

Co-authored-by: liamwhite <liamwhite@users.noreply.github.com>
2020-01-05 20:09:45 -05:00
SomewhatDamaged
8e39c06940 Fix for distance (#16)
* Fix for distance

Fixes the `distance` to search not being passed through to `ImageReverse.images()`

`set_scraper_cache` passes the `distance` through into `params`
`create` normalizes and inserts the result into the params passed to `ImageReverse.images()`
`normalize_dist` checks if there is a `distance` set, adds a leading 0 to it (to account for values like `.5`, which would crash `Float.parse()`), and turns it back into a well-formatted string for `ImageReverse.images()`

* Fixed space
2020-01-03 10:37:20 -05:00
byte[]
7ee6bf379f apparently that was necessary 2020-01-02 19:00:47 -05:00
SomewhatDamaged
ae5bfe14e4 Add /forums API Endpoints (#14)
* Adding routes for /forums

Adding routes for new /forums endpoints

* New API Routes

`/forum`
`/forum/:forum_id`

* Add New API Routes

`/forums/:forum_id/topics/:topic_id/`
`/forums/:forum_id/topics/:topic_id/:post_id`

* Adds New API Routes

`/forums/:forum_id/topics`
`/forums/:forum_id/topics/:topic_id`

* Forum JSON formatter

* Updated

Correctly filters out things that should not be shown.

* Added topic JSON filter

* Added correct pagination

* Spacing and neatened

* Cleaned up

Consolidated queries and neatened up spacing.
Fixed name

* Removed unneeded aliases

* Cleaned up

Consolidated queries
Fixed spacing
Removed unneeded aliases

* Cleaned up

Spacing

* Cleaned up

spacing

* Depluralized

* Cleaned up

Removed space

* Removed extra spaces

* Removed extra spaces

* Removed extra spaces

* Removed preloads

* Cleaned up

Grouped clauses

* Consolodated further

* Cleaned up preloads

* Cleaned up

Preloads
consolidated clauses
grouped clauses

* Cleaned up

removed `id`
`locked`

* Removed topic_id

Not useful since the API client should already know it.

* More consolodation of terms

* Add total post count

* Removed unneeded variable

* Last cleanup, I swear.
2020-01-02 17:47:12 -05:00
byte[]
7000be9865 add parameter recoder to api tag controller 2019-12-31 23:22:35 -05:00
SomewhatDamaged
9b22d2719a Adding /api/v1/json/comment/:id endpoint (#13)
* Add `/api/v1/json/comment/:id` endpoint

* Add controller for `/api/v1/json/comment/:id`

Add controller for `/api/v1/json/comment/:id` endpoint

* Fixes permissions

Now will show `403 forbidden` if a comment on a deleted image is requested.

* Fixed endpoint schema

Now conforms to endpoint schema

* Permission adjustment

Will prevent `user_id` and `author` from leaking in the event the image is `hidden_from_users`

* Permission lockout

Lockout of all data if destroyed.

* Lockout on destroyed_content

Return 404 when `comment.destroyed_content`

* Refactored for neatness
2019-12-31 18:25:11 -05:00
SomewhatDamaged
6ccb3f645a Corrects failure and redirect to main page (#12)
This stops a bug I noticed when a slug that doesn't match is given. This will correctly 404 rather than redirecting to front page.
2019-12-31 09:01:14 -05:00
byte[]
f5bd8e7614 add deletion/duplicate handling to api 2019-12-31 00:10:50 -05:00
byte[]
dd5d553c0d include intensity data in image api response 2019-12-30 09:18:38 -05:00
byte[]
620f316db8 break compile time dependencies for elasticsearch index usage 2019-12-24 16:14:42 -05:00
byte[]
15864ab742 api search controllers 2019-12-24 03:26:06 -05:00
byte[]
02b7fdec31 convert rows to json 2019-12-16 18:14:22 -05:00
byte[]
f8aa0a68df add total back to search api 2019-12-08 10:03:29 -05:00
byte[]
caaeb3ad2e add parameter recoder 2019-12-08 01:00:53 -05:00
byte[]
2c8a5fd43d add api tag controller 2019-12-08 00:04:45 -05:00
byte[]
19174a31ba conn no longer necessary 2019-12-05 17:57:17 -05:00
byte[]
d5c438acdc point provider url at the correct page 2019-12-05 17:56:20 -05:00