Skip to content

Commit e4cbdd6

Browse files
author
Rajasegar
committed
[CHORE] Adding access token via options for read_gist
1 parent 0f51f1d commit e4cbdd6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/gist.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -214,10 +214,10 @@ def list_all_gists(user = "")
214214

215215
end
216216

217-
def read_gist(id, file_name=nil)
217+
def read_gist(id, file_name=nil, options={})
218218
url = "#{base_path}/gists/#{id}"
219219

220-
access_token = auth_token()
220+
access_token = (options[:access_token] || auth_token())
221221
if access_token.to_s != ''
222222
url << "?access_token=" << CGI.escape(access_token)
223223
end

0 commit comments

Comments
 (0)