Skip to content

Commit 8f4e77f

Browse files
author
Tyler Nienhouse
authored
Merge pull request #29 from Learnosity/CAT-77/docs/clarify-user_id-examples
[DOCS] Clarify user_id examples CAT-77
2 parents 3a350a5 + ed8db0d commit 8f4e77f

File tree

7 files changed

+32
-11
lines changed

7 files changed

+32
-11
lines changed

ChangeLog.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Change Log
2+
3+
All notable changes to this project will be documented in this file.
4+
5+
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
6+
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
7+
8+
## [Unreleased]
9+
### Added
10+
- This ChangeLog!
11+
- Telemetry data (basic information about the execution environment) is now added to the to the request objects being signed which is later read and logged internally by our APIs when the request is received. This allows us to better support our various SDKs and does not send any additional network requests. More information can be found in README.md.

LearnositySDK/Examples/Assess.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ public static string Simple()
1818

1919
JsonObject security = new JsonObject();
2020
security.set("consumer_key", Credentials.ConsumerKey);
21-
security.set("user_id", "demo_student");
21+
security.set("user_id", "$ANONYMIZED_USER_ID");
2222
security.set("domain", Credentials.Domain);
2323

2424
string secret = Credentials.ConsumerSecret;

LearnositySDK/Examples/Events.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ public static string Simple()
1414

1515
JsonObject security = new JsonObject();
1616
security.set("consumer_key", "yis0TYCu7U9V4o7M");
17-
security.set("user_id", "demo_student");
17+
security.set("user_id", "$ANONYMIZED_USER_ID");
1818
security.set("domain", "localhost");
1919

2020
string secret = "74c5fd430cf1242a527f6223aebd42d30464be22";
@@ -34,7 +34,7 @@ private static JsonObject users()
3434

3535
for (int i = 0; i <= 10; i++)
3636
{
37-
string user_id = "userid_" + i;
37+
string user_id = "$ANONYMIZED_USER_ID_" + i;
3838
users.set(user_id);
3939
}
4040

LearnositySDK/Examples/Items.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ public static string Simple()
1515
JsonObject security = new JsonObject();
1616
security.set("consumer_key", Credentials.ConsumerKey);
1717
security.set("domain", Credentials.Domain);
18-
security.set("user_id", "12345678");
18+
security.set("user_id", "$ANONYMIZED_USER_ID");
1919

2020
string secret = Credentials.ConsumerSecret;
2121

@@ -31,7 +31,7 @@ public static string Simple()
3131
request.set("name", "Demo Activity");
3232
request.set("course_id", "demo_yis0TYCu7U9V4o7M");
3333
request.set("session_id", Uuid.generate());
34-
request.set("user_id", "demo_student");
34+
request.set("user_id", "$ANONYMIZED_USER_ID");
3535
request.set("config", config);
3636

3737
// Instantiate Init class

LearnositySDK/Examples/Questions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public static string Simple(out string uuid)
1717
JsonObject security = new JsonObject();
1818
security.set("consumer_key", Credentials.ConsumerKey);
1919
security.set("domain", Credentials.Domain);
20-
security.set("user_id", "demo_student");
20+
security.set("user_id", "$ANONYMIZED_USER_ID");
2121

2222
string secret = Credentials.ConsumerSecret;
2323

LearnositySDK/Examples/Reports.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ public static string Simple()
2323
JsonObject report = new JsonObject();
2424
report.set("id", "report-1");
2525
report.set("type", "sessions-summary");
26-
report.set("user_id", "brianmoser");
26+
report.set("user_id", "$ANONYMIZED_USER_ID");
2727
report.set("session_ids", session_ids);
2828

2929
JsonObject reports = new JsonObject(true);

readme.md

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ string service = "items";
5858
JsonObject security = new JsonObject();
5959
security.set("consumer_key", "yis0TYCu7U9V4o7M");
6060
security.set("domain", "localhost");
61-
security.set("user_id", "12345678");
61+
security.set("user_id", "$ANONYMIZED_USER_ID");
6262
6363
string secret = "74c5fd430cf1242a527f6223aebd42d30464be22";
6464
@@ -68,7 +68,7 @@ request.set("activity_id", "my-demo-activity");
6868
request.set("name", "Demo Activity");
6969
request.set("course_id", "demo_yis0TYCu7U9V4o7M");
7070
request.set("session_id", Uuid.generate());
71-
request.set("user_id", "demo_student");
71+
request.set("user_id", "$ANONYMIZED_USER_ID");
7272
7373
// Instantiate Init class
7474
Init init = new Init(service, security, secret, request);
@@ -217,7 +217,7 @@ session_ids.set("AC023456-2C73-44DC-82DA28894FCBC3BF");
217217
JsonObject report = new JsonObject();
218218
report.set("id", "report-1");
219219
report.set("type", "sessions-summary");
220-
report.set("user_id", "brianmoser");
220+
report.set("user_id", "$ANONYMIZED_USER_ID");
221221
report.set("session_ids", session_ids);
222222
223223
JsonObject reports = new JsonObject(true);
@@ -242,4 +242,14 @@ You can find the latest version of the SDK as a self-contained ZIP file in the [
242242

243243
## Examples
244244

245-
Each service has it's own example - you can find them in `Examples` folder of LearnositySDK project. To run them simply invoke static `Simple` method.
245+
Each service has it's own example - you can find them in `Examples` folder of LearnositySDK project. To run them simply invoke static `Simple` method.
246+
247+
## Tracking
248+
In version v0.9.0 we introduced code to track the following information by adding it to the request being signed:
249+
- SDK version
250+
- SDK language
251+
- SDK language version
252+
- Host platform (OS)
253+
- Platform version
254+
255+
We use this data to enable better support and feature planning. All subsequent versions of the SDK shall include this usage tracking.

0 commit comments

Comments
 (0)