Sha256: 3b8492d377a20177074244f90dbaa1b9a2fa55644821a1148129f8992ef23ff8

Contents?: true

Size: 765 Bytes

Versions: 8

Compression:

Stored size: 765 Bytes

Contents

module EvernoteOAuth

  class Client
    def shared_note_store(shared_notebook, options={})
      EvernoteOAuth::SharedNoteStore.new(
        shared_notebook: shared_notebook,
        token: options[:token] || @token,
        client: thrift_client(::Evernote::EDAM::NoteStore::NoteStore::Client,
                              shared_notebook.noteStoreUrl)
      )
    end
  end

  class SharedNoteStore
    include ::EvernoteOAuth::ThriftClientDelegation
    attr_reader :token

    def initialize(options={})
      @shared_notebook = options[:shared_notebook]
      @client = options[:client]
      @token = authenticateToSharedNotebook(@shared_notebook.shareKey,
                                            options[:token]).authenticationToken
    end
  end

end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
evernote_oauth-0.1.8 lib/evernote_oauth/shared_note_store.rb
evernote_oauth-0.1.7 lib/evernote_oauth/shared_note_store.rb
evernote_oauth-0.1.6 lib/evernote_oauth/shared_note_store.rb
evernote_oauth-0.1.5 lib/evernote_oauth/shared_note_store.rb
evernote_oauth-0.1.4 lib/evernote_oauth/shared_note_store.rb
evernote_oauth-0.1.3 lib/evernote_oauth/shared_note_store.rb
evernote_oauth-0.1.2 lib/evernote_oauth/shared_note_store.rb
evernote_oauth-0.1.1 lib/evernote_oauth/shared_note_store.rb