diff --git a/examples/authorization_flow.rb b/examples/authorization_flow.rb new file mode 100644 index 0000000..f26c8c2 --- /dev/null +++ b/examples/authorization_flow.rb @@ -0,0 +1,16 @@ +require 'instapaper' + +credentials = { + consumer_key: 'CONSUMER_KEY', + consumer_secret: 'CONSUMER_SECRET', +} + +client = Instapaper::Client.new(credentials) +token = client.access_token('username', 'password') +# => # + +client.oauth_token = token.oauth_token +client.oauth_token_secret = token.oauth_token_secret + +client.verify_credentials +# => #