Skip to content
This repository was archived by the owner on May 13, 2024. It is now read-only.

Commit ea52b6a

Browse files
committed
Modified comments in sample script
1 parent 5c089f0 commit ea52b6a

1 file changed

Lines changed: 5 additions & 11 deletions

File tree

sample/client/EDAMTest.pl

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,8 @@
1010

1111
use Thrift::HttpClient;
1212
use Thrift::BinaryProtocol;
13-
# EDAMNoteStore::NoteStore の中などで使われているが, その中では use されていないので
14-
# ここで use しなければならない
15-
use EDAMTypes::Types;
16-
use EDAMErrors::Types;
17-
# $VAR1 = 'Undefined subroutine &EDAMTypes::Notebook called at modules/evernote-sdk-perl/lib//EDAMNoteStore/NoteStore.pm line 1137.
18-
# みたいなエラーが出る
13+
use EDAMTypes::Types; # you must do `use' EDAMTypes::Types and EDAMErrors::Types
14+
use EDAMErrors::Types; # before doing `use' EDAMUserStore::UserStore or EDAMNoteStore::NoteStore
1915
use EDAMUserStore::UserStore;
2016
use EDAMNoteStore::NoteStore;
2117
use EDAMUserStore::Constants;
@@ -38,7 +34,7 @@
3834
my $user_store_url = 'https://' . $evernote_host . '/edam/user';
3935

4036
my $user_store_client = Thrift::HttpClient->new( $user_store_url );
41-
# timeout のデフォルト値 (200 / 700) だと短すぎるので, 長くする
37+
# default timeout value may be too short
4238
$user_store_client->setSendTimeout( 2000 );
4339
$user_store_client->setRecvTimeout( 10000 );
4440
my $user_store_prot = Thrift::BinaryProtocol->new( $user_store_client );
@@ -53,18 +49,17 @@
5349
}
5450

5551
my $note_store_url = $user_store->getNoteStoreUrl( $auth_token );
56-
#my $note_store_url = 'https://sandbox.evernote.com/edam/note/shard/s1';
5752

5853
warn '[INFO] note store url : ' . $note_store_url;
5954
my $note_store_client = Thrift::HttpClient->new( $note_store_url );
60-
# timeout のデフォルト値 (200 / 700) だと短すぎるので, 長くする
55+
# default timeout value may be too short
6156
$note_store_client->setSendTimeout( 2000 );
6257
$note_store_client->setRecvTimeout( 10000 );
6358
my $note_store_prot = Thrift::BinaryProtocol->new( $note_store_client );
6459
my $note_store = EDAMNoteStore::NoteStoreClient->new( $note_store_prot, $note_store_prot );
6560

6661
# List all of the notebooks in the user's account
67-
my $notebooks = $note_store->listNotebooks( $auth_token ); # ARRAY[EDAMTypes::Notebook]
62+
my $notebooks = $note_store->listNotebooks( $auth_token ); # ARRAY of EDAMTypes::Notebook objects
6863

6964
printf "Found %d notebooks:\n", scalar(@$notebooks);
7065
my $default_notebook = $notebooks->[0];
@@ -126,7 +121,6 @@
126121
my $created_note = $note_store->createNote( $auth_token, $note );
127122

128123
printf "Successfully created a new note with GUID: %s\n", $created_note->guid;
129-
130124
};
131125
if ( $@ ) {
132126
warn 'ERROR';

0 commit comments

Comments
 (0)