You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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)
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 ?
The text was updated successfully, but these errors were encountered:
Could you try return self.library.applicationVersion? iirc String conforms to NodeValueConvertible. Let me know if that works.
Regarding docs, definitely agree that there's a lot of room for improvement. I'd ideally like to create a DocC catalog but haven't got around to it yet due to a lack of time. It's on the roadmap though.
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
The text was updated successfully, but these errors were encountered: