Skip to content

Commit

Permalink
Fixed course image retrieval
Browse files Browse the repository at this point in the history
  • Loading branch information
allomanta authored and goomens committed Oct 21, 2024
1 parent f287fab commit 0c9f93f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Types/Course.cs
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public class Course : CanvasObject
[JsonProperty("workflow_state")]
public CourseState State { get; set; }

[JsonProperty("course_image")]
[JsonProperty("image_download_url")]
public string Image { get; set; }

[JsonProperty("grading_standard_enabled")]
Expand Down
1 change: 1 addition & 0 deletions Types/User.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ public class User : CanvasObject
{
public User(CanvasApiConnector conn) { Connector = conn; }

public IEnumerable<Course> GetCourses(bool includeImage) => Connector.RetrieveCollection<Course>(this, param: ("include[]", "course_image"));
public override string ToString() => $"User {Name}";
internal override string CanvasObjectID => "user";
internal override string SaveUrl => $"users/{ID}";
Expand Down
2 changes: 1 addition & 1 deletion UvA.Connectors.Canvas.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<Version>0.25.6</Version>
<Version>0.25.7</Version>
<Authors>UvA-FNWI</Authors>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<Description>Connector for the Instructure Canvas REST API</Description>
Expand Down

0 comments on commit 0c9f93f

Please sign in to comment.