Commit graph

22 commits

Author SHA1 Message Date
Anna Buianova
df0b134ec4
Added followers count to /api/users/me endpoint (#20378)
* Added followers_count to /api/users/me

* Updated the api user docs

* Rubocop fixes fro swagger_helper

* Added me jbuilder view for api/v0
2023-11-22 20:22:06 +00:00
Anna Buianova
7e83f18eca
Renamed display ad leftovers (test descriptions, swagger) (#20007) 2023-08-30 17:52:55 +03:00
Anna Buianova
2d6b740940
Renamed DisplayAd model to Billboard (#19993)
* Renamed Resource Admin: DisplayAd to Billboard

* Renamed DisplayAd to Billboard

* Added a data update script for roles
2023-08-28 08:09:36 -04:00
PJ
9725160709
Update billboard API to support target geolocations (#19857)
* update params to permit target_geolocations

* API docs

* fix param and JSON schema issues

* update docs again
2023-08-10 19:11:30 +01:00
Joshua Wehner
abcd4ac3c8
Add ability to assign arbitrary segment ID to /display_ads API (#19529)
* DisplayAd audience_segment_id in API

* Rubocop

* Manual not valid if missing id

* manual-type requires an id

* Better audience_segment_type reader

* Use inclusion validation

* Swagger update

* Remove unnecessary
2023-05-31 18:11:35 +02:00
PJ
795cfc3da0
Manual Audience Segments API write endpoints (#19476)
* add composite index to segmented_users table

* bulk queries for segmented users

* create segment endpoint

* adding and removing users

* deleting segments 😪

* fix time precision in specs

* api docs 🎉

* pluck improvements that couldn't be cherry-picked

* better service objects; also introduce batch upserting

* docs???
2023-05-25 20:37:18 +01:00
Joshua Wehner
dc1ab81401
Allow DisplayAd to target users via audience segmentation (#19284)
* Trying some models for audience segmentation

* AudienceSegment basics

* Attach AudienceSegment to DisplayAd

* Possibly use a DUS to populate AudienceSegments

* Add to display ad form UI

* Add to display ad API

* Refresh strategy for audience segments

* Add user_id to async ads query

* Maybe :testing -> :manual, for no-refresh segment

* Test & tweak segment refresh

* Testing audience_segment#refresh logic

* Coverage: testing human_readable

* Scope segment refresh to recently active users

* Tweak logic for when to refresh

* Tweak experience levels to match SettingsHelper

* Test for front-end logic

* Fix test, hope this helps coverage?

* Better test names

* One worker for all, many workers for each, perform_bulk

* Fix audience segment UI, needs to use id, not enum

* cron/schedule should RefreshAll

* Singular id in RefreshWorker
2023-04-25 08:41:10 -04:00
Joshua Wehner
d3f8e127fa
Add an article exclusion list to Billboards (#19280)
* Add exclude_article_ids int array

* Add specs, normalize inputs better

* Add to form & controller

* Add exclude_article_ids to DisplayAd API

* Use exclude_article_ids in query

* Rubocop

* Comment typo

* Tweak rspec example length config

* Arguments all the way down

* Typo

* Update spec/requests/api/v1/docs/display_ads_spec.rb

Co-authored-by: Ben Halpern <bendhalpern@gmail.com>

* Update spec/requests/api/v1/docs/display_ads_spec.rb

Co-authored-by: Ridhwana <Ridhwana.Khan16@gmail.com>

* Swagger schema for Display Ad

---------

Co-authored-by: Ben Halpern <bendhalpern@gmail.com>
Co-authored-by: Ridhwana <Ridhwana.Khan16@gmail.com>
2023-04-05 09:10:22 -04:00
Fernando Valverde
b2444d032d
/organizations api docs (#19055)
* /organizations api docs

* Remove Listings support
2023-02-03 15:12:03 -06:00
Fernando Valverde
c6419d7300
/tags api docs (#19048)
* /tags api docs

* Merge main
2023-02-03 14:11:38 -06:00
Fernando Valverde
bb7e193b3e
/videos api docs (#19049)
* /videos api docs

* Merge main
2023-02-03 10:22:57 -06:00
Fernando Valverde
13288c5626
API V1 Users docs (#19046)
* /users/me api docs

* Updated api_v1.json

* Missing users api docs
2023-02-03 05:43:48 -06:00
Fernando Valverde
db821a806f
/comments API docs (#18983)
* file

* Comments API
2023-01-25 12:06:43 -06:00
Joshua Wehner
7f41dae631
Pages API: Read (get index+show) (#18970)
* Pages API pt 1 (read/get/index+show)

* Update spec/requests/api/v1/docs/pages_spec.rb

Co-authored-by: Ridhwana <Ridhwana.Khan16@gmail.com>

* Update spec/requests/api/v1/docs/pages_spec.rb

Co-authored-by: Ridhwana <Ridhwana.Khan16@gmail.com>

* API Key not required for index & show

* API Feature flag has long since been removed

* Page schema

* Fix spec broken by merge

Co-authored-by: Ridhwana <Ridhwana.Khan16@gmail.com>
2023-01-25 17:15:27 +01:00
Fernando Valverde
8c62f9d6b3
Add the missing API docs for /articles (#18848)
* Progress on more articles API docs

* Some progress

* Broken update article doc spec but some progress

* Fix articles put rswag spec

* Fix spec

* Add missing specs

* Apply PR review feedback
2023-01-24 13:44:29 -06:00
Lawrence
0ac9852663
[API v1 docs] Followed Tags (#18952)
* Followed Tags swag docs

* Update spec/requests/api/v1/docs/followed_tags_spec.rb

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* Add to swagger helper

* minor tweaks

* more cleanup

* syntax change

* name change

* User doesn't have to be an admin

* Update spec/requests/api/v1/docs/followed_tags_spec.rb

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* Update spec/requests/api/v1/docs/followed_tags_spec.rb

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* update v1 json structure

* Update spec/swagger_helper.rb

Co-authored-by: Ridhwana <Ridhwana.Khan16@gmail.com>

* Update spec/requests/api/v1/docs/followed_tags_spec.rb

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* re-generate swagger file

* Update spec/requests/api/v1/docs/followed_tags_spec.rb

Co-authored-by: Ridhwana <Ridhwana.Khan16@gmail.com>

* regenerated swagger file

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Ridhwana <Ridhwana.Khan16@gmail.com>
2023-01-23 13:28:36 -06:00
Ridhwana
bf88b1e125
[API v1 docs] Profile Images by Username (#18951) 2023-01-13 17:35:47 +02:00
Anna Buianova
a2d26df17b
[API V1 docs] Podcast Episodes (#18908)
* Podcast episodes api swagger docs (start)

* Podcast Episodes api swagger docs

* Fixed wording

Co-authored-by: Ridhwana <Ridhwana.Khan16@gmail.com>

* Fixed wording

Co-authored-by: Ridhwana <Ridhwana.Khan16@gmail.com>

* Removed commented code

Co-authored-by: Ridhwana <Ridhwana.Khan16@gmail.com>
2023-01-10 15:01:22 +03:00
Fernando Valverde
1f6c53a20c
Update per_page_max in API endpoints + docs bump (#18415)
* Update per_page_max in API endpoints + docs bump

* Small tweak

* Fix spec typo
2022-09-02 14:07:19 -06:00
Fernando Valverde
2ad02cf31c
API v1 without api key restriction (#18340)
* Remove :api_v1 feature flag

* Reworking the auth configs throughout V1 + specs

* Fix remaining v1 specs

* Enhanced inline docs

* deprecation warning update

* Use headers variable for most v1 specs

* Cherry pick spec changes

* Fix specs

* group let! statements - rubocop

* Bring back ||= on api v1 authentication methods

* Bump swagger/v1/api_v1.json
2022-08-19 14:04:41 -06:00
Josh Puetz
dcc669de47 Rename generated swagger file 2022-07-29 10:21:27 -05:00
Josh Puetz
5daf869e56
v1 documentation via RSwag (#17990)
Co-authored-by: Fernando Valverde <fernando@fdo.cr>
Co-authored-by: Fernando Valverde <fernando@visualcosita.com>
2022-07-08 14:37:30 -05:00