aboutsummaryrefslogtreecommitdiffstats
path: root/pysite/views/api (follow)
Commit message (Collapse)AuthorAgeLines
* Initial project layout for djangoGravatar Gareth Coles2018-08-07-1833/+0
|
* Merge branch 'bugfix/fix-expired-record-unhiphopification-message' into 'master'Gravatar Leon Sandøy2018-07-31-3/+2
|\ | | | | | | | | | | | | Fix expiry checking when unhophipifying. Closes bot#29 See merge request python-discord/projects/site!29
| * Fix expiry checking when unhophipifying.Gravatar Johannes Christ2018-07-28-3/+2
| |
* | Merge branch 'enhancement/delete-otname-route' into 'master'Gravatar Leon Sandøy2018-07-29-11/+36
|\ \ | | | | | | | | | | | | Add `DELETE` route to `off-topic-names` endpoint. See merge request python-discord/projects/site!28
| * | Add `DELETE` route to `off-topic-names` endpoint.Gravatar Johannes Christ2018-07-28-11/+36
| |/
* | Addressing gdude commentsGravatar Leon Sandøy2018-07-29-1/+1
| |
* | Support for embeds and attachments.Gravatar Leon Sandøy2018-07-29-1/+4
| |
* | Merge branch 'master' into clean_commandGravatar Leon Sandøy2018-07-28-5/+604
|\|
| * Fix unit testGravatar Gareth Coles2018-07-27-1/+1
| |
| * Fix a couple dumb mistakesGravatar Gareth Coles2018-07-27-1/+3
| |
| * Don't remove basic user objects, add API for querying themGravatar Gareth Coles2018-07-27-5/+30
| | | | | | | | Also update privacy policy in accordance with this
| * Tweaks to the Infractions API for the botGravatar Momo2018-07-26-17/+44
| |
| * Infraction system API to replace RowboatGravatar Momo2018-07-21-0/+545
| |
* | Now doing role colorization instead of random colors for the cleanlog template.Gravatar Leon Sandøy2018-07-22-1/+2
| |
* | Completed the clean API and the clean frontend.Gravatar Leon Sandøy2018-07-21-0/+44
|/
* Add the big-brother API.Gravatar Johannes Christ2018-07-12-0/+118
|
* All domains: sitemap.xml and robots.txtGravatar Gareth Coles2018-07-10-0/+26
|
* Allow numbers in channel names.Gravatar Johannes Christ2018-07-09-1/+1
|
* Settings routeGravatar momothereal2018-07-05-0/+56
|
* Add a simple API for off-topic category names.Gravatar Volcyy2018-07-02-0/+83
|
* [API] Implement chunk-based user update mechanismGravatar Gareth Coles2018-06-24-90/+150
|
* [API] Check for DB-nuking empty data in users POSTGravatar Gareth Coles2018-06-23-1/+4
|
* Backend for team assignmentGravatar Gareth Coles2018-06-17-0/+24
|
* Allow schemas to not use a list when applicableGravatar Volcyy2018-06-14-47/+32
|
* Grab user avatars in bot API callGravatar Gareth Coles2018-06-07-5/+8
|
* documentation metadata API (#57)Gravatar Johannes Christ2018-06-05-0/+98
| | | | | | | | | | | | | | | | | | | | | | * Add documentation metadata "schema". * Add seed data for `pydoc_links` table. * Add tests for the `doc` API. * Allow specifying multiple parameters. * Move up line in generator. * make each docs test a function for greater test report visibility * fix a typo * Use fixtures instead of `pytest-ordering`. * Move `doc` API to `/bot/doc`. * Use new migration system.
* Privacy/Usability updates (#75)Gravatar Gareth Coles2018-05-20-5/+81
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Use less intrusive oauth scopes, add login redirect method * Remove debugging prints, add missing __init__ * Work towards new privacy policy * Fix judging state icons on code jam management page * Jammer profile retraction and punishments based on jam status * Linting * [Jams] Deny profile saving for users < 13 years, and finish removal page * Fix tests * Clean up and address Volcyy's review * Add proper login redirection to require_roles decorator * Fix template is_staff() and add staff link to navigation * Address lemon's review * Linting * Privacy page formatting * Privacy page formatting
* Merge remote-tracking branch 'origin/master'Gravatar Gareth Coles2018-05-19-6/+166
|\
| * Snake cog (#71)Gravatar Leon Sandøy2018-05-19-6/+166
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Tables that are initialized with JSON files in the table_init folder will now sync properly if the JSON file is changed after initialization. Any lines that are either added or removed will be updated whenever site is rebooted. * Initial API endpoint for snake_quiz * reverting database.py * I WILL KILL YOU * Added the snake_fact API endpoint * Moving snake tables to the new migrations system * Set up initial data for all new tables, added table objects, wrote endpoints, and wrote tests for the new endpoints. * Removing the snake_movies endpoint. That idea didn't pan out. * Added an endpoint for getting special snake cases * broken json * Fixing the initial data slightly, better picture of bob. * Changing JSON indentation to be 4 spaces consistently in all initial_data, to address Aperture's review. Also changing all the endpoints to have correct namespacing, addressing gdude's review. * Fixing tests to point to new API endpoints
* | GDPR compliance for jammer profilesGravatar Gareth Coles2018-05-19-0/+13
|/
* Add snowflake index on oauth_data and use it for deletionsGravatar Gareth Coles2018-05-15-2/+2
| | | | We were using id previously, but that was no longer the correct key
* [GDPR] Also remove OAuth dataGravatar Gareth Coles2018-05-15-1/+21
|
* [GDPR] Small fixesGravatar Gareth Coles2018-05-15-2/+2
|
* [GDPR] Users are now updated and removed correctlyGravatar Gareth Coles2018-05-15-1/+49
|
* Declaring the encoding to be utf-8 is not necessary in Python3 projects, as ↵Gravatar Leon Sandøy2018-04-27-8/+0
| | | | this is the default encoding. Encoding declarations are only useful in py3 if you want to declare it to be something _other_ than utf-8. This was, however, a very useful convention in py2. (#56)
* [#1eeu1] Hiphopify (#54)Gravatar Leon Sandøy2018-04-20-0/+178
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Changed the dev-mode logic to be the same as prod for creating new tables if they don't exist. Also added a new feature where a table can be initialized with data if you create a JSON file in the pysite/database/table_init/ folder and fill it with a list of dicts where each dict represents a row in your table. Included a hiphoppers json so that I can actually test if it works in production. It will only init the table if the table is empty. * Not sure if this will solve it, but I think so. * Renamed the tables and primary keys, and alphabetized the dict. Now complies with the gdudes holy wishes. * Almost done with the initial build for this. Implemented GET and DELETE, in order to finish POST I need to expand the database.py interface class. * Alphabetized database convenience wrappers. * Fixed a few typehints and added the sample convenience wrapper to the database class. * Finishing up the POST method and adding a duration parser to the utils folder so we can handle strings like 2w3d and turn them into a timestamp. * Fixed API blueprint loading, which was broken by the setup method in the DBMixIn. I'd forgotten to remove the check for table_name attribute. Also adde some logging and got the DELETE route working. * Added timezone-sensitivity to the duration parser so it will work with rethink. renamed the json and fixed some bugs in the hiphopify API. * Added a utility to test if rdb timestamps are expired, and only returning data from the GET calls if it isn't expired. * changed some log wording * Setting up Lil Joseph as default image. Adding some rappers to the list. * Adding a bunch of logging * These tests no longer apply. New tests must be written in the long run, removing them for now. * Addressing review comments left by Volcyy * Fixed misleading comment.
* Initial data for tables and refactoring the dev-mode database handling to be ↵Gravatar Leon Sandøy2018-04-15-2/+0
| | | | | | | | | | similar to prod-mode. (#53) * Changed the dev-mode logic to be the same as prod for creating new tables if they don't exist. Also added a new feature where a table can be initialized with data if you create a JSON file in the pysite/database/table_init/ folder and fill it with a list of dicts where each dict represents a row in your table. Included a hiphoppers json so that I can actually test if it works in production. It will only init the table if the table is empty. * Not sure if this will solve it, but I think so. * Renamed the tables and primary keys, and alphabetized the dict. Now complies with the gdudes holy wishes.
* Snowflakes should be handled as stringsGravatar Gareth Coles2018-04-10-2/+2
|
* CSRF error route doesn't do shit, sadlyGravatar Gareth Coles2018-04-04-36/+0
|
* CSRF error route for APIGravatar Gareth Coles2018-04-04-0/+36
|
* Accept username/discriminator from the bot and remove it from oauthGravatar Gareth Coles2018-03-30-6/+3
|
* Flake8Gravatar Gareth Coles2018-03-30-1/+1
|
* Collect all roles from users instead of just a single oneGravatar Gareth Coles2018-03-30-3/+5
|
* Fix error routing and more work on static filesGravatar Gareth Coles2018-03-29-3/+1
|
* Fix error handler managementGravatar Gareth Coles2018-03-29-1/+4
|
* Fix up route namesGravatar Gareth Coles2018-03-29-5/+5
|
* Minor bugfix to allow tag.delete to return success as False if the tag ↵Gravatar Leon Sandøy2018-03-13-5/+8
| | | | doesn't exist
* API for tags (#34)Gravatar Leon Sandøy2018-03-06-57/+156
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Help page and misc improvements Committing so I can go home >:| * [WIP] - API improvements for the tag features. Not completed. * renaming tag.py to tags.py and refactoring the nomenclature of docs to tags * fixed error message in tags, cleaning up app_test.py * tests for the tags feature * ignoring jsonify returns cause coverall can't handle them * Catch-all error view for the API blueprint * cleaning up APIErrorView a little * bringing coverage for tags.py to 100% * how did this get in here? * how did this get in here? ROUND 2 * Removing the 503 database error handling. It's not in use and we should probably rethink that whole custom error handling system anyway. * Converting the tags file to use the @api_params decorator instead of validating manually. Tested with bot staging.
* Add error messages (#30)Gravatar Joseph2018-02-28-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add error messages Signed-off-by: JoeBanks13 <[email protected]> * Remove un-used keyword arg from 404 * Assert for status code instead of full content * PEP8 * test lint * please coverage * oh * Exclude websockets.py from coverage * Move code output into terminal * Switch typewriter href protocol * Add tests for websockets.py * Abort previous commit, coveralls did not let coverage go down * Add more pauses and request => response * move css and js out, add typewriter JS to our own repo & add method for appending text in bulk. * Enable REPL on 4XX and change error descriptions * commas * /error path
* brings coverage to 90% (#24)Gravatar Christopher Baklid2018-02-26-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * brings coverage to 75% * satisfy flake8 * missing docstring added * one more test * artificially inflate coverage because python acts strange * testing decorators * fixed instantiation of test route * straggling newlines from debugging code * remove debug comments * restructure tests into logical class separations. more exlusions. more tests * testing websocket echo tests * added missing comment * convert single quotes to double quotes to satisfy docstrings