# man > Net::Twitter::Role::API::Lists

## NAME
    [Net::Twitter::Role::API::Lists](https://www.chedong.com/phpMan.php/perldoc/Net%3A%3ATwitter%3A%3ARole%3A%3AAPI%3A%3ALists/markdown) - Twitter Lists API support for [Net::Twitter](https://www.chedong.com/phpMan.php/perldoc/Net%3A%3ATwitter/markdown)

## VERSION
    version 4.01043

## SYNOPSIS
      use [Net::Twitter](https://www.chedong.com/phpMan.php/perldoc/Net%3A%3ATwitter/markdown);

      my $nt = [Net::Twitter](https://www.chedong.com/phpMan.php/perldoc/Net%3A%3ATwitter/markdown)->new(traits => ['[API::Lists](https://www.chedong.com/phpMan.php/perldoc/API%3A%3ALists/markdown)'], ...);

      $list = $nt->create_list($owner, { name => $name, description => $desc });
      $list = $nt->update_list($owner, $list_id, { description => $desc });

      $lists = $nt->get_lists($owner);
      $lists = $nt->list_lists($owner);

      $list = $nt->get_list($owner, $list_id);
      $list = $nt->delete_list($owner, $list_id);

      $statuses = $nt->list_statuses($owner, $list_id);

      $lists = $nt->list_memberships($owner);
      $lists = $nt->list_subscriptions($owner);

      $users = $nt->list_members($owner, $list_id);

      $user_or_undef = $nt->list_members($owner, $list_id, { id => $user_id });

      $user = $nt->add_list_member($owner, $list_id, $user_id);
      $users = $nt->add_list_members($owner, $list_id, { screen_name => \@screen_names });

      $user = $nt->delete_list_member($owner, $list_id, $user_id);
      $user = $nt->remove_list_member($owner, $list_id, $user_id);

      $user_or_undef = $nt->is_list_member($owner, $list_id, $user_id);

      $users = $nt->list_subscribers($owner, $list_id);

      $list = $nt->subscribe_list($owner, $list_id);
      $list = $nt->unsubscribe_list($owner, $list_id);

      $user_or_undef = $nt->is_subscribed_list($owner, $list_id, $user_id);
      $user_or_undef = $nt->is_list_subscriber($owner, $list_id, $user_id);

      #############################
      # With the cursor parameter #
      #############################

      $r = $nt->get_list($user, $list_id, { cursor => $cursor });
      $lists = $r->{lists};

      $r = $nt->list_memberships($user, { cursor => $cursor });
      $lists = $r->{lists};

      $r = $nt->list_subscriptions($user, { cursor => $cursor });
      $lists = $r->{lists};

      $r = $nt->list_members($owner, $list_id, { cursor => $cursor });
      $users = $r->{users};

      $r = $nt->list_subscribers($owner, $list_id, { cursor => $cursor });
      $users = $r->{users};

## DEPRECATION NOTICE
    This module implements methods for the original Twitter Lists API. Twitter has deprecated these
    API methods and reimplemented them with a saner semantics. The new methods are implemented in
    the [API::REST](https://www.chedong.com/phpMan.php/perldoc/API%3A%3AREST/markdown) trait, [Net::Twitter::Role::API::REST](https://www.chedong.com/phpMan.php/perldoc/Net%3A%3ATwitter%3A%3ARole%3A%3AAPI%3A%3AREST/markdown). This module provides backwards compatibility
    for code written to use the original Lists API. To use the new API methods, simply remove this
    trait from your code and change the arguments to its methods to match the new semantics.

    This module may be dropped from [Net::Twitter](https://www.chedong.com/phpMan.php/perldoc/Net%3A%3ATwitter/markdown) in a future release. It will remain as long as
    Twitter still provides the underlying API end-points.

## DESCRIPTION
    This module adds support to [Net::Twitter](https://www.chedong.com/phpMan.php/perldoc/Net%3A%3ATwitter/markdown) for the Twitter Lists API.

## DESCRIPTION
    [Net::Twitter::Role::API::Lists](https://www.chedong.com/phpMan.php/perldoc/Net%3A%3ATwitter%3A%3ARole%3A%3AAPI%3A%3ALists/markdown) provides a trait for the Twitter Lists API methods. See
    [Net::Twitter](https://www.chedong.com/phpMan.php/perldoc/Net%3A%3ATwitter/markdown) for full documentation.

## SEE ALSO
    [Net::Twitter](https://www.chedong.com/phpMan.php/perldoc/Net%3A%3ATwitter/markdown)

## AUTHOR
    Marc Mims <<marc@questright.com>>

## COPYRIGHT
    Copyright (c) 2009-2016 Marc Mims

## LICENSE
    This library is free software. You may redistribute and modify it under the same terms as Perl
    itself.

