Skip to content
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
merged 18 commits into from
Jul 1, 2024

Conversation

rjambrecic
Copy link
Collaborator

@rjambrecic rjambrecic commented Jun 28, 2024

Description

Endpoint for creating new Sheet-s with the ad and keywords data implemented

Type of change

Please delete options that are not relevant.

  • New feature (a non-breaking change that adds functionality)

Checklist

  • My code adheres to the style guidelines of this project (scripts/lint.sh shows no errors)
  • I have conducted a self-review of my own code
  • I have made the necessary changes to the documentation
  • My changes do not generate any new warnings
  • I have added tests to validate the effectiveness of my fix or the functionality of my new feature
  • Both new and existing unit tests pass successfully on my local environment by running scripts/test-cov.sh
  • I have ensured that static analysis tests are passing by running scripts/static-anaylysis.sh
  • I have included code examples to illustrate the modifications

@rjambrecic 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
@rjambrecic rjambrecic requested a review from kumaranvpl June 28, 2024 14:02
@@ -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"}}}}
Copy link
Collaborator

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?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rjambrecic rjambrecic requested a review from kumaranvpl July 1, 2024 12:14
@kumaranvpl kumaranvpl added this pull request to the merge queue Jul 1, 2024
Merged via the queue into dev with commit 2f05ece Jul 1, 2024
17 checks passed
@kumaranvpl kumaranvpl deleted the 7-crete-new-sheet-with-necessary-campaign-info branch July 1, 2024 12:17
@rjambrecic rjambrecic mentioned this pull request Jul 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants