Skip to content
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

Code removal and clean up #2

Merged
merged 9 commits into from Mar 24, 2014
Merged

Code removal and clean up #2

merged 9 commits into from Mar 24, 2014

Conversation

dannyamey
Copy link
Contributor

Some small changes to clean up the external interface (ed69208, b478a23, 6272cfe), bring the code inline with the documented authentication API (c4ce285, 0433d0d) and make better use of request (3894771, dd7cb48).

In preparation for splitting up yammer.js into multiple modules for each
different resource type.
Rather than requiring the constructor and instance to be defined
separately this allows us to use the popular terse instantiation:

    var yammer = require('yammer')({
        access_token: 'topsecret'
    });
Bearer tokens are used for authenticating requests rather than
OAuth signatures (see: http://developer.yammer.com/authentication/).
Make use of the built-in JSON response parsing in `request` rather than
using our own response body parser.
The built-in JSON parsing in request is now being used, so there's no
need to test this explicitly.
The authentication header is now a simple bearer token, so this commit removes
the extraneous _oauth method.
@sugendran
Copy link
Collaborator

Do we need to update the package.json version number? Or should we do this stuff in a branch and make a minor/major release once we're done refactoring?

@dannyamey
Copy link
Contributor Author

Yes, but not just yet as there's more to do here. Even though the interface is changing there's no need to bump the major version since we're on version 0 and as per the semver spec the API is not guaranteed stable.

Removes the trailing `.` and the option to specify a non-json response format.
dannyamey added a commit that referenced this pull request Mar 24, 2014
Code removal and clean up
@dannyamey dannyamey merged commit 45c7147 into polotek:master Mar 24, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants