Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "Feature/rc4" #72

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
## 2.0.0-RC4 / 2015-8-01
* Remove default http client and deprecated methods
* Validate app signature

## 2.0.0-RC3 / 2015-7-31

* Remove custom Yinxiang API
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Evernote SDK for Android version 2.0.0-RC4
Evernote SDK for Android version 2.0.0-RC3
==========================================

Evernote API version 1.25
Expand All @@ -24,7 +24,7 @@ Add the library as a dependency in your build.gradle file.

```groovy
dependencies {
compile 'com.evernote:android-sdk:2.0.0-RC4'
compile 'com.evernote:android-sdk:2.0.0-RC3'
}
```

Expand Down
11 changes: 11 additions & 0 deletions build-config/gradle-push.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,17 @@ afterEvaluate { project ->
}

developers {
developer {
name 'Ty Smith'
email '[email protected]'
id 'tylersmithnet'
url 'http://tysmith.me'
timezone '-5'
roles {
role 'developer'
}
}

developer {
name 'Seth Hitchings'
email '[email protected]'
Expand Down
4 changes: 1 addition & 3 deletions build-config/gradle-quality.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@ apply plugin: 'checkstyle'
apply plugin: 'findbugs'
apply plugin: 'pmd'

check.dependsOn 'checkstyle'
//check.dependsOn 'findbugs'
check.dependsOn 'pmd'
check.dependsOn 'checkstyle', 'findbugs', 'pmd'

task checkstyle(type: Checkstyle) {
configFile file("${project.rootDir}/build-config/checkstyle/checkstyle.xml")
Expand Down
8 changes: 3 additions & 5 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ buildscript {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.1.2'
classpath 'com.android.tools.build:gradle:1.3.0'
}
}

Expand All @@ -14,10 +14,8 @@ allprojects {
}

ext {
compileSdkVersion = 23
compileSdkVersion = 22
targetSdkVersion = compileSdkVersion
minSdkVersion = 14
buildToolsVersion = "24.0.1"

supportLibVersion = '23.4.0'
buildToolsVersion = "22.0.1"
}
4 changes: 2 additions & 2 deletions demo/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ android {

dependencies {
compile project(':library')
compile "com.android.support:recyclerview-v7:$rootProject.ext.supportLibVersion"
compile "com.android.support:design:$rootProject.ext.supportLibVersion"
compile 'com.android.support:recyclerview-v7:22.2.1'
compile 'com.android.support:design:22.2.1'
compile 'com.evernote:android-intent:1.0.1'
}
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
VERSION_NAME=2.0.0-RC4
VERSION_NAME=2.0.0-RC3
VERSION_CODE=1
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-2.5-all.zip
2 changes: 1 addition & 1 deletion library/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apply plugin: 'com.android.library'
apply from: '../build-config/gradle-quality.gradle'

dependencies {
compile "com.android.support:support-v4:$rootProject.ext.supportLibVersion"
compile 'com.android.support:support-v4:22.2.1'

compile 'com.evernote:evernote-api:1.25.1'
compile 'org.scribe:scribe:1.3.7'
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,165 @@
/*
* Copyright 2012 Evernote Corporation.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
* IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
* OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package com.evernote.client.android;

import com.evernote.client.android.asyncclient.EvernoteBusinessNotebookHelper;
import com.evernote.edam.error.EDAMNotFoundException;
import com.evernote.edam.error.EDAMSystemException;
import com.evernote.edam.error.EDAMUserException;
import com.evernote.edam.type.LinkedNotebook;
import com.evernote.edam.type.Note;
import com.evernote.edam.type.Notebook;
import com.evernote.edam.type.SharedNotebook;
import com.evernote.thrift.TException;
import com.evernote.thrift.protocol.TProtocol;
import com.evernote.thrift.transport.TTransportException;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

/**
*
* This is a wrapper/helper class that manages the connection to a business notestore. It maintains two
* {@link AsyncLinkedNoteStoreClient} objects, one points to the users personal store and the other to
* the business shard.
*
* These helper methods make network calls across both shards to return the appropriate data.
*
*
*
* @author @tylersmithnet
* @deprecated Use {@link EvernoteBusinessNotebookHelper} instead.
*/
@SuppressWarnings("JavaDoc")
@Deprecated
public class AsyncBusinessNoteStoreClient extends AsyncLinkedNoteStoreClient {
/**
* Reference to your personal note store.
*/
@Deprecated
AsyncBusinessNoteStoreClient(TProtocol iprot, TProtocol oprot, String authenticationToken, ClientFactory clientFactory) throws TTransportException {
super(iprot, oprot, authenticationToken, clientFactory);
}

/**
* Helper method to create a note synchronously in a business notebook.
*
* @param note
* @param linkedNotebook
* @return
* @throws com.evernote.edam.error.EDAMUserException
*
* @throws com.evernote.edam.error.EDAMSystemException
*
* @throws com.evernote.thrift.TException
* @throws com.evernote.edam.error.EDAMNotFoundException
*
*/
@Override
@Deprecated
public Note createNote(Note note, LinkedNotebook linkedNotebook) throws EDAMUserException, EDAMSystemException, TException, EDAMNotFoundException {

AsyncLinkedNoteStoreClient sharedNoteStore = getClientFactory().createLinkedNoteStoreClient(linkedNotebook);
SharedNotebook sharedNotebook = sharedNoteStore.getAsyncClient().getClient().getSharedNotebookByAuth(sharedNoteStore.getAuthenticationToken());

note.setNotebookGuid(sharedNotebook.getNotebookGuid());
sharedNoteStore.getAsyncClient().getClient().createNote(sharedNoteStore.getAuthenticationToken(), note);

return note;
}

/**
* Helper method to list business notebooks synchronously.
*
* @return
* @throws EDAMUserException
* @throws EDAMSystemException
* @throws TException
* @throws EDAMNotFoundException
*/
@Override
@Deprecated
public List<LinkedNotebook> listNotebooks() throws EDAMUserException, EDAMSystemException, TException, EDAMNotFoundException {

List<LinkedNotebook> linkedNotebooks = new ArrayList<>();
for (LinkedNotebook notebook : super.listNotebooks()) {
if (notebook.isSetBusinessId()) {
linkedNotebooks.add(notebook);
}
}
return linkedNotebooks;
}

/**
* Create Business Notebook from a Notebook.
*
* Synchronous call
*
* @return {@link LinkedNotebook} with guid from server
*/
@Override
@Deprecated
public LinkedNotebook createNotebook(Notebook notebook) throws TException, EDAMUserException, EDAMSystemException, EDAMNotFoundException {
return super.createNotebook(notebook);
}

/**
* Providing a LinkedNotebook referencing a Business notebook, perform a delete.
*
* Synchronous call
*
* @return guid of notebook deleted
*/
@Override
@Deprecated
public int deleteNotebook(LinkedNotebook linkedNotebook) throws TException, EDAMUserException, EDAMSystemException, EDAMNotFoundException {

AsyncLinkedNoteStoreClient sharedNoteStore = getClientFactory().createLinkedNoteStoreClient(linkedNotebook);
SharedNotebook sharedNotebook = sharedNoteStore.getAsyncClient().getClient().getSharedNotebookByAuth(sharedNoteStore.getAuthenticationToken());

Long[] ids = {sharedNotebook.getId()};
getAsyncClient().getClient().expungeSharedNotebooks(getAuthenticationToken(), Arrays.asList(ids));
return getAsyncPersonalClient().getClient().expungeLinkedNotebook(getAsyncPersonalClient().getAuthenticationToken(), linkedNotebook.getGuid());
}

/**
* Will return the {@link Notebook} associated with the {@link LinkedNotebook} from the business account.
*
* Synchronous call
*
* @param linkedNotebook
*/
@Override
@Deprecated
public Notebook getCorrespondingNotebook(LinkedNotebook linkedNotebook) throws TException, EDAMUserException, EDAMSystemException, EDAMNotFoundException {
//Get LinkedStore for auth information
AsyncLinkedNoteStoreClient sharedNoteStore = getClientFactory().createLinkedNoteStoreClient(linkedNotebook);
SharedNotebook sharedNotebook = sharedNoteStore.getAsyncClient().getClient().getSharedNotebookByAuth(sharedNoteStore.getAuthenticationToken());

return getAsyncClient().getClient().getNotebook(getAuthenticationToken(), sharedNotebook.getNotebookGuid());
}
}
Loading