Class User.Builder

    • Constructor Detail

      • Builder

        public Builder​()
    • Method Detail

      • setBirthdate

        public User.Builder setBirthdate​(String birthdate)
        Set the birthday of the user object to be built.
        Parameters:
        birthdate - The user's date-of-birth.
        Returns:
        A User.Builder.
      • setCountry

        public User.Builder setCountry​(com.neovisionaries.i18n.CountryCode country)
        Set the home country of the user object to be built.
        Parameters:
        country - An ISO 3166-1 alpha-2 country code.
        Returns:
        A User.Builder.
      • setDisplayName

        public User.Builder setDisplayName​(String displayName)
        Set the display name of the user to be built. If the user hasn't a display name, set null instead.
        Parameters:
        displayName - The name displayed on the user's profile. null if not available.
        Returns:
        A User.Builder.
      • setEmail

        public User.Builder setEmail​(String email)
        Set the email address of the user to be built.
        Parameters:
        email - The user's email address, as entered by the user when creating their account.
        Returns:
        A User.Builder.
      • setExternalUrls

        public User.Builder setExternalUrls​(ExternalUrl externalUrls)
        Set external urls of the user to be built.
        Parameters:
        externalUrls - Known external URLs for this user.
        Returns:
        A User.Builder.
      • setFollowers

        public User.Builder setFollowers​(Followers followers)
        Set the followers object of the user to be built.
        Parameters:
        followers - Information about the followers of the user.
        Returns:
        A User.Builder.
      • setHref

        public User.Builder setHref​(String href)
        Set href of Spotify api endpoint of the user to be built.
        Parameters:
        href - A link to the Spotify Web API endpoint for this user.
        Returns:
        A User.Builder.
      • setImages

        public User.Builder setImages​(Image... images)
        Set the profile image of the user to be built.
        Parameters:
        images - The user's profile image.
        Returns:
        A User.Builder.
      • setProduct

        public User.Builder setProduct​(ProductType product)
        Set the product type of the user to be built.
        Parameters:
        product - The user's Spotify subscription level: "premium", "free", etc.
        Returns:
        A User.Builder.
      • setUri

        public User.Builder setUri​(String uri)
        Set the Spotify URI of the user to be built.
        Parameters:
        uri - The Spotify URI for the user.
        Returns:
        A User.Builder.
      • build

        public User build​()
        Description copied from interface: IModelObject.Builder
        Build a model object with the information set in the builder object.
        The type of the model object and its methods depend on its corresponding implementation.
        Returns:
        A model object.