From 248709a26fab69d133f8c8c7d1c5548359c8bba0 Mon Sep 17 00:00:00 2001 From: Ibrahim Awwal Date: Tue, 15 Nov 2016 18:36:13 -0800 Subject: [PATCH] Update README.md to include example for OAuth2 Couldn't figure out how to authenticate with OAuth2 until I found this comment in the issues: https://github.com/bitbucket-rest-api/bitbucket/issues/62#issuecomment-220730691 . This example should help with that. --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index c0c52b9..507eea2 100644 --- a/README.md +++ b/README.md @@ -34,6 +34,12 @@ At this stage you can also supply various configuration parameters, such as `:us bitbucket = BitBucket.new oauth_token: 'request_token', oauth_secret: 'request_secret' ``` +or for OAuth2: + +```ruby +bitbucket = BitBucket.new new_access_token: 'oauth2_access_token' +``` + Alternatively, you can configure the BitBucket settings by passing a block: ```ruby