def __init__(self, session, id):
    """Creates an instance of Media.

    :type session: :class:`myanimelist.session.Session`
    :param session: A valid MAL session.

    :type id: int
    :param id: The media's ID.

    :raises: :class:`.InvalidMediaError`

    """
    super(Media, self).__init__(session)
    self.id = id
    if not isinstance(self.id, int) or int(self.id) < 1:
      raise InvalidMediaError(self.id)
    self._title = None
    self._picture = None
    self._alternative_titles = None
    self._type = None
    self._status = None
    self._genres = None
    self._score = None
    self._rank = None
    self._popularity = None
    self._members = None
    self._favorites = None
    self._popular_tags = None
    self._synopsis = None
    self._related = None
    self._characters = None
    self._score_stats = None
    self._status_stats = None
def __init__ ( self , session , id ) : super ( Media , self ) . __init__ ( session ) self . id = id if not isinstance ( self . id , int ) or int ( self . id ) < 1 : raise InvalidMediaError ( self . id ) self . _title = None self . _picture = None self . _alternative_titles = None self . _type = None self . _status = None self . _genres = None self . _score = None self . _rank = None self . _popularity = None self . _members = None self . _favorites = None self . _popular_tags = None self . _synopsis = None self . _related = None self . _characters = None self . _score_stats = None self . _status_stats = None
Creates an instance of Media.

    :type session: :class:`myanimelist.session.Session`
    :param session: A valid MAL session.

    :type id: int
    :param id: The media's ID.

    :raises: :class:`.InvalidMediaError`