evernote 1.1.0 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- data/README.mkd +2 -1
- data/lib/evernote/user_store.rb +1 -1
- data/lib/evernote/version.rb +1 -1
- data/vendor/gen-rb/evernote/edam/limits_constants.rb +35 -0
- data/vendor/gen-rb/evernote/edam/note_store.rb +766 -17
- data/vendor/gen-rb/evernote/edam/note_store_types.rb +156 -23
- data/vendor/gen-rb/evernote/edam/types_types.rb +140 -17
- data/vendor/gen-rb/evernote/edam/user_store.rb +67 -1
- data/vendor/gen-rb/evernote/edam/user_store_constants.rb +1 -1
- data/vendor/gen-rb/evernote/edam/user_store_types.rb +97 -0
- metadata +10 -12
@@ -98,6 +98,23 @@ require 'user_store_types'
|
|
98
98
|
raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'getPublicUserInfo failed: unknown result')
|
99
99
|
end
|
100
100
|
|
101
|
+
def getPremiumInfo(authenticationToken)
|
102
|
+
send_getPremiumInfo(authenticationToken)
|
103
|
+
return recv_getPremiumInfo()
|
104
|
+
end
|
105
|
+
|
106
|
+
def send_getPremiumInfo(authenticationToken)
|
107
|
+
send_message('getPremiumInfo', GetPremiumInfo_args, :authenticationToken => authenticationToken)
|
108
|
+
end
|
109
|
+
|
110
|
+
def recv_getPremiumInfo()
|
111
|
+
result = receive_message(GetPremiumInfo_result)
|
112
|
+
return result.success unless result.success.nil?
|
113
|
+
raise result.userException unless result.userException.nil?
|
114
|
+
raise result.systemException unless result.systemException.nil?
|
115
|
+
raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'getPremiumInfo failed: unknown result')
|
116
|
+
end
|
117
|
+
|
101
118
|
end
|
102
119
|
|
103
120
|
class Processor
|
@@ -164,6 +181,19 @@ require 'user_store_types'
|
|
164
181
|
write_result(result, oprot, 'getPublicUserInfo', seqid)
|
165
182
|
end
|
166
183
|
|
184
|
+
def process_getPremiumInfo(seqid, iprot, oprot)
|
185
|
+
args = read_args(iprot, GetPremiumInfo_args)
|
186
|
+
result = GetPremiumInfo_result.new()
|
187
|
+
begin
|
188
|
+
result.success = @handler.getPremiumInfo(args.authenticationToken)
|
189
|
+
rescue Evernote::EDAM::Error::EDAMUserException => userException
|
190
|
+
result.userException = userException
|
191
|
+
rescue Evernote::EDAM::Error::EDAMSystemException => systemException
|
192
|
+
result.systemException = systemException
|
193
|
+
end
|
194
|
+
write_result(result, oprot, 'getPremiumInfo', seqid)
|
195
|
+
end
|
196
|
+
|
167
197
|
end
|
168
198
|
|
169
199
|
# HELPER FUNCTIONS AND STRUCTURES
|
@@ -177,7 +207,7 @@ require 'user_store_types'
|
|
177
207
|
FIELDS = {
|
178
208
|
CLIENTNAME => {:type => ::Thrift::Types::STRING, :name => 'clientName'},
|
179
209
|
EDAMVERSIONMAJOR => {:type => ::Thrift::Types::I16, :name => 'edamVersionMajor', :default => 1},
|
180
|
-
EDAMVERSIONMINOR => {:type => ::Thrift::Types::I16, :name => 'edamVersionMinor', :default =>
|
210
|
+
EDAMVERSIONMINOR => {:type => ::Thrift::Types::I16, :name => 'edamVersionMinor', :default => 20}
|
181
211
|
}
|
182
212
|
|
183
213
|
def struct_fields; FIELDS; end
|
@@ -356,6 +386,42 @@ require 'user_store_types'
|
|
356
386
|
::Thrift::Struct.generate_accessors self
|
357
387
|
end
|
358
388
|
|
389
|
+
class GetPremiumInfo_args
|
390
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
391
|
+
AUTHENTICATIONTOKEN = 1
|
392
|
+
|
393
|
+
FIELDS = {
|
394
|
+
AUTHENTICATIONTOKEN => {:type => ::Thrift::Types::STRING, :name => 'authenticationToken'}
|
395
|
+
}
|
396
|
+
|
397
|
+
def struct_fields; FIELDS; end
|
398
|
+
|
399
|
+
def validate
|
400
|
+
end
|
401
|
+
|
402
|
+
::Thrift::Struct.generate_accessors self
|
403
|
+
end
|
404
|
+
|
405
|
+
class GetPremiumInfo_result
|
406
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
407
|
+
SUCCESS = 0
|
408
|
+
USEREXCEPTION = 1
|
409
|
+
SYSTEMEXCEPTION = 2
|
410
|
+
|
411
|
+
FIELDS = {
|
412
|
+
SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => Evernote::EDAM::UserStore::PremiumInfo},
|
413
|
+
USEREXCEPTION => {:type => ::Thrift::Types::STRUCT, :name => 'userException', :class => Evernote::EDAM::Error::EDAMUserException},
|
414
|
+
SYSTEMEXCEPTION => {:type => ::Thrift::Types::STRUCT, :name => 'systemException', :class => Evernote::EDAM::Error::EDAMSystemException}
|
415
|
+
}
|
416
|
+
|
417
|
+
def struct_fields; FIELDS; end
|
418
|
+
|
419
|
+
def validate
|
420
|
+
end
|
421
|
+
|
422
|
+
::Thrift::Struct.generate_accessors self
|
423
|
+
end
|
424
|
+
|
359
425
|
end
|
360
426
|
|
361
427
|
end
|
@@ -11,6 +11,14 @@ require 'errors_types'
|
|
11
11
|
module Evernote
|
12
12
|
module EDAM
|
13
13
|
module UserStore
|
14
|
+
module SponsoredGroupRole
|
15
|
+
GROUP_MEMBER = 1
|
16
|
+
GROUP_ADMIN = 2
|
17
|
+
GROUP_OWNER = 3
|
18
|
+
VALUE_MAP = {1 => "GROUP_MEMBER", 2 => "GROUP_ADMIN", 3 => "GROUP_OWNER"}
|
19
|
+
VALID_VALUES = Set.new([GROUP_MEMBER, GROUP_ADMIN, GROUP_OWNER]).freeze
|
20
|
+
end
|
21
|
+
|
14
22
|
# This structure is used to provide publicly-available user information
|
15
23
|
# about a particular account.
|
16
24
|
# <dl>
|
@@ -58,6 +66,95 @@ module Evernote
|
|
58
66
|
::Thrift::Struct.generate_accessors self
|
59
67
|
end
|
60
68
|
|
69
|
+
# This structure is used to provide information about a user's Premium account.
|
70
|
+
# <dl>
|
71
|
+
# <dt>currentTime:</dt>
|
72
|
+
# <dd>
|
73
|
+
# The server-side date and time when this data was generated.
|
74
|
+
# </dd>
|
75
|
+
# <dt>premium:</dt>
|
76
|
+
# <dd>
|
77
|
+
# True if the user's account is Premium.
|
78
|
+
# </dd>
|
79
|
+
# <dt>premiumRecurring</dt>
|
80
|
+
# <dd>
|
81
|
+
# True if the user's account is Premium and has a recurring payment method.
|
82
|
+
# </dd>
|
83
|
+
# <dt>premiumExpirationDate:</dt>
|
84
|
+
# <dd>
|
85
|
+
# The date when the user's Premium account expires, or the date when the user's
|
86
|
+
# account will be charged if it has a recurring payment method.
|
87
|
+
# </dd>
|
88
|
+
# <dt>premiumExtendable:</dt>
|
89
|
+
# <dd>
|
90
|
+
# True if the user is eligible for purchasing Premium account extensions.
|
91
|
+
# </dd>
|
92
|
+
# <dt>premiumPending:</dt>
|
93
|
+
# <dd>
|
94
|
+
# True if the user's Premium account is pending payment confirmation
|
95
|
+
# </dd>
|
96
|
+
# <dt>premiumCancellationPending:</dt>
|
97
|
+
# <dd>
|
98
|
+
# True if the user has requested that no further charges to be made; the Premium
|
99
|
+
# account will remain active until it expires.
|
100
|
+
# </dd>
|
101
|
+
# <dt>canPurchaseUploadAllowance:</dt>
|
102
|
+
# <dd>
|
103
|
+
# True if the user is eligible for purchasing additional upload allowance.
|
104
|
+
# </dd>
|
105
|
+
# <dt>sponsoredGroupName:</dt>
|
106
|
+
# <dd>
|
107
|
+
# The name of the sponsored group that the user is part of.
|
108
|
+
# </dd>
|
109
|
+
# <dt>sponsoredGroupRole:</dt>
|
110
|
+
# <dd>
|
111
|
+
# The role of the user within a sponsored group.
|
112
|
+
# </dd>
|
113
|
+
# </dl>
|
114
|
+
class PremiumInfo
|
115
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
116
|
+
CURRENTTIME = 1
|
117
|
+
PREMIUM = 2
|
118
|
+
PREMIUMRECURRING = 3
|
119
|
+
PREMIUMEXPIRATIONDATE = 4
|
120
|
+
PREMIUMEXTENDABLE = 5
|
121
|
+
PREMIUMPENDING = 6
|
122
|
+
PREMIUMCANCELLATIONPENDING = 7
|
123
|
+
CANPURCHASEUPLOADALLOWANCE = 8
|
124
|
+
SPONSOREDGROUPNAME = 9
|
125
|
+
SPONSOREDGROUPROLE = 10
|
126
|
+
|
127
|
+
FIELDS = {
|
128
|
+
CURRENTTIME => {:type => ::Thrift::Types::I64, :name => 'currentTime'},
|
129
|
+
PREMIUM => {:type => ::Thrift::Types::BOOL, :name => 'premium'},
|
130
|
+
PREMIUMRECURRING => {:type => ::Thrift::Types::BOOL, :name => 'premiumRecurring'},
|
131
|
+
PREMIUMEXPIRATIONDATE => {:type => ::Thrift::Types::I64, :name => 'premiumExpirationDate', :optional => true},
|
132
|
+
PREMIUMEXTENDABLE => {:type => ::Thrift::Types::BOOL, :name => 'premiumExtendable'},
|
133
|
+
PREMIUMPENDING => {:type => ::Thrift::Types::BOOL, :name => 'premiumPending'},
|
134
|
+
PREMIUMCANCELLATIONPENDING => {:type => ::Thrift::Types::BOOL, :name => 'premiumCancellationPending'},
|
135
|
+
CANPURCHASEUPLOADALLOWANCE => {:type => ::Thrift::Types::BOOL, :name => 'canPurchaseUploadAllowance'},
|
136
|
+
SPONSOREDGROUPNAME => {:type => ::Thrift::Types::STRING, :name => 'sponsoredGroupName', :optional => true},
|
137
|
+
SPONSOREDGROUPROLE => {:type => ::Thrift::Types::I32, :name => 'sponsoredGroupRole', :optional => true, :enum_class => Evernote::EDAM::UserStore::SponsoredGroupRole}
|
138
|
+
}
|
139
|
+
|
140
|
+
def struct_fields; FIELDS; end
|
141
|
+
|
142
|
+
def validate
|
143
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field currentTime is unset!') unless @currentTime
|
144
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field premium is unset!') if @premium.nil?
|
145
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field premiumRecurring is unset!') if @premiumRecurring.nil?
|
146
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field premiumExtendable is unset!') if @premiumExtendable.nil?
|
147
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field premiumPending is unset!') if @premiumPending.nil?
|
148
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field premiumCancellationPending is unset!') if @premiumCancellationPending.nil?
|
149
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field canPurchaseUploadAllowance is unset!') if @canPurchaseUploadAllowance.nil?
|
150
|
+
unless @sponsoredGroupRole.nil? || Evernote::EDAM::UserStore::SponsoredGroupRole::VALID_VALUES.include?(@sponsoredGroupRole)
|
151
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field sponsoredGroupRole!')
|
152
|
+
end
|
153
|
+
end
|
154
|
+
|
155
|
+
::Thrift::Struct.generate_accessors self
|
156
|
+
end
|
157
|
+
|
61
158
|
# When an authentication (or re-authentication) is performed, this structure
|
62
159
|
# provides the result to the client.
|
63
160
|
# <dl>
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: evernote
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,23 +9,22 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
13
|
-
default_executable:
|
12
|
+
date: 2012-01-23 00:00:00.000000000Z
|
14
13
|
dependencies:
|
15
14
|
- !ruby/object:Gem::Dependency
|
16
15
|
name: thrift_client
|
17
|
-
requirement: &
|
16
|
+
requirement: &70255822716660 !ruby/object:Gem::Requirement
|
18
17
|
none: false
|
19
18
|
requirements:
|
20
19
|
- - ! '>='
|
21
20
|
- !ruby/object:Gem::Version
|
22
|
-
version:
|
21
|
+
version: 0.8.1
|
23
22
|
type: :runtime
|
24
23
|
prerelease: false
|
25
|
-
version_requirements: *
|
24
|
+
version_requirements: *70255822716660
|
26
25
|
- !ruby/object:Gem::Dependency
|
27
26
|
name: rspec
|
28
|
-
requirement: &
|
27
|
+
requirement: &70255822716280 !ruby/object:Gem::Requirement
|
29
28
|
none: false
|
30
29
|
requirements:
|
31
30
|
- - ! '>='
|
@@ -33,10 +32,10 @@ dependencies:
|
|
33
32
|
version: '0'
|
34
33
|
type: :development
|
35
34
|
prerelease: false
|
36
|
-
version_requirements: *
|
35
|
+
version_requirements: *70255822716280
|
37
36
|
- !ruby/object:Gem::Dependency
|
38
37
|
name: yard
|
39
|
-
requirement: &
|
38
|
+
requirement: &70255822715820 !ruby/object:Gem::Requirement
|
40
39
|
none: false
|
41
40
|
requirements:
|
42
41
|
- - ! '>='
|
@@ -44,7 +43,7 @@ dependencies:
|
|
44
43
|
version: '0'
|
45
44
|
type: :development
|
46
45
|
prerelease: false
|
47
|
-
version_requirements: *
|
46
|
+
version_requirements: *70255822715820
|
48
47
|
description: A high level wrapper around Evernote's Thrift-generated ruby code. It
|
49
48
|
bundles up Evernote's thrift-generated code and creates some simple wrapper classes.
|
50
49
|
email:
|
@@ -81,7 +80,6 @@ files:
|
|
81
80
|
- Rakefile
|
82
81
|
- .gitignore
|
83
82
|
- example.rb
|
84
|
-
has_rdoc: true
|
85
83
|
homepage: http://github.com/cgs/evernote
|
86
84
|
licenses: []
|
87
85
|
post_install_message:
|
@@ -102,7 +100,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
102
100
|
version: 1.3.6
|
103
101
|
requirements: []
|
104
102
|
rubyforge_project:
|
105
|
-
rubygems_version: 1.
|
103
|
+
rubygems_version: 1.8.10
|
106
104
|
signing_key:
|
107
105
|
specification_version: 3
|
108
106
|
summary: High level wrapper for the Evernote API
|