-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Endpoint for creating new Sheet-s with the ad and keywords data implemented #33
Merged
kumaranvpl
merged 18 commits into
dev
from
7-crete-new-sheet-with-necessary-campaign-info
Jul 1, 2024
Merged
Endpoint for creating new Sheet-s with the ad and keywords data implemented #33
kumaranvpl
merged 18 commits into
dev
from
7-crete-new-sheet-with-necessary-campaign-info
Jul 1, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…-necessary-campaign-info
rjambrecic
changed the title
7 create new sheet with necessary campaign info
Endpoint for creating new Sheet-s with the ad and keywords data implemented
Jun 28, 2024
kumaranvpl
requested changes
Jun 28, 2024
tests/app/fixtures/openapi.json
Outdated
@@ -0,0 +1 @@ | |||
{"openapi":"3.1.0","info":{"title":"google-sheets","version":"0.1.0"},"servers":[{"url":"http://localhost:8000","description":"Google Sheets app server"}],"paths":{"/login":{"get":{"summary":"Get Login Url","operationId":"get_login_url_login_get","parameters":[{"name":"user_id","in":"query","required":true,"schema":{"type":"integer","title":"User ID"}},{"name":"force_new_login","in":"query","required":false,"schema":{"type":"boolean","title":"Force new login","default":false}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"string"},"title":"Response Get Login Url Login Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/login/success":{"get":{"summary":"Get Login Success","operationId":"get_login_success_login_success_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":{"type":"string"},"type":"object","title":"Response Get Login Success Login Success Get"}}}}}}},"/login/callback":{"get":{"summary":"Login Callback","operationId":"login_callback_login_callback_get","parameters":[{"name":"code","in":"query","required":true,"schema":{"type":"string","title":"Authorization Code"}},{"name":"state","in":"query","required":true,"schema":{"type":"string","title":"State"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/get-sheet":{"get":{"summary":"Get Sheet","description":"Get data from a Google Sheet","operationId":"get_sheet_get_sheet_get","parameters":[{"name":"user_id","in":"query","required":true,"schema":{"type":"integer","description":"The user ID for which the data is requested","title":"User Id"},"description":"The user ID for which the data is requested"},{"name":"spreadsheet_id","in":"query","required":true,"schema":{"type":"string","description":"ID of the Google Sheet to fetch data from","title":"Spreadsheet Id"},"description":"ID of the Google Sheet to fetch data from"},{"name":"title","in":"query","required":true,"schema":{"type":"string","description":"The title of the sheet to fetch data from","title":"Title"},"description":"The title of the sheet to fetch data from"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"type":"string"},{"$ref":"#/components/schemas/GoogleSheetValues"}],"title":"Response Get Sheet Get Sheet Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/update-sheet":{"post":{"summary":"Update Sheet","description":"Update data in a Google Sheet within the existing spreadsheet","operationId":"update_sheet_update_sheet_post","parameters":[{"name":"user_id","in":"query","required":true,"schema":{"type":"integer","description":"The user ID for which the data is requested","title":"User Id"},"description":"The user ID for which the data is requested"},{"name":"spreadsheet_id","in":"query","required":true,"schema":{"type":"string","description":"ID of the Google Sheet to fetch data from","title":"Spreadsheet Id"},"description":"ID of the Google Sheet to fetch data from"},{"name":"title","in":"query","required":true,"schema":{"type":"string","description":"The title of the sheet to update","title":"Title"},"description":"The title of the sheet to update"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleSheetValues"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/create-sheet":{"post":{"summary":"Create Sheet","description":"Create a new Google Sheet within the existing spreadsheet","operationId":"create_sheet_create_sheet_post","parameters":[{"name":"user_id","in":"query","required":true,"schema":{"type":"integer","description":"The user ID for which the data is requested","title":"User Id"},"description":"The user ID for which the data is requested"},{"name":"spreadsheet_id","in":"query","required":true,"schema":{"type":"string","description":"ID of the Google Sheet to fetch data from","title":"Spreadsheet Id"},"description":"ID of the Google Sheet to fetch data from"},{"name":"title","in":"query","required":true,"schema":{"type":"string","description":"The title of the new sheet","title":"Title"},"description":"The title of the new sheet"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/get-all-file-names":{"get":{"summary":"Get All File Names","description":"Get all sheets associated with the user","operationId":"get_all_file_names_get_all_file_names_get","parameters":[{"name":"user_id","in":"query","required":true,"schema":{"type":"integer","description":"The user ID for which the data is requested","title":"User Id"},"description":"The user ID for which the data is requested"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"string"},"title":"Response Get All File Names Get All File Names Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/get-all-sheet-titles":{"get":{"summary":"Get All Sheet Titles","description":"Get all sheet titles within a Google Spreadsheet","operationId":"get_all_sheet_titles_get_all_sheet_titles_get","parameters":[{"name":"user_id","in":"query","required":true,"schema":{"type":"integer","description":"The user ID for which the data is requested","title":"User Id"},"description":"The user ID for which the data is requested"},{"name":"spreadsheet_id","in":"query","required":true,"schema":{"type":"string","description":"ID of the Google Sheet to fetch data from","title":"Spreadsheet Id"},"description":"ID of the Google Sheet to fetch data from"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"string"},"title":"Response Get All Sheet Titles Get All Sheet Titles Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/process-data":{"post":{"summary":"Process Data","description":"Process data to generate new ads or keywords based on the template","operationId":"process_data_process_data_post","parameters":[{"name":"target_resource","in":"query","required":true,"schema":{"enum":["ad","keyword"],"type":"string","description":"The target resource to be updated","title":"Target Resource"},"description":"The target resource to be updated"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_process_data_process_data_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleSheetValues"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/process-spreadsheet":{"post":{"summary":"Process Spreadsheet","description":"Process data to generate new ads or keywords based on the template","operationId":"process_spreadsheet_process_spreadsheet_post","parameters":[{"name":"user_id","in":"query","required":true,"schema":{"type":"integer","description":"The user ID for which the data is requested","title":"User Id"},"description":"The user ID for which the data is requested"},{"name":"template_spreadsheet_id","in":"query","required":true,"schema":{"type":"string","description":"ID of the Google Sheet with the template data","title":"Template Spreadsheet Id"},"description":"ID of the Google Sheet with the template data"},{"name":"template_sheet_title","in":"query","required":true,"schema":{"type":"string","description":"The title of the sheet with the template data","title":"Template Sheet Title"},"description":"The title of the sheet with the template data"},{"name":"new_campaign_spreadsheet_id","in":"query","required":true,"schema":{"type":"string","description":"ID of the Google Sheet with the new campaign data","title":"New Campaign Spreadsheet Id"},"description":"ID of the Google Sheet with the new campaign data"},{"name":"new_campaign_sheet_title","in":"query","required":true,"schema":{"type":"string","description":"The title of the sheet with the new campaign data","title":"New Campaign Sheet Title"},"description":"The title of the sheet with the new campaign data"},{"name":"target_resource","in":"query","required":true,"schema":{"enum":["ad","keyword"],"type":"string","description":"The target resource to be updated","title":"Target Resource"},"description":"The target resource to be updated"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"Body_process_data_process_data_post":{"properties":{"template_sheet_values":{"$ref":"#/components/schemas/GoogleSheetValues"},"new_campaign_sheet_values":{"$ref":"#/components/schemas/GoogleSheetValues"}},"type":"object","required":["template_sheet_values","new_campaign_sheet_values"],"title":"Body_process_data_process_data_post"},"GoogleSheetValues":{"properties":{"values":{"items":{"items":{},"type":"array"},"type":"array","title":"Values","description":"Values to be written to the Google Sheet."}},"type":"object","required":["values"],"title":"GoogleSheetValues"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we have this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For test.
Previously it was inside the test file: https://github.com/airtai/google-sheets/blob/main/tests/app/test_app.py#L165-L628
kumaranvpl
approved these changes
Jul 1, 2024
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Endpoint for creating new Sheet-s with the ad and keywords data implemented
Type of change
Please delete options that are not relevant.
Checklist
scripts/lint.sh
shows no errors)scripts/test-cov.sh
scripts/static-anaylysis.sh