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

Implement Codable #8

Closed
wants to merge 4 commits into from
Closed

Conversation

NoahKamara
Copy link

What kind of change does this PR introduce?

Bug fix, feature, docs update, ...

What is the current behavior?

  • fetch return-type dependant on response
  • data is then decoded with JSONSerialization and instances created manually

What is the new behavior?

  • fetch returns response data directly, but will still attempt to decode and throw an error if the status code is not 2XX
  • data is decoded using JSONDecoder & Codable models

Additional context

  • wrote test cases for all File & Bucket Api Operations
  • refactored StorageApis to use url instead of string when building endpoint urls
  • added some documentation to Api methods

- changed fetch methods to return data, but still try to detect errors by statusCode before
- wrote test cases for all File & Bucket Api Operations
- refactored StorageApis to use url instead of string when building endpoint urls
- added some documentation to Api methods
- changed fetch methods to return data, but still try to detect errors by statusCode before
- wrote test cases for all File & Bucket Api Operations
- refactored StorageApis to use url instead of string when building endpoint urls
- added some documentation to Api methods
- changed fetch methods to return data, but still try to detect errors by statusCode before
- wrote test cases for all File & Bucket Api Operations
- refactored StorageApis to use url instead of string when building endpoint urls
- added some documentation to Api methods
Conflicts:
	Sources/SupabaseStorage/StorageApi.swift
@NoahKamara
Copy link
Author

NoahKamara commented Nov 8, 2022

whoops there's something missing there

@NoahKamara NoahKamara closed this Nov 8, 2022
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.

None yet

1 participant