-
Notifications
You must be signed in to change notification settings - Fork 267
Refactored REST Requests #320
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
Conversation
* Instead of having to manually build an HTTP request every time the app needs to make a request with the backend, this commit simplifies the process by encapsulating all of this code in a few classes. * Also fixes an issue with registerUser where location data was not being sent. The location data was being added to 'dataDic' after it got serialized into JSON data
* Forgot to import appropriate headers breaking a test.
* Closed the url_session branch since it is now obsolete
* Due to the fact that we've switched to a new rest model, the old enqueueRequest:onSuccess... method is no longer needed and has been removed from the project * Also removed the overrider for this method from unit test shadows
|
Review status: 0 of 19 files reviewed at latest revision, 8 unresolved discussions. iOS_SDK/OneSignalSDK/Source/OneSignal.m, line 464 at r1 (raw file):
iOS_SDK/OneSignalSDK/Source/OneSignalHelper.m, line 769 at r1 (raw file):
We should be able to move iOS_SDK/OneSignalSDK/Source/OneSignalRequest.h, line 1 at r1 (raw file):
Update this head file copyright to the one found in iOS_SDK/OneSignalSDK/Source/OneSignalRequest.m, line 46 at r1 (raw file):
iOS_SDK/OneSignalSDK/Source/Requests.m, line 22 at r1 (raw file):
There doesn't seem to be pattern of what is passed in vs what is collected internally. Can we pass everything in as more parameters or maybe create some kind of device / user state object to pass in? iOS_SDK/OneSignalSDK/Source/Requests.m, line 122 at r1 (raw file):
Typo in endpoint iOS_SDK/OneSignalSDK/UnitTests/Shadows/OneSignalClientOverrider.m, line 46 at r1 (raw file):
Typo error message iOS_SDK/OneSignalSDK/UnitTests/Shadows/OneSignalClientOverrider.m, line 48 at r1 (raw file):
There 2 lines of code are duplicated Comments from Reviewable |
|
iOS_SDK/OneSignalSDK/Source/Requests.m, line 22 at r1 (raw file): Previously, jkasten2 (Josh Kasten) wrote…
This request should actually have been removed, as it is now implemented as Comments from Reviewable |
|
iOS_SDK/OneSignalSDK/UnitTests/Shadows/OneSignalClientOverrider.m, line 46 at r1 (raw file): Previously, jkasten2 (Josh Kasten) wrote…
Good catch! I actually just copy and pasted from the previous Comments from Reviewable |
* Fixes some typos * Accesses OneSignalClient sharedClient using a property accessor instead of a method getter for cleaner syntax * Moves JSON parser method to OneSignalClient class for logical consistency * Removes unnecessary log statements
Reviewed 7 of 19 files at r1, 12 of 12 files at r2. Comments from Reviewable |
This change is