ToothlessGear / node-gcm

A NodeJS wrapper library port to send data to Android devices via Google Cloud Messaging
https://github.com/ToothlessGear/node-gcm
Other
1.3k stars 206 forks source link

Documentation of allowed options #178

Closed hypesystem closed 8 years ago

hypesystem commented 8 years ago

We should document somewhere the options that can be given to the sender on creation https://github.com/ToothlessGear/node-gcm/blob/master/lib/sender.js#L5

eladnava commented 8 years ago

@hypesystem Am I right that these are the currently-available options?

    if (this.options && this.options.proxy) {
        post_options.proxy = this.options.proxy;
    }

    if (this.options && this.options.maxSockets) {
        post_options.maxSockets = this.options.maxSockets;
    }

    var timeout = Constants.SOCKET_TIMEOUT;

    if (this.options && this.options.timeout) {
        timeout =  this.options.timeout;
    }

    post_options.timeout = timeout;

    if (this.options && typeof(this.options.strictSsl) == "boolean") {
        post_options.strictSSL = this.options.strictSsl;
    }
hypesystem commented 8 years ago

That is correct. See also #179, which discusses changing the behaviour to allow all options that are allowed in request. This would make the documentation much simpler: we would just refer to request's documentation.

eladnava commented 8 years ago

@hypesystem Excellent. Making it possible to override any request option is great. Let's see what the outcome of #179 is, and then we can figure out how to properly document the request params.

eladnava commented 8 years ago

@hypesystem Is this enough documentation to close this issue?

hypesystem commented 8 years ago

Yes :)