-
Notifications
You must be signed in to change notification settings - Fork 57
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
few tweaks for objects api #190
Conversation
Additionally, added possibility to add suffix for |
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.
There are some questions. Maybe @KGronek share his idea.
core/pubnub_objects_api.c
Outdated
|
||
// TODO: maybe it will be a good idea to add serialization at some point to this SDK | ||
if (NULL != opts.data.custom) { | ||
strcat(obj_buffer, "\"custom\":"); |
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.
@Xavrax I know that this operation maybe not used that often, but strcat
will traverse destination each time to find the right spot to append another string. Should we use snprintf
here and in other places (I can patch)?
set_opts.data.name = "\"my_name\""; | ||
set_opts.data.external_id = "\"my_external_id\""; | ||
set_opts.data.profile_url = "\"my_profile_url\""; | ||
set_opts.data.email = "\"my_email\""; | ||
set_opts.data.custom = "{\"key\":\"value\"}"; | ||
set_opts.include = "\"custom\""; |
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.
@Xavrax these lines actually look like another point to the snprintf
usage (not that comfy as strcat
) and the user will need to pass only actual values and snprintf
will do the rest of the formatting. custom
field yeah, special one, but the rest of them are plain strings.
refactor: update demo application Remove some App Context configuration options JSON "stringify" (remove escaped double quotes).
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.
LGTM!
@pubnub-release-bot release |
🚀 Release successfully completed 🚀 |
feat: added
filter
andsort
parameters to be closer to the other SDKs with object API.added
filter
andsort
parameters to be closer to the other SDKs with object API.feat: configurable
bool
type.configurable
bool
type.fix: missing features needed for grant token API in CMakeLIsts.txt
missing features needed for grant token API in CMakeLIsts.txt