keenlabs / KeenClient-iOS

Official iOS client for the Keen IO API. Build analytics features directly into your iOS apps.
https://keen.io/docs
MIT License
78 stars 56 forks source link

Clean up KeenClient interface #203

Open baumatron opened 7 years ago

baumatron commented 7 years ago

There are a few items on KeenClient that shouldn't be exposed in KeenClient.h:

They should be removed for the next major release.

baumatron commented 7 years ago

runAsyncQuery:block: should be renamed runAsyncQuery:completion: or something better. Same goes for runAsyncMultiAnalysisWithQueries:block:.

baumatron commented 7 years ago

Should evaluate how shared client initialization is done and look for ways to improve it. Configuration and fetching of the shared client object should be separate things. Perhaps the client should provide a configuration object to be used for the shared client, or maybe implement a delegate object that provides a shared client configuration.

baumatron commented 7 years ago

This documentation is wrong in KeenClient.h, sharedClient:

@return A managed instance of KeenClient, or nil if you haven't called [KeenClient
 sharedClientWithProjectID:andWriteKey:andReadKey:].

If ID's and keys haven't been provided, it'll return a client that doesn't have any of those values set.

baumatron commented 7 years ago

As mentioned in #226, would be nice to have overloads of KeenClient int that don't require nil passed in for optional parameters. Obj-C doesn't make this very fun, though maybe there's a way to mark the parameters as optional for Swift only?