Commit Graph

280 Commits (master)

Author SHA1 Message Date
Matheus Lima aabc779647 fixing bug with google stt and fixing device's setting to properly return date format and time format 2019-03-27 13:11:38 -03:00
Matheus Lima dac786238d Minor refactor 2019-03-27 11:34:29 -03:00
Matheus Lima cab65636db Created API call to fetch the skills manifest 2019-03-27 11:23:59 -03:00
Matheus Lima e23d9ab840 Created endpoint to upload skills manifest 2019-03-27 11:23:59 -03:00
Matheus Lima 0deb202125 Added etag support to the device location endpoint 2019-03-27 11:21:26 -03:00
Matheus Lima f3e67f9677 Created endpoint to fetch a location associated with a device 2019-03-27 11:21:26 -03:00
Matheus Lima a55211f0b5 Fixing tests 2019-03-27 11:21:26 -03:00
Chris Veilleux 425be9a0a8 merge dev into add-device 2019-03-21 12:08:38 -05:00
Chris Veilleux 330390fd81 commented these out for now since they depend on an endpoint that was moved. 2019-03-20 17:16:18 -05:00
Chris Veilleux 4042775422 apply schema changes 2019-03-20 17:15:56 -05:00
Chris Veilleux db230cc208 removed add device endpoint as it now exists in the account API 2019-03-20 17:12:32 -05:00
Chris Veilleux 3b0a8cfa9e added payment id to subscription arguments to fix a bug 2019-03-20 17:10:48 -05:00
Matheus Lima c0ee6224d9 Created functions to epire etags from the device entity and the device's settings entity, at device and account level. Fixed the query used to fetch the devices from a user 2019-03-19 12:42:16 -03:00
Matheus Lima b422de76c2 Implemented etag support on the endpoint `GET /device/{uuid}/setting` 2019-03-18 20:21:46 -03:00
Matheus Lima df14af5322 Implemented etag support on the endpoint `GET /device/{uuid}` 2019-03-18 16:34:34 -03:00
Matheus Lima 134bd9cc03 Fixing broken test after adding the payment_id column to the account_membership table 2019-03-18 11:19:32 -03:00
Matheus Lima f547a452a3 Created PATCH request to update membership 2019-03-15 11:07:12 -03:00
Matheus Lima 497d7b2740 Implemented stripe integration 2019-03-15 11:07:12 -03:00
Matheus Lima d29a3ee857 Starting to implement the stripe integration 2019-03-15 11:07:12 -03:00
Matheus Lima 7fc2a54ab0 Created PATCH request to update membership 2019-03-13 18:19:13 -03:00
Matheus Lima f02d1f151e Implemented stripe integration 2019-03-09 00:32:09 -03:00
Matheus Lima 5ebad16060 Starting to implement the stripe integration 2019-03-08 19:37:45 -03:00
Matheus Lima 4f401285bd minor fix to make the core more readable 2019-03-08 17:48:29 -03:00
Matheus Lima 8484d8289b - Changing the validation in the endpoints used to update the device fields and to activate the device and to upload the skill settings
- Checking the authentication token in the before_request function. This is a tricky to make the api compatible with the mycroft core is expecting today. Today tartarus returns 401 when it calls and endpoint with a non existent path (like /device/{uuid} without pass the uuid). That is the value core expect to check if it needs to perform a device pairing. We should change that in future versions
- Changed device endpoint to send the user uuid together with the device
2019-03-08 17:09:53 -03:00
Chris Veilleux 38494522de
Merge pull request #72 from MycroftAI/put-v1-public-api
Adding the /v1 prefix to the endpoints
2019-03-07 20:14:35 -06:00
Matheus Lima 164d2280f9 Adding the /v1 prefix to the endpoints 2019-03-07 23:08:19 -03:00
Chris Veilleux 3053c5f15a added uwsgi to project requirements 2019-03-07 18:13:57 -06:00
Chris Veilleux 789a07b020 added uwsgi.ini file 2019-03-07 17:16:26 -06:00
Matheus Lima e4bd9930d7 Created endpoint to patch device fields 2019-03-06 22:39:34 -03:00
Matheus Lima 4dc2b47c63 Applying the new authentication logic in the endpoints of the public API 2019-03-06 22:10:59 -03:00
Matheus Lima e8fc54d657 Moved logic related to create a device login session to a python function, allowing it being used by the creating and refreshing token endpoint and by the behavioral tests 2019-03-06 21:31:49 -03:00
Matheus Lima c44284fbef Implemented authentication mechanism for the public API 2019-03-06 18:15:45 -03:00
Matheus Lima a4ecbae369 Moving the cache instance to the PublicEndpoint class 2019-03-06 17:11:16 -03:00
Matheus Lima fe8466a309 Created test to validate that when we update the skills settings, the device API is able to fetch the skill settings with the new values 2019-03-06 16:42:57 -03:00
Matheus Lima c1f0e70980 Created test to validate that when we update the skills settings, the device API is able to fetch the skill settings with the new values 2019-03-06 15:35:35 -03:00
Matheus Lima b85809f316 Implemented skill uploading 2019-03-06 15:35:35 -03:00
Matheus Lima fabcba8c54 Created endpoint to communicate with the wolfram alpha spoken api 2019-03-06 15:33:39 -03:00
Matheus Lima e8e30f9d6e Created endpoint to refresh device oauth token 2019-03-06 15:22:45 -03:00
Matheus Lima a5dcdf0c94 Applying model changes 2019-03-03 22:46:00 -03:00
Matheus Lima a90833f178 Fixing tests after rebase 2019-03-03 22:46:00 -03:00
Matheus Lima 737167b854 Fixed skill endpoints applying the changes related to the skill settings model. 2019-03-03 22:46:00 -03:00
Matheus Lima eccb83ed44 - Refactoring to use a AccountRepository to get an account using the device id
- Created tests for the metrics service
2019-02-25 19:03:08 -03:00
Matheus Lima a6533fbe32 Removed blocking operation from the db transaction 2019-02-25 16:42:11 -03:00
Matheus Lima edc43ed39a Created endpoint to communicate with metrics service 2019-02-25 16:42:11 -03:00
Matheus Lima e722e519bf Fixed the endpoint used to get the subscription type of a device and created tests for this endpoint 2019-02-25 16:28:14 -03:00
Matheus Lima 88aaccd073 Adding test for the device setting endpoint 2019-02-25 16:28:14 -03:00
Matheus Lima 588525ea47 Created test to the endpoint used to fetch a device 2019-02-25 16:28:14 -03:00
Matheus Lima ae5c148b92 Removing unused import 2019-02-22 14:23:43 -03:00
Matheus Lima b68dabe0b9 Clean up and adding tests for the device email endpoint 2019-02-22 14:23:43 -03:00
Matheus Lima 577c470d90 - Using schematics to validate POST data
- Fixed test
- Fixed error handler to present a better error message
2019-02-22 14:23:43 -03:00
Matheus Lima af45f633d1 Created endpoint to send email to the account associated to a device 2019-02-22 14:23:43 -03:00
Matheus Lima 1ad957142a Applying requested changes 2019-02-20 20:25:21 -03:00
Matheus Lima af83a190db Applying requested changes 2019-02-20 20:25:21 -03:00
Matheus Lima 23e056ca96 Created test to validate device pairing workflow 2019-02-20 20:25:21 -03:00
Matheus Lima 640f08ffbe Refactoring 2019-02-20 20:25:21 -03:00
Matheus Lima 750921fb7d Created endpoint to activate a device that is in a pairing process 2019-02-20 20:25:21 -03:00
Matheus Lima 5b6776c92e - Created endpoint to add a device to an account using a pairing code
- Renamed selene_cache module to cache
2019-02-20 20:25:21 -03:00
Matheus Lima 64e513a7df Created endpoint to get the device pairing code 2019-02-20 20:25:21 -03:00
Matheus Lima dea0e6737f Changing code to use relative imports 2019-02-19 10:06:30 -03:00
Matheus Lima c02f308392 Created behave test for the google stt endpoint 2019-02-19 10:06:30 -03:00
Matheus Lima d6bab8fb8f Removed unused import 2019-02-19 10:06:30 -03:00
Matheus Lima 6c25c2f85d Migrating the project from flask-restful to flask 2019-02-19 10:06:30 -03:00
Matheus Lima ed2e7eada6 Refactoring 2019-02-19 10:06:30 -03:00
Matheus Lima 73ad03c7b6 Created endpoint to communicate with the Google STT API 2019-02-19 10:06:30 -03:00
Matheus Lima 6f6cd0aac6 Using relative imports 2019-02-08 16:13:32 -03:00
Matheus Lima 7a41eaabe7 Created endpoint to communicate with the Open Weather Map API 2019-02-08 13:10:07 -03:00
Chris Veilleux bfed3ab8f3
new location for response formatter 2019-02-07 19:55:20 -06:00
Matheus Lima 793caa4142 Created endpoint to communicate with the Wolfram Alpha API 2019-02-07 22:00:14 -03:00
Matheus Lima 492d298a1e Using relative imports to define package level APIs 2019-02-07 17:48:39 -03:00
Matheus Lima edaba3c812 Fixes related to previous refactoring 2019-02-07 17:34:47 -03:00
Matheus Lima e38274e92a Fixes related to previous refactoring 2019-02-07 17:12:21 -03:00
Chris Veilleux 0b28b18b39 moved all data access layer code into a new selene.data package 2019-02-07 13:14:40 -06:00
Matheus Lima 022e2780f9 - Adding comments to the code
- Fixing small issue with the get_setting_by_device_id query
2019-02-07 15:13:56 -03:00
Matheus Lima 676eb3f158 - Created endpoint to fetch the subscription type using the device id 2019-02-07 12:35:46 -03:00
Matheus Lima 768a692fb8 - Refactored endpoint `device/{uuid}/skill` to fetch all skills using a single query
- Created endpoint to fetch a skill using device id and version_hash
- Removing useless sql files
2019-02-06 21:51:00 -03:00
Matheus Lima ade99800ef - Fixing setup.py to properly include the data files described by MANIFEST.in
- Initializing the API config
- Fixing the endpoints to use the config variable to access the connection pool
2019-02-02 22:39:00 -03:00
Matheus Lima 9f29aa5a86 Moving custom encoder logic to the util package in the shared project 2019-02-02 20:36:53 -03:00
Matheus Lima b6440abd38 Moving setting folder content into device folder in the shared project 2019-02-01 20:34:59 -03:00
Matheus Lima f5bbaa0892 Creating endpoints to fetch device, device's setting and device's skills 2019-02-01 20:34:59 -03:00
Chris Veilleux f199e0969b moved the contents of the "backend" directory up one level since this repo is now just for backend code 2019-01-30 14:47:18 -06:00