Skip to content

Commit

Permalink
Add avg_rating metadata field
Browse files Browse the repository at this point in the history
  • Loading branch information
jbuckner committed Mar 28, 2022
1 parent 6181a8c commit 27ffa10
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/models/metadata.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,12 @@ export class Metadata {
: undefined;
}

@Memoize() get avg_rating(): NumberField | undefined {
return this.rawMetadata?.avg_rating
? new NumberField(this.rawMetadata.avg_rating)
: undefined;
}

/**
* All of the collections that an Item is in, including
* all of the side-loaded collections from the ListAPI
Expand Down

0 comments on commit 27ffa10

Please sign in to comment.