-
Notifications
You must be signed in to change notification settings - Fork 25
Issue with NodeValue, documentation maybe ? #20
Copy link
Copy link
Open
Description
Hi, great project but the example seems just a little minimal.
I am trying to access the iTunesLibrary from node but i am not sure how to map the values/types to return types.
In this example its just a string that does not seem to work for me.
no exact matches in call to initializer return NodeValue(self.library.applicationVersion)
my plan was to map playlist but i got stuck with just the string.
https://developer.apple.com/documentation/ituneslibrary/itlibrary/allplaylists
import iTunesLibrary
import NodeAPI
@NodeClass final class iTunesLibraryClass {
private let library: ITLibrary
@NodeActor
@NodeConstructor init() throws {
library = try ITLibrary(apiVersion: "1.0")
}
@NodeActor
@NodeMethod func allPlaylists() throws -> NodeValueConvertible {
return NodeValue(self.library.applicationVersion)
}
}
#NodeModule(exports: ["iTunesLibrary": iTunesLibraryClass.deferredConstructor])`
Any documentation or examples that i can check out how this works ?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels