
Contract purpose
This smart contract keeps a record of movies you want to see. Also, it has a function that, at every call, gives you the title of a movie you have not seen yet.
Exposed methods and variables
manager address of the list owner
list returns details about the movie the owner specified with a particular id
addMovie called by the owner to add a new movie to the list and returns an id for the movie. The next functions will be called with this id.
parameter name | type | details |
---|---|---|
_title | string | title of the movie |
_length | integer | length of the movie |
_releaseYear | integer | the release year of the movie |
seenMovie called by the owner when he want to mark one of the movies as seen
parameter name | type | details |
---|---|---|
id | integer | the unique identifier of the movie |
getUnseenMovie this function returns the title and length of the oldest unseen movie the owner added to the list. After watching it, he has to mark it as seen in order to get a different movie from this function. If all the movies are seen, it returns an empty string for the title and length 0.