-
Notifications
You must be signed in to change notification settings - Fork 189
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
JSON decoder / encoder #459
Conversation
Decoder to map server response directly to the data models. feat: request / response based interface Configurable request objects require less convenience methods to interact with PubNub REST API. feat: network layer rewritten as module
Example/PubNub/PNAppDelegate.m
Outdated
@@ -61,8 +61,8 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:( | |||
self.channel1 = @"bot"; | |||
self.channel2 = @"myCh"; | |||
self.channelGroup1 = @"myChannelGroup"; | |||
self.pubKey = @"demo"; | |||
self.subKey = @"demo"; | |||
self.pubKey = @"pub-c-92e62c76-408a-4ac4-aefc-a1d20a83b2a6"; |
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.
Is it intentional?
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.
Nope. Fixed.
PubNub/Core/PubNub+APNS.m
Outdated
PNPushNotificationsStateAuditCompletionBlock block = [handlerBlock copy]; | ||
PNParsedRequestCompletionBlock handler; | ||
|
||
#ifndef PUBNUB_DISABLE_LOGGER |
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.
We could consider checking against the PUBNUB_DISABLE_LOGGER
flag as a part of PNLogAPICall
, so we would have such a check in one place only. Another idea could be overriding debugDescription
for objects like userRequest
. These two should shorten the overall syntax for logging. Let's leave it for now and consider pros and cons in the future
PubNub/Core/PubNub+Objects.m
Outdated
PNSetUUIDMetadataCompletionBlock block = [handleBlock copy]; | ||
PNParsedRequestCompletionBlock handler; | ||
|
||
#ifndef PUBNUB_DISABLE_LOGGER |
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.
Looks like it's not used
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.
I can drop it. Just added as a placeholder (it still will be stripped away during compilation).
PubNub/Core/PubNub+Objects.m
Outdated
PNRemoveUUIDMetadataCompletionBlock block = [handleBlock copy]; | ||
PNParsedRequestCompletionBlock handler; | ||
|
||
#ifndef PUBNUB_DISABLE_LOGGER |
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.
The same, looks like it's not used
PubNub/Core/PubNub+Objects.m
Outdated
PNFetchUUIDMetadataCompletionBlock block = [handleBlock copy]; | ||
PNParsedRequestCompletionBlock handler; | ||
|
||
#ifndef PUBNUB_DISABLE_LOGGER |
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.
The same, looks like it's not used
PubNub/Core/PubNub+Objects.m
Outdated
PNFetchAllUUIDMetadataCompletionBlock block = [handleBlock copy]; | ||
PNParsedRequestCompletionBlock handler; | ||
|
||
#ifndef PUBNUB_DISABLE_LOGGER |
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.
The same here
PubNub/Core/PubNub+Objects.m
Outdated
PNSetChannelMetadataCompletionBlock block = [handleBlock copy]; | ||
PNParsedRequestCompletionBlock handler; | ||
|
||
#ifndef PUBNUB_DISABLE_LOGGER |
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.
And here
PubNub/Core/PubNub+Objects.m
Outdated
PNRemoveChannelMetadataCompletionBlock block = [handleBlock copy]; | ||
PNParsedRequestCompletionBlock handler; | ||
|
||
#ifndef PUBNUB_DISABLE_LOGGER |
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.
Here too, perhaps the best way would be to find all these empty occurrences and delete them
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.
All Object API files has this as a placeholder. Need to sneak pick into another language which prints something and repeat the message here :)
refactor(json): adjust JSON serializer to the project needs Adjust model mapping keys set and type configurations in models. test: fix test suite
…om:pubnub/objective-c into modernization/request-response-data-models
…om:pubnub/objective-c into modernization/request-response-data-models
@pubnub-release-bot release |
🚀 Release successfully completed 🚀 |
feat: JSON decoder / encoder
Decoder to map server response directly to the data models.
feat: request / response-based interface
Configurable request objects require less convenience methods to interact with PubNub REST API.
feat: network layer rewritten as module