-
Notifications
You must be signed in to change notification settings - Fork 164
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
Noobish1/improvements #60
Conversation
are you saying the options are bad because you have to pass in multiple options? because you don't have to do that because most of those things have default values. |
Replying on my phone so I can't check but I thought you still had to specify the values for parameters that come before a later one, i.e. can you do: let options = PusherClientOptions(encrypted: false) On 21 Jun 2016, 17:01 +0100, Blair McArthurnotifications@github.com, wrote:
|
yup you only have to specify what you need or the stuff that doesn't have default values (which is nothing in this case). You can do |
That's actually the default value for the options in the |
@hamchapman: Got another possible tweak to the auth builder: Noobish1/pusher-websocket-swift@1ca0df3...Noobish1:feature/pass-all-params-to-authrequestcustomizer Could also make the Biggest benefit is that the client doesn't have to pass their authEndpoint and set a builder, they just pass the builder as they are building the whole request anyway. |
5d37071
to
b412dfe
Compare
Okay this is now in the state I'd like it to be in (bar potentially some small README updates). @Noobish1 - happy with it as it is? I'll push out a 2.0.0 release very soon if you are. Ideally I'd wait for Carthage/Carthage#1373 to get merged as then I can be lazy and make travis upload the built and zipped PusherSwift.framework.zip for Carthage users, but it's not a deal-breaker |
Looks good to me 👍 |
0efb02f
to
3158c27
Compare
…annel so that clients can create the auth requests completely themselves without parsing socket and channel information from the prebuilt request.
…hMethod take a secret, cleaned up the PusherClientOptions in result of these changes.
…t is set on init. It can also be used to test if a channel name is of a certain type.
…erClientOptions further.
…ead of the PusherClientOptions.
…usherClientOption.
Need to work out how to handle port + host. Still not sure that having defaults is the best experience, even if it is the Swiftiest way
tests removed from the client initialisation tests
…it's now on the AuthMethod.
builder should do and added a new AuthRequestBuilder case to the AuthMethod
3158c27
to
1e8b34d
Compare
Based on #57
I just fixed up some stuff aesthetically and fixed (most) of the tests. 2 still failing but easily fixable. I just stopped because I'm not sure that the
PusherClientOptions
, as it is, is the nicest way for a developer to interact with the library in terms of setting options. It's certainly far Swiftier but if, for example, you just want to setencrypted
to false, then you have to do something like this:which seems sub optimal.
@Noobish1 WDYT?
-- Update --
You don't have to do that ^^ 👍