diff --git a/plugins/host/scrobble_retriever.go b/plugins/host/scrobble_retriever.go index 2fd8ee17c..02c6005a4 100644 --- a/plugins/host/scrobble_retriever.go +++ b/plugins/host/scrobble_retriever.go @@ -10,7 +10,7 @@ type ScrobbleList struct { // If additional items are available, the timestamp of the next scrobble to fetch NextTimestamp *int64 `json:"nextTimestamp,omitempty"` // In the event that multiple scrobbles were submitted at the same time, cursor - // will be populated to enable future queries. If this cursor is nonero + // will be populated to enable future queries. If this cursor is nonzero // it should be passed on for the next request Cursor int `json:"cursor,omitempty"` } @@ -81,7 +81,7 @@ type ScrobbleRetrieverService interface { // Returns: // - Scrobbles: A list of scrobbles within the constraints given (if any). The order // of the items depends on the options: if ToTimestamp is specified AND - // FromTImestamp is not specified, the order is in descending submission time. + // FromTimestamp is not specified, the order is in descending submission time. // Otherwise, the scrobbles are returned in ascending submission time. // - NextTimestamp: If there are additional items to retrieve in the range, the timestamp // of the next scrobble that would be retrieved in the order (asc or desc) diff --git a/plugins/host_scrobbleretriever.go b/plugins/host_scrobbleretriever.go index ed4fc01c2..c7ccb607e 100644 --- a/plugins/host_scrobbleretriever.go +++ b/plugins/host_scrobbleretriever.go @@ -15,7 +15,7 @@ type scrobbleRetrieverServiceImpl struct { users userAccess } -func newScrobbleRetreverService(ds model.DataStore, users userAccess) host.ScrobbleRetrieverService { +func newScrobbleRetrieverService(ds model.DataStore, users userAccess) host.ScrobbleRetrieverService { return &scrobbleRetrieverServiceImpl{ ds: ds, users: users, diff --git a/plugins/host_scrobbleretriever_test.go b/plugins/host_scrobbleretriever_test.go index 3d4ce73ac..e43d529c4 100644 --- a/plugins/host_scrobbleretriever_test.go +++ b/plugins/host_scrobbleretriever_test.go @@ -24,7 +24,7 @@ import ( . "github.com/onsi/gomega" ) -var _ = Describe("Scrobbble Retriever Host Function", Ordered, func() { +var _ = Describe("Scrobble Retriever Host Function", Ordered, func() { var ( manager *Manager tmpDir string @@ -257,12 +257,12 @@ var _ = Describe("Scrobbble Retriever Host Function", Ordered, func() { })) }, Entry("calls scrobbles in ascending order", `{"username":"adminuser"}`, scrobbles, nil, 0), - Entry("calls scrobbles in ascending order by request", `{"username":"adminuser","descending":true}`, scrobblesReversed, nil, 0), + Entry("calls scrobbles in descending order by request", `{"username":"adminuser","descending":true}`, scrobblesReversed, nil, 0), Entry("calls scrobbles in ascending order, beyond range", `{"username":"adminuser","fromTimestamp":-1, "toTimestamp": 1000}`, scrobbles, nil, 0), Entry("calls subset of scrobbles in ascending order, next timestamp", `{"username":"adminuser","maxItems":2}`, scrobbles[:2], p(2), 0), Entry("calls subset of scrobbles in ascending order, with offset next timestamp", `{"username":"adminuser","maxItems":2,"fromTimestamp":1}`, scrobbles[1:3], p(2), 1), Entry("calls subset of scrobbles in ascending order, from and to timestamp", `{"username":"adminuser","toTimestamp":2,"fromTimestamp":1}`, scrobbles[1:], nil, 0), - Entry("calls subset of scrobbles in descing order, from and to timestamp", `{"username":"adminuser","toTimestamp":2,"fromTimestamp":1,"descending":true}`, scrobblesReversed[:3], nil, 0), + Entry("calls subset of scrobbles in descending order, from and to timestamp", `{"username":"adminuser","toTimestamp":2,"fromTimestamp":1,"descending":true}`, scrobblesReversed[:3], nil, 0), Entry("calls in reverse order, full", `{"username":"adminuser","toTimestamp":2}`, scrobblesReversed, nil, 0), Entry("calls in reverse order, with count", `{"username":"adminuser","toTimestamp":2, "maxItems": 3}`, scrobblesReversed[:3], p(0), 0), Entry("calls in reverse order, with count of 1", `{"username":"adminuser","toTimestamp":2, "maxItems": 1}`, scrobblesReversed[:1], p(2), 1), diff --git a/plugins/manager_loader.go b/plugins/manager_loader.go index bd779d624..439c944f5 100644 --- a/plugins/manager_loader.go +++ b/plugins/manager_loader.go @@ -181,7 +181,7 @@ var hostServices = []hostServiceEntry{ name: "ScrobbleRetriever", hasPermission: func(p *Permissions) bool { return p != nil && p.ScrobbleRetriever != nil }, create: func(ctx *serviceContext) ([]extism.HostFunction, io.Closer, error) { - service := newScrobbleRetreverService(ctx.manager.ds, newUserAccess(ctx.allowedUsers, ctx.allUsers)) + service := newScrobbleRetrieverService(ctx.manager.ds, newUserAccess(ctx.allowedUsers, ctx.allUsers)) return host.RegisterScrobbleRetrieverHostFunctions(service), nil, nil }, }, diff --git a/plugins/pdk/go/host/nd_host_scrobbleretriever.go b/plugins/pdk/go/host/nd_host_scrobbleretriever.go index 4b8f37c7f..5c6794cc2 100644 --- a/plugins/pdk/go/host/nd_host_scrobbleretriever.go +++ b/plugins/pdk/go/host/nd_host_scrobbleretriever.go @@ -190,7 +190,7 @@ func ScrobbleRetrieverGetLastTimestamp(username string) (*int64, error) { // Returns: // - Scrobbles: A list of scrobbles within the constraints given (if any). The order // of the items depends on the options: if ToTimestamp is specified AND -// FromTImestamp is not specified, the order is in descending submission time. +// FromTimestamp is not specified, the order is in descending submission time. // Otherwise, the scrobbles are returned in ascending submission time. // - NextTimestamp: If there are additional items to retrieve in the range, the timestamp // of the next scrobble that would be retrieved in the order (asc or desc) diff --git a/plugins/pdk/go/host/nd_host_scrobbleretriever_stub.go b/plugins/pdk/go/host/nd_host_scrobbleretriever_stub.go index 39320227a..674d381f1 100644 --- a/plugins/pdk/go/host/nd_host_scrobbleretriever_stub.go +++ b/plugins/pdk/go/host/nd_host_scrobbleretriever_stub.go @@ -99,7 +99,7 @@ func (m *mockScrobbleRetrieverService) GetScrobbles(username string, options Scr // Returns: // - Scrobbles: A list of scrobbles within the constraints given (if any). The order // of the items depends on the options: if ToTimestamp is specified AND -// FromTImestamp is not specified, the order is in descending submission time. +// FromTimestamp is not specified, the order is in descending submission time. // Otherwise, the scrobbles are returned in ascending submission time. // - NextTimestamp: If there are additional items to retrieve in the range, the timestamp // of the next scrobble that would be retrieved in the order (asc or desc) diff --git a/plugins/pdk/rust/nd-pdk-host/src/nd_host_scrobbleretriever.rs b/plugins/pdk/rust/nd-pdk-host/src/nd_host_scrobbleretriever.rs index 5a43361ff..e6245a649 100644 --- a/plugins/pdk/rust/nd-pdk-host/src/nd_host_scrobbleretriever.rs +++ b/plugins/pdk/rust/nd-pdk-host/src/nd_host_scrobbleretriever.rs @@ -182,7 +182,7 @@ pub fn get_last_timestamp(username: &str) -> Result, Error> { /// Returns: /// - Scrobbles: A list of scrobbles within the constraints given (if any). The order /// of the items depends on the options: if ToTimestamp is specified AND -/// FromTImestamp is not specified, the order is in descending submission time. +/// FromTimestamp is not specified, the order is in descending submission time. /// Otherwise, the scrobbles are returned in ascending submission time. /// - NextTimestamp: If there are additional items to retrieve in the range, the timestamp /// of the next scrobble that would be retrieved in the order (asc or desc)