diff options
Diffstat (limited to 'fancy_bear')
| -rw-r--r-- | fancy_bear/contextio.rb | 7 | ||||
| -rw-r--r-- | fancy_bear/contextio/auth.rb | 18 | ||||
| -rw-r--r-- | fancy_bear/contextio/config.rb | 6 | ||||
| -rw-r--r-- | fancy_bear/fancy_bear.rb | 7 |
4 files changed, 38 insertions, 0 deletions
diff --git a/fancy_bear/contextio.rb b/fancy_bear/contextio.rb new file mode 100644 index 0000000..f81a703 --- /dev/null +++ b/fancy_bear/contextio.rb @@ -0,0 +1,7 @@ +require './contextio/config' +require './contextio/auth' + +module FancyBear + module ContextIO + end +end diff --git a/fancy_bear/contextio/auth.rb b/fancy_bear/contextio/auth.rb new file mode 100644 index 0000000..b3382b5 --- /dev/null +++ b/fancy_bear/contextio/auth.rb @@ -0,0 +1,18 @@ +require 'contextio' + +module FancyBear + module ContextIO + + class Auth + def initialize + @contextio = ::ContextIO.new(API_KEY, API_SECRET) + end + + def authenticate(email) + connection_token = @contextio.connect_tokens.create('http://google.com') + connect_tokens.browser_redirect_url + end + end + + end +end diff --git a/fancy_bear/contextio/config.rb b/fancy_bear/contextio/config.rb new file mode 100644 index 0000000..046848d --- /dev/null +++ b/fancy_bear/contextio/config.rb @@ -0,0 +1,6 @@ +module FancyBear + module ContextIO + API_KEY = ENV['CONTEXTIO_API_KEY'] + API_SECRET = ENV['CONTEXTIO_API_SECRET'] + end +end diff --git a/fancy_bear/fancy_bear.rb b/fancy_bear/fancy_bear.rb new file mode 100644 index 0000000..82eb0d3 --- /dev/null +++ b/fancy_bear/fancy_bear.rb @@ -0,0 +1,7 @@ +require './contextio' + +module FancyBear +end + +contextio = FancyBear::ContextIO::Auth.new +puts contextio.authenticate('sellevate.hack@gmail.com') |
