Skip to content

Comments

Download from API#593

Open
catreedle wants to merge 22 commits intoscribe-org:mainfrom
catreedle:download-from-API
Open

Download from API#593
catreedle wants to merge 22 commits intoscribe-org:mainfrom
catreedle:download-from-API

Conversation

@catreedle
Copy link
Collaborator

Contributor checklist


Description

This pull request introduces support for downloading language data from the Scribe API, persisting it locally in SQLite, and managing download/update state.

New files:

  • LanguageData.swift: defines response models for language data, contract schema, and versions
  • APIClient.swift: API client for fetching language data and version metadata
  • LanguageDataService.swift: handles language data download, update checks, and local SQLite persistence
  • ToastView.swift: toast to display message to show API response and download success/fail

Updated:

  • DownloadDataScreen.swift:
    • add toast to notify the user of response and download success/fail
    • add .onAppear modifier to update download button state on view appearance
    • add "All languages" download state and click handler
  • DownloadStateManager.swift:
    • updates handleDownloadAction to trigger language data download
    • adds functions to check for updates
    • adds initializeStates to manage download states

Related issue

@github-actions
Copy link

Thank you for the pull request! 💙

The Scribe-iOS team will do our best to address your contribution as soon as we can. If you're not already a member of our public Matrix community, please consider joining! We'd suggest that you use the Element client as well as Element X for a mobile app, and definitely join the General and iOS rooms once you're in. Also consider attending our bi-weekly Saturday dev syncs. It'd be great to meet you 😊

Note

Scribe uses Conventional Comments in reviews to make sure that communication is as clear as possible.

@github-actions
Copy link

Maintainer Checklist

The following is a checklist for maintainers to make sure this process goes as well as possible. Feel free to address the points below yourself in further commits if you realize that actions are needed :)

  • Tests for changes have been written and the CI unit test, linting and formatting workflows within the PR checks do not indicate new errors in the files changed

  • The CHANGELOG has been updated with a description of the changes for the upcoming release and the corresponding issue (if necessary)

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.

2 participants