duolingo_personal_data 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.rubocop.yml +20 -0
- data/.rubocop_todo.yml +50 -0
- data/CHANGELOG.md +7 -0
- data/Gemfile +7 -0
- data/LICENSE.txt +202 -0
- data/README.md +38 -0
- data/Rakefile +22 -0
- data/duolingo_personal_data.gemspec +26 -0
- data/fixtures/TeacherPrivacySettings.csv +2 -0
- data/fixtures/auth_data.csv +6 -0
- data/fixtures/avatar_images.csv +13 -0
- data/fixtures/duolingo-blast-emails.csv +17 -0
- data/fixtures/duolingo-notify-data.csv +4 -0
- data/fixtures/friends-follow.csv +2 -0
- data/fixtures/inventory.csv +5 -0
- data/fixtures/languages.csv +4 -0
- data/fixtures/leaderboards.csv +4 -0
- data/fixtures/profile.csv +13 -0
- data/fixtures/stories-story-completions.csv +4 -0
- data/fixtures/stories.csv +2 -0
- data/lib/duolingo_personal_data/auth_data.rb +39 -0
- data/lib/duolingo_personal_data/avatar_images.rb +24 -0
- data/lib/duolingo_personal_data/blast_emails.rb +84 -0
- data/lib/duolingo_personal_data/friends_follow.rb +47 -0
- data/lib/duolingo_personal_data/inventory.rb +48 -0
- data/lib/duolingo_personal_data/languages.rb +42 -0
- data/lib/duolingo_personal_data/leaderboards.rb +24 -0
- data/lib/duolingo_personal_data/notify_data.rb +33 -0
- data/lib/duolingo_personal_data/profile.rb +67 -0
- data/lib/duolingo_personal_data/stories.rb +29 -0
- data/lib/duolingo_personal_data/story_completions.rb +23 -0
- data/lib/duolingo_personal_data/teacher_privacy_settings.rb +51 -0
- data/lib/duolingo_personal_data/version.rb +3 -0
- data/lib/duolingo_personal_data.rb +17 -0
- data/manifest.scm +3 -0
- data/sig/duolingo_personal_data.rbs +272 -0
- metadata +83 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 90f5ce55daf9c0dddbab10bd13f36d5344e9f9cc561d5e543fa196dd2a65e545
|
4
|
+
data.tar.gz: 02f08b1c773a9fb5315f5353cef2389f41dc04644d89a5c55cba3f8cdc76d1ca
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 90bce41f9fdaf3f3d8f514929fd66d870facefe07c965d42f9c2c8c55e38b426f28fb883075462d40fcc1703f00a9af21542f9557aeaca7e3deeff557300ab40
|
7
|
+
data.tar.gz: cd9de28d5e5fb51e60b87663f3fc8e0fc597074b7b0f2734b342f12985ea9829285973908db8c27c16c37b68fdaa50d64973ec4dcc2f3ca972a80a23bfd5b20e
|
data/.rubocop.yml
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
inherit_from: .rubocop_todo.yml
|
2
|
+
|
3
|
+
AllCops:
|
4
|
+
TargetRubyVersion: 2.6
|
5
|
+
NewCops: enable
|
6
|
+
|
7
|
+
Style/StringLiterals:
|
8
|
+
Enabled: true
|
9
|
+
EnforcedStyle: double_quotes
|
10
|
+
|
11
|
+
Style/StringLiteralsInInterpolation:
|
12
|
+
Enabled: true
|
13
|
+
EnforcedStyle: double_quotes
|
14
|
+
|
15
|
+
Layout/LineLength:
|
16
|
+
Enabled: false
|
17
|
+
|
18
|
+
Style/FrozenStringLiteralComment:
|
19
|
+
Enabled: true
|
20
|
+
EnforcedStyle: never
|
data/.rubocop_todo.yml
ADDED
@@ -0,0 +1,50 @@
|
|
1
|
+
# This configuration was generated by
|
2
|
+
# `rubocop --auto-gen-config`
|
3
|
+
# on 2023-03-19 06:13:02 UTC using RuboCop version 1.10.0.
|
4
|
+
# The point is for the user to remove these configuration records
|
5
|
+
# one by one as the offenses are removed from the code base.
|
6
|
+
# Note that changes in the inspected code, or installation of new
|
7
|
+
# versions of RuboCop, may require this file to be generated again.
|
8
|
+
|
9
|
+
# Offense count: 2
|
10
|
+
# Configuration parameters: IgnoredMethods, CountRepeatedAttributes.
|
11
|
+
Metrics/AbcSize:
|
12
|
+
Max: 34
|
13
|
+
|
14
|
+
# Offense count: 1
|
15
|
+
# Configuration parameters: CountComments, CountAsOne.
|
16
|
+
Metrics/ClassLength:
|
17
|
+
Max: 114
|
18
|
+
|
19
|
+
# Offense count: 1
|
20
|
+
# Configuration parameters: IgnoredMethods.
|
21
|
+
Metrics/CyclomaticComplexity:
|
22
|
+
Max: 11
|
23
|
+
|
24
|
+
# Offense count: 2
|
25
|
+
# Configuration parameters: CountComments, CountAsOne, ExcludedMethods, IgnoredMethods.
|
26
|
+
Metrics/MethodLength:
|
27
|
+
Max: 18
|
28
|
+
|
29
|
+
# Offense count: 1
|
30
|
+
# Configuration parameters: IgnoredMethods.
|
31
|
+
Metrics/PerceivedComplexity:
|
32
|
+
Max: 11
|
33
|
+
|
34
|
+
# Offense count: 12
|
35
|
+
Style/Documentation:
|
36
|
+
Exclude:
|
37
|
+
- 'spec/**/*'
|
38
|
+
- 'test/**/*'
|
39
|
+
- 'lib/duolingo_personal_data/auth_data.rb'
|
40
|
+
- 'lib/duolingo_personal_data/avatar_images.rb'
|
41
|
+
- 'lib/duolingo_personal_data/blast_emails.rb'
|
42
|
+
- 'lib/duolingo_personal_data/friends_follow.rb'
|
43
|
+
- 'lib/duolingo_personal_data/inventory.rb'
|
44
|
+
- 'lib/duolingo_personal_data/languages.rb'
|
45
|
+
- 'lib/duolingo_personal_data/leaderboards.rb'
|
46
|
+
- 'lib/duolingo_personal_data/notify_data.rb'
|
47
|
+
- 'lib/duolingo_personal_data/profile.rb'
|
48
|
+
- 'lib/duolingo_personal_data/stories.rb'
|
49
|
+
- 'lib/duolingo_personal_data/story_completions.rb'
|
50
|
+
- 'lib/duolingo_personal_data/teacher_privacy_settings.rb'
|
data/CHANGELOG.md
ADDED
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,202 @@
|
|
1
|
+
|
2
|
+
Apache License
|
3
|
+
Version 2.0, January 2004
|
4
|
+
http://www.apache.org/licenses/
|
5
|
+
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
7
|
+
|
8
|
+
1. Definitions.
|
9
|
+
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
12
|
+
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
14
|
+
the copyright owner that is granting the License.
|
15
|
+
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
17
|
+
other entities that control, are controlled by, or are under common
|
18
|
+
control with that entity. For the purposes of this definition,
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
20
|
+
direction or management of such entity, whether by contract or
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
23
|
+
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
25
|
+
exercising permissions granted by this License.
|
26
|
+
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
28
|
+
including but not limited to software source code, documentation
|
29
|
+
source, and configuration files.
|
30
|
+
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
32
|
+
transformation or translation of a Source form, including but
|
33
|
+
not limited to compiled object code, generated documentation,
|
34
|
+
and conversions to other media types.
|
35
|
+
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
37
|
+
Object form, made available under the License, as indicated by a
|
38
|
+
copyright notice that is included in or attached to the work
|
39
|
+
(an example is provided in the Appendix below).
|
40
|
+
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
47
|
+
the Work and Derivative Works thereof.
|
48
|
+
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
50
|
+
the original version of the Work and any modifications or additions
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
62
|
+
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
65
|
+
subsequently incorporated within the Work.
|
66
|
+
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
73
|
+
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
79
|
+
where such license applies only to those patent claims licensable
|
80
|
+
by such Contributor that are necessarily infringed by their
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
83
|
+
institute patent litigation against any entity (including a
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
86
|
+
or contributory patent infringement, then any patent licenses
|
87
|
+
granted to You under this License for that Work shall terminate
|
88
|
+
as of the date such litigation is filed.
|
89
|
+
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
92
|
+
modifications, and in Source or Object form, provided that You
|
93
|
+
meet the following conditions:
|
94
|
+
|
95
|
+
(a) You must give any other recipients of the Work or
|
96
|
+
Derivative Works a copy of this License; and
|
97
|
+
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
99
|
+
stating that You changed the files; and
|
100
|
+
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
103
|
+
attribution notices from the Source form of the Work,
|
104
|
+
excluding those notices that do not pertain to any part of
|
105
|
+
the Derivative Works; and
|
106
|
+
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
109
|
+
include a readable copy of the attribution notices contained
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
112
|
+
of the following places: within a NOTICE text file distributed
|
113
|
+
as part of the Derivative Works; within the Source form or
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
115
|
+
within a display generated by the Derivative Works, if and
|
116
|
+
wherever such third-party notices normally appear. The contents
|
117
|
+
of the NOTICE file are for informational purposes only and
|
118
|
+
do not modify the License. You may add Your own attribution
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
121
|
+
that such additional attribution notices cannot be construed
|
122
|
+
as modifying the License.
|
123
|
+
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
125
|
+
may provide additional or different license terms and conditions
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
129
|
+
the conditions stated in this License.
|
130
|
+
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
134
|
+
this License, without any additional terms or conditions.
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
136
|
+
the terms of any separate license agreement you may have executed
|
137
|
+
with Licensor regarding such Contributions.
|
138
|
+
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
141
|
+
except as required for reasonable and customary use in describing the
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
143
|
+
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
153
|
+
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
159
|
+
incidental, or consequential damages of any character arising as a
|
160
|
+
result of this License or out of the use or inability to use the
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
163
|
+
other commercial damages or losses), even if such Contributor
|
164
|
+
has been advised of the possibility of such damages.
|
165
|
+
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
169
|
+
or other liability obligations and/or rights consistent with this
|
170
|
+
License. However, in accepting such obligations, You may act only
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
175
|
+
of your accepting any such warranty or additional liability.
|
176
|
+
|
177
|
+
END OF TERMS AND CONDITIONS
|
178
|
+
|
179
|
+
APPENDIX: How to apply the Apache License to your work.
|
180
|
+
|
181
|
+
To apply the Apache License to your work, attach the following
|
182
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
183
|
+
replaced with your own identifying information. (Don't include
|
184
|
+
the brackets!) The text should be enclosed in the appropriate
|
185
|
+
comment syntax for the file format. We also recommend that a
|
186
|
+
file or class name and description of purpose be included on the
|
187
|
+
same "printed page" as the copyright notice for easier
|
188
|
+
identification within third-party archives.
|
189
|
+
|
190
|
+
Copyright [yyyy] [name of copyright owner]
|
191
|
+
|
192
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
193
|
+
you may not use this file except in compliance with the License.
|
194
|
+
You may obtain a copy of the License at
|
195
|
+
|
196
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
197
|
+
|
198
|
+
Unless required by applicable law or agreed to in writing, software
|
199
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
200
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
201
|
+
See the License for the specific language governing permissions and
|
202
|
+
limitations under the License.
|
data/README.md
ADDED
@@ -0,0 +1,38 @@
|
|
1
|
+
# DuolingoPersonalData
|
2
|
+
|
3
|
+
## Installation
|
4
|
+
|
5
|
+
Install the gem and add to the application's Gemfile by executing:
|
6
|
+
|
7
|
+
```shell-session
|
8
|
+
bundle add duolingo_personal_data
|
9
|
+
```
|
10
|
+
|
11
|
+
If bundler is not being used to manage dependencies, install the gem by executing:
|
12
|
+
|
13
|
+
```shell-session
|
14
|
+
gem install duolingo_personal_data
|
15
|
+
```
|
16
|
+
|
17
|
+
## Usage
|
18
|
+
|
19
|
+
TODO: Write usage instructions here
|
20
|
+
|
21
|
+
## Development
|
22
|
+
|
23
|
+
For Guix user, run `guix shell` to setup development environment.
|
24
|
+
Otherwise, run `bin/setup` to install dependencies.
|
25
|
+
|
26
|
+
Then, run `rake test-unit` to run the tests.
|
27
|
+
You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
28
|
+
|
29
|
+
To install this gem onto your local machine, run `bundle exec rake install`.
|
30
|
+
To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
31
|
+
|
32
|
+
## Contributing
|
33
|
+
|
34
|
+
Bug reports and pull requests are welcome on GitLab at <https://gitlab.com/gemmaro/ruby-duolingo-personal_data>.
|
35
|
+
|
36
|
+
## License
|
37
|
+
|
38
|
+
The gem is available as open source under the terms of [The 2.0 version of the Apache License](https://www.apache.org/licenses/LICENSE-2.0).
|
data/Rakefile
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
require "bundler/gem_tasks"
|
2
|
+
require "rake/testtask"
|
3
|
+
|
4
|
+
Rake::TestTask.new(:test) do |t|
|
5
|
+
t.libs << "test"
|
6
|
+
t.libs << "lib"
|
7
|
+
t.test_files = FileList["test/**/*_test.rb"]
|
8
|
+
end
|
9
|
+
|
10
|
+
require "rubocop/rake_task"
|
11
|
+
|
12
|
+
RuboCop::RakeTask.new
|
13
|
+
|
14
|
+
task default: %i[test rubocop]
|
15
|
+
|
16
|
+
task :serve do
|
17
|
+
sh "ruby -run -e httpd doc"
|
18
|
+
end
|
19
|
+
|
20
|
+
task :sig do
|
21
|
+
sh "typeprof lib/**/* > sig/duolingo_personal_data.rbs"
|
22
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
require_relative "lib/duolingo_personal_data/version"
|
2
|
+
|
3
|
+
Gem::Specification.new do |spec|
|
4
|
+
spec.name = "duolingo_personal_data"
|
5
|
+
spec.version = DuolingoPersonalData::VERSION
|
6
|
+
spec.authors = ["gemmaro"]
|
7
|
+
spec.email = ["gemmaro.dev@gmail.com"]
|
8
|
+
|
9
|
+
spec.summary = "Library for Duolingo personal data."
|
10
|
+
spec.description = "Duolingo Personal Data gem is for loading Duolingo Personal Data, which can be acquired at <https://drive-thru.duolingo.com/>."
|
11
|
+
spec.homepage = "https://gitlab.com/gemmaro/ruby-duolingo-personal-data"
|
12
|
+
spec.license = "Apache-2.0"
|
13
|
+
spec.required_ruby_version = ">= 2.6.0"
|
14
|
+
|
15
|
+
spec.metadata["homepage_uri"] = spec.homepage
|
16
|
+
spec.metadata["source_code_uri"] = spec.homepage
|
17
|
+
spec.metadata["changelog_uri"] = "#{spec.homepage}/-/blob/main/CHANGELOG.md"
|
18
|
+
|
19
|
+
spec.files = Dir.chdir(__dir__) do
|
20
|
+
`git ls-files -z`.split("\x0").reject do |f|
|
21
|
+
(f == __FILE__) || f.match(%r{\A(?:(?:bin|test|spec|features)/|\.(?:git|circleci)|appveyor)})
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
25
|
+
spec.require_paths = ["lib"]
|
26
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
URLs
|
2
|
+
https://simg-ssl.duolingo.com/avatars/012345678/ABCDEFGHIJ/_original
|
3
|
+
https://simg-ssl.duolingo.com/avatars/012345678/ABCDEFGHIJ/large
|
4
|
+
https://simg-ssl.duolingo.com/avatars/012345678/ABCDEFGHIJ/medium
|
5
|
+
https://simg-ssl.duolingo.com/avatars/012345678/ABCDEFGHIJ/small
|
6
|
+
https://simg-ssl.duolingo.com/avatars/012345678/ABCDEFGHIJ/xlarge
|
7
|
+
https://simg-ssl.duolingo.com/avatars/012345678/ABCDEFGHIJ/xxlarge
|
8
|
+
https://simg-ssl.duolingo.com/avatars/012345678/abcdefghij/_original
|
9
|
+
https://simg-ssl.duolingo.com/avatars/012345678/abcdefghij/large
|
10
|
+
https://simg-ssl.duolingo.com/avatars/012345678/abcdefghij/medium
|
11
|
+
https://simg-ssl.duolingo.com/avatars/012345678/abcdefghij/small
|
12
|
+
https://simg-ssl.duolingo.com/avatars/012345678/abcdefghij/xlarge
|
13
|
+
https://simg-ssl.duolingo.com/avatars/012345678/abcdefghij/xxlarge
|
@@ -0,0 +1,17 @@
|
|
1
|
+
property,value
|
2
|
+
email_address,gemmaro.dev@gmail.com
|
3
|
+
ui_language,en
|
4
|
+
learning_language,fr
|
5
|
+
enabled,1
|
6
|
+
announcement,1
|
7
|
+
creation_datetime,2018-01-02 03:04:05
|
8
|
+
last_bounce,
|
9
|
+
last_sent,
|
10
|
+
last_open,
|
11
|
+
last_click,
|
12
|
+
last_session,2023-01-02 03:04:05
|
13
|
+
trial_user,0
|
14
|
+
has_en_certificate,
|
15
|
+
country,JP
|
16
|
+
client,web
|
17
|
+
schools_role,100
|
@@ -0,0 +1,5 @@
|
|
1
|
+
item_type,purchase_datetime,active,price_in_virtual_currency,wager_day,payment_processor,product,code_id,expected_expiration
|
2
|
+
Lingot wager,2023-01-02 01:02:03,true,5,5,,In-app Purchase,,
|
3
|
+
Streak freeze,2022-01-02 01:02:03,true,,,,In-app Purchase,,
|
4
|
+
Lingot wager,2021-01-02 01:02:03,false,5,7,,In-app Purchase,,
|
5
|
+
Store Item,2019-01-02 01:02:03,false,,,Immersive Plus,Duolingo Plus Subscription (Free Trial),,2020-01-02 01:02:03
|
@@ -0,0 +1,13 @@
|
|
1
|
+
name,value
|
2
|
+
username,alice
|
3
|
+
email,alice@example.com
|
4
|
+
fullname,alice
|
5
|
+
bio,
|
6
|
+
joined_at,2018-01-02 01:02:03
|
7
|
+
ui_language,en
|
8
|
+
learning_language,fr
|
9
|
+
lingots,2615
|
10
|
+
daily_goal,50
|
11
|
+
timezone,Asia/Tokyo
|
12
|
+
avatar_url,//simg-ssl.duolingo.com/avatars/012345678/0123456789
|
13
|
+
previous_email_addresses,
|
@@ -0,0 +1,39 @@
|
|
1
|
+
require "csv"
|
2
|
+
|
3
|
+
module DuolingoPersonalData
|
4
|
+
class AuthData
|
5
|
+
def initialize(csv_path)
|
6
|
+
@csv_path = csv_path
|
7
|
+
end
|
8
|
+
|
9
|
+
def user_account_name
|
10
|
+
@user_account_name ||= value_from_property("User Account Name")
|
11
|
+
end
|
12
|
+
|
13
|
+
def email_address
|
14
|
+
@email_address ||= value_from_property("Email Address")
|
15
|
+
end
|
16
|
+
|
17
|
+
def last_update_timestamp
|
18
|
+
@last_update_timestamp ||= value_from_property("Last Update Timestamp")
|
19
|
+
end
|
20
|
+
|
21
|
+
def last_login_attempt_timestamp
|
22
|
+
@last_login_attempt_timestamp ||= value_from_property("Last Login Attempt Timestamp")
|
23
|
+
end
|
24
|
+
|
25
|
+
def last_authentication_key_refresh_timestamp
|
26
|
+
@last_authentication_key_refresh_timestamp ||= value_from_property("Last Authentication Key Refresh Timestamp")
|
27
|
+
end
|
28
|
+
|
29
|
+
private
|
30
|
+
|
31
|
+
def value_from_property(property_name)
|
32
|
+
table.find { |row| row["Property"] == property_name }["Value"]
|
33
|
+
end
|
34
|
+
|
35
|
+
def table
|
36
|
+
@table ||= CSV.read(@csv_path, headers: true)
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
require "csv"
|
2
|
+
require "uri"
|
3
|
+
require "forwardable"
|
4
|
+
|
5
|
+
module DuolingoPersonalData
|
6
|
+
class AvatarImages
|
7
|
+
def initialize(csv_path)
|
8
|
+
@csv_path = csv_path
|
9
|
+
end
|
10
|
+
|
11
|
+
extend Forwardable
|
12
|
+
def_delegators :urls, *(Array.instance_methods - [:object_id])
|
13
|
+
|
14
|
+
private
|
15
|
+
|
16
|
+
def urls
|
17
|
+
@urls ||= table.map { |row| URI(row["URLs"]) }
|
18
|
+
end
|
19
|
+
|
20
|
+
def table
|
21
|
+
@table ||= CSV.read(@csv_path, headers: true)
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
@@ -0,0 +1,84 @@
|
|
1
|
+
require "csv"
|
2
|
+
require "time"
|
3
|
+
|
4
|
+
module DuolingoPersonalData
|
5
|
+
class BlastEmails
|
6
|
+
def initialize(csv_path)
|
7
|
+
@csv_path = csv_path
|
8
|
+
end
|
9
|
+
|
10
|
+
def email_address
|
11
|
+
@email_address ||= value_from_property("email_address")
|
12
|
+
end
|
13
|
+
|
14
|
+
def ui_language
|
15
|
+
@ui_language ||= value_from_property("ui_language")
|
16
|
+
end
|
17
|
+
|
18
|
+
def learning_language
|
19
|
+
@learning_language ||= value_from_property("learning_language")
|
20
|
+
end
|
21
|
+
|
22
|
+
def enabled
|
23
|
+
@enabled ||= boolean_value_from_property("enabled")
|
24
|
+
end
|
25
|
+
|
26
|
+
def announcement
|
27
|
+
@announcement ||= boolean_value_from_property("announcement")
|
28
|
+
end
|
29
|
+
|
30
|
+
def creation_datetime
|
31
|
+
@creation_datetime ||= time_value_from_property("creation_datetime")
|
32
|
+
end
|
33
|
+
|
34
|
+
def last_session
|
35
|
+
@last_session ||= time_value_from_property("last_session")
|
36
|
+
end
|
37
|
+
|
38
|
+
def trial_user
|
39
|
+
@trial_user ||= boolean_value_from_property("trial_user")
|
40
|
+
end
|
41
|
+
|
42
|
+
def country
|
43
|
+
@country ||= value_from_property("country")
|
44
|
+
end
|
45
|
+
|
46
|
+
def client
|
47
|
+
@client ||= value_from_property("client")
|
48
|
+
end
|
49
|
+
|
50
|
+
def schools_role
|
51
|
+
@schools_role ||= integer_value_from_property("schools_role")
|
52
|
+
end
|
53
|
+
|
54
|
+
private
|
55
|
+
|
56
|
+
def value_from_property(property_name)
|
57
|
+
table.find { |row| row["property"] == property_name }["value"]
|
58
|
+
end
|
59
|
+
|
60
|
+
def boolean_value_from_property(property_name)
|
61
|
+
value = value_from_property(property_name)
|
62
|
+
case value
|
63
|
+
when "0" then false
|
64
|
+
when "1" then true
|
65
|
+
else
|
66
|
+
raise Error, "cannot interpret #{value.inspect} as boolean"
|
67
|
+
end
|
68
|
+
end
|
69
|
+
|
70
|
+
def time_value_from_property(property_name)
|
71
|
+
value = value_from_property(property_name)
|
72
|
+
Time.strptime(value, "%Y-%m-%d %T")
|
73
|
+
end
|
74
|
+
|
75
|
+
def integer_value_from_property(property_name)
|
76
|
+
value = value_from_property(property_name)
|
77
|
+
Integer(value)
|
78
|
+
end
|
79
|
+
|
80
|
+
def table
|
81
|
+
@table ||= CSV.read(@csv_path, headers: true)
|
82
|
+
end
|
83
|
+
end
|
84
|
+
end
|