C# Class BoxKite.Twitter.ListExtensions

Exibir arquivo Open project: nickhodge/BoxKite.Twitter

Public Methods

Method Description
AddUserToMyList ( this session, long listId, string screenNameToAdd = "", long userIdToAdd, string slug = "", string ownerScreenName = "", long ownerId ) : Task

Add a member to a list. The authenticated user must own the list to be able to add members to it.

ref: https://dev.twitter.com/docs/api/1.1/post/lists/members/create

AddUsersToList ( this session, long listId, string slug, IEnumerable screenNames, IEnumerable userIds, string ownerScreenName = "", long ownerId ) : Task

Adds multiple members to a list (up to 100)

ref: https://dev.twitter.com/docs/api/1.1/post/lists/members/create_all

ChangeList ( this session, long listId, string slug, string name = "", string mode = "", string description = "", long ownerId, string ownerScreenName = "" ) : Task

Updates the specified list. The authenticated user must own the list to be able to update it.

ref: https://dev.twitter.com/docs/api/1.1/post/lists/update

CreateList ( this session, string name, string mode, string description = "", long ownerId, string ownerScreenName = "" ) : Task

Creates a new list for the authenticated user. Note that you can't create more than 20 lists per account.

ref: https://dev.twitter.com/docs/api/1.1/post/lists/update

DeleteFromUsersList ( this session, long listId, string slug, string ownerScreenName = "", long ownerId ) : Task

Unsubscribes the authenticated user from the specified list.

ref: https://dev.twitter.com/docs/api/1.1/post/lists/subscribers/destroy

DeleteList ( this session, long listId, string slug, long ownerId, string ownerScreenName = "" ) : Task

Deletes the specified list. The authenticated user must own the list to be able to destroy it.

ref: https://dev.twitter.com/docs/api/1.1/post/lists/destroy

DeleteUserFromList ( this session, long listId, string slug = "", long userId, string screenName = "", string ownerScreenName = "", long ownerId ) : Task

Removes the specified member from the list. The authenticated user must be the list's owner to remove members from the list.

ref: https://dev.twitter.com/docs/api/1.1/post/lists/members/destroy

DeleteUsersFromList ( this session, long listId, string slug = "", IEnumerable screenNames = null, IEnumerable userIds = null, string ownerScreenName = "", long ownerId ) : Task

Removes multiple members from a list, by specifying a comma-separated list of member ids or screen names. The authenticated user must own the list to be able to remove members from it.

ref: https://dev.twitter.com/docs/api/1.1/post/lists/members/destroy_all

GetList ( this session, long listId, string slug, string ownerScreenName = "", long ownerId ) : Task

Returns the specified list. Private lists will only be shown if the authenticated user owns the specified list.

ref: https://dev.twitter.com/docs/api/1.1/get/lists/show

GetListMembershipForUser ( this session, long userId, string screenName = "", long cursor = -1 ) : Task

Returns the lists the specified user has been added to. If user_id or screen_name are not provided the memberships for the authenticating user are returned.

ref: https://dev.twitter.com/docs/api/1.1/get/lists/memberships

GetListOwned ( this session, string screenName = "", long userId, int count = 20, long cursor = -1 ) : Task

Returns the lists owned by the specified Twitter user. Private lists will only be shown if the authenticated user is also the owner of the lists.

ref: https://dev.twitter.com/docs/api/1.1/get/lists/ownerships

GetListSubscribers ( this session, long listId, string slug = "", long ownerId, string ownerScreenName = "", long cursor = -1 ) : Task

Returns the subscribers of the specified list. Private list subscribers will only be shown if the authenticated user owns the specified list.

ref: https://dev.twitter.com/docs/api/1.1/get/lists/subscribers

GetListTimeline ( this session, long listId, string slug, long ownerId, string ownerScreenName = "", long sinceId, int count = 20, long maxId, bool includeRetweets = true ) : Task>

Returns a timeline of tweets authored by members of the specified list. Retweets are included by default.

ref: https://dev.twitter.com/docs/api/1.1/get/lists/statuses

GetLists ( this session, long userId, string screenName = "", bool reverse = false ) : Task>

Returns all lists the authenticating or specified user subscribes to, including their own. The user is specified using the user_id or screen_name parameters. If no user is given, the authenticating user is used.

ref: https://dev.twitter.com/docs/api/1.1/get/lists/list

GetMembersOnList ( this session, long listId, string slug, string ownerScreenName = "", long ownerId, long cursor = -1 ) : Task

Returns the members of the specified list. Private list members will only be shown if the authenticated user owns the specified list.

ref: https://dev.twitter.com/docs/api/1.1/get/lists/members

GetMyListsUserIsMemberOf ( this session, long userId, string screenName = "", long cursor = -1 ) : Task

Returns the authenticating user's lists the specified user has been added to.

ref: https://dev.twitter.com/docs/api/1.1/get/lists/memberships

GetMySubscriptions ( this session, string screenName = "", long userId, int count = 20, long cursor = -1 ) : Task

Obtain a collection of the lists the specified user is subscribed to, 20 lists per page by default. Does not include the user's own lists.

ref: https://dev.twitter.com/docs/api/1.1/get/lists/subscriptions

IsSubscribedToList ( this session, long listId, string slug, long userId, string screenName = "", string ownerScreenName = "", long ownerId ) : Task

Check if the specified user is a subscriber of the specified list. Returns the user if they are subscriber.

ref: https://dev.twitter.com/docs/api/1.1/get/lists/subscribers/show

IsUserOnList ( this session, long listId, string slug = "", long userId, string screenName = "", string ownerScreenName = "", long ownerId ) : Task

Check if the specified user is a member of the specified list

ref: https://dev.twitter.com/docs/api/1.1/get/lists/members/show

SubscribeToUsersList ( this session, long listId, string slug, long ownerId, string ownerScreenName = "" ) : Task

Subscribes the authenticated user to the specified list.

ref: https://dev.twitter.com/docs/api/1.1/post/lists/subscribers/create

Method Details

AddUserToMyList() public static method

Add a member to a list. The authenticated user must own the list to be able to add members to it.
ref: https://dev.twitter.com/docs/api/1.1/post/lists/members/create
public static AddUserToMyList ( this session, long listId, string screenNameToAdd = "", long userIdToAdd, string slug = "", string ownerScreenName = "", long ownerId ) : Task
session this
listId long The numerical id of the list.
screenNameToAdd string The screen name of the user for whom to return results for. Helpful for disambiguating when a valid screen name is also a user ID.
userIdToAdd long The ID of the user for whom to return results for. Helpful for disambiguating when a valid user ID is also a valid screen name.
slug string You can identify a list by its slug instead of its numerical id. If you decide to do so, note that you'll also have to specify the list owner using the owner_id or owner_screen_name parameters.
ownerScreenName string The screen name of the user who owns the list being requested by a slug.
ownerId long The user ID of the user who owns the list being requested by a slug.
return Task

AddUsersToList() public static method

Adds multiple members to a list (up to 100)
ref: https://dev.twitter.com/docs/api/1.1/post/lists/members/create_all
public static AddUsersToList ( this session, long listId, string slug, IEnumerable screenNames, IEnumerable userIds, string ownerScreenName = "", long ownerId ) : Task
session this
listId long The numerical id of the list.
slug string You can identify a list by its slug instead of its numerical id. If you decide to do so, note that you'll also have to specify the list owner using the owner_id or owner_screen_name parameters.
screenNames IEnumerable list of screen names, up to 100 are allowed in a single request.
userIds IEnumerable list of user IDs, up to 100 are allowed in a single request.
ownerScreenName string The screen name of the user who owns the list being requested by a slug.
ownerId long The user ID of the user who owns the list being requested by a slug.
return Task

ChangeList() public static method

Updates the specified list. The authenticated user must own the list to be able to update it.
ref: https://dev.twitter.com/docs/api/1.1/post/lists/update
public static ChangeList ( this session, long listId, string slug, string name = "", string mode = "", string description = "", long ownerId, string ownerScreenName = "" ) : Task
session this
listId long The numerical id of the list.
slug string You can identify a list by its slug instead of its numerical id. If you decide to do so, note that you'll also have to specify the list owner using the owner_id or owner_screen_name parameters.
name string The name for the list.
mode string Whether your list is public or private. Values can be public or private. If no mode is specified the list will be public.
description string The description to give the list.
ownerId long The user ID of the user who owns the list being requested by a slug.
ownerScreenName string The screen name of the user who owns the list being requested by a slug.
return Task

CreateList() public static method

Creates a new list for the authenticated user. Note that you can't create more than 20 lists per account.
ref: https://dev.twitter.com/docs/api/1.1/post/lists/update
public static CreateList ( this session, string name, string mode, string description = "", long ownerId, string ownerScreenName = "" ) : Task
session this
name string The name for the list.
mode string Whether your list is public or private. Values can be public or private. If no mode is specified the list will be public.
description string The description to give the list.
ownerId long
ownerScreenName string
return Task

DeleteFromUsersList() public static method

Unsubscribes the authenticated user from the specified list.
ref: https://dev.twitter.com/docs/api/1.1/post/lists/subscribers/destroy
public static DeleteFromUsersList ( this session, long listId, string slug, string ownerScreenName = "", long ownerId ) : Task
session this
listId long The numerical id of the list.
slug string You can identify a list by its slug instead of its numerical id. If you decide to do so, note that you'll also have to specify the list owner using the owner_id or owner_screen_name parameters.
ownerScreenName string The screen name of the user who owns the list being requested by a slug
ownerId long The user ID of the user who owns the list being requested by a slug.
return Task

DeleteList() public static method

Deletes the specified list. The authenticated user must own the list to be able to destroy it.
ref: https://dev.twitter.com/docs/api/1.1/post/lists/destroy
public static DeleteList ( this session, long listId, string slug, long ownerId, string ownerScreenName = "" ) : Task
session this
listId long The numerical id of the list.
slug string You can identify a list by its slug instead of its numerical id. If you decide to do so, note that you'll also have to specify the list owner using the owner_id or owner_screen_name parameters.
ownerId long The user ID of the user who owns the list being requested by a slug.
ownerScreenName string The screen name of the user who owns the list being requested by a slug.
return Task

DeleteUserFromList() public static method

Removes the specified member from the list. The authenticated user must be the list's owner to remove members from the list.
ref: https://dev.twitter.com/docs/api/1.1/post/lists/members/destroy
public static DeleteUserFromList ( this session, long listId, string slug = "", long userId, string screenName = "", string ownerScreenName = "", long ownerId ) : Task
session this
listId long The numerical id of the list.
slug string You can identify a list by its slug instead of its numerical id. If you decide to do so, note that you'll also have to specify the list owner using the owner_id or owner_screen_name parameters.
userId long The ID of the user to remove from the list. Helpful for disambiguating when a valid user ID is also a valid screen name.
screenName string The screen name of the user for whom to remove from the list. Helpful for disambiguating when a valid screen name is also a user ID.
ownerScreenName string The screen name of the user who owns the list being requested by a slug.
ownerId long The user ID of the user who owns the list being requested by a slug.
return Task

DeleteUsersFromList() public static method

Removes multiple members from a list, by specifying a comma-separated list of member ids or screen names. The authenticated user must own the list to be able to remove members from it.
ref: https://dev.twitter.com/docs/api/1.1/post/lists/members/destroy_all
public static DeleteUsersFromList ( this session, long listId, string slug = "", IEnumerable screenNames = null, IEnumerable userIds = null, string ownerScreenName = "", long ownerId ) : Task
session this
listId long The numerical id of the list.
slug string You can identify a list by its slug instead of its numerical id. If you decide to do so, note that you'll also have to specify the list owner using the owner_id or owner_screen_name parameters.
screenNames IEnumerable list of screen names, up to 100 are allowed in a single request.
userIds IEnumerable list of user IDs, up to 100 are allowed in a single request.
ownerScreenName string The screen name of the user who owns the list being requested by a slug.
ownerId long The user ID of the user who owns the list being requested by a slug.
return Task

GetList() public static method

Returns the specified list. Private lists will only be shown if the authenticated user owns the specified list.
ref: https://dev.twitter.com/docs/api/1.1/get/lists/show
public static GetList ( this session, long listId, string slug, string ownerScreenName = "", long ownerId ) : Task
session this
listId long The numerical id of the list.
slug string You can identify a list by its slug instead of its numerical id. If you decide to do so, note that you'll also have to specify the list owner using the owner_id or owner_screen_name parameters.
ownerScreenName string The screen name of the user who owns the list being requested by a slug.
ownerId long The user ID of the user who owns the list being requested by a slug.
return Task

GetListMembershipForUser() public static method

Returns the lists the specified user has been added to. If user_id or screen_name are not provided the memberships for the authenticating user are returned.
ref: https://dev.twitter.com/docs/api/1.1/get/lists/memberships
public static GetListMembershipForUser ( this session, long userId, string screenName = "", long cursor = -1 ) : Task
session this
userId long The ID of the user for whom to return results for.
screenName string The screen name of the user for whom to return results for.
cursor long Breaks the results into pages. Provide a value of -1 to begin paging.
return Task

GetListOwned() public static method

Returns the lists owned by the specified Twitter user. Private lists will only be shown if the authenticated user is also the owner of the lists.
ref: https://dev.twitter.com/docs/api/1.1/get/lists/ownerships
public static GetListOwned ( this session, string screenName = "", long userId, int count = 20, long cursor = -1 ) : Task
session this
screenName string
userId long
count int
cursor long
return Task

GetListSubscribers() public static method

Returns the subscribers of the specified list. Private list subscribers will only be shown if the authenticated user owns the specified list.
ref: https://dev.twitter.com/docs/api/1.1/get/lists/subscribers
public static GetListSubscribers ( this session, long listId, string slug = "", long ownerId, string ownerScreenName = "", long cursor = -1 ) : Task
session this
listId long The numerical id of the list.
slug string You can identify a list by its slug instead of its numerical id. If you decide to do so, note that you'll also have to specify the list owner using the owner_id or owner_screen_name parameters.
ownerId long The user ID of the user who owns the list being requested by a slug.
ownerScreenName string The screen name of the user who owns the list being requested by a slug.
cursor long Breaks the results into pages.
return Task

GetListTimeline() public static method

Returns a timeline of tweets authored by members of the specified list. Retweets are included by default.
ref: https://dev.twitter.com/docs/api/1.1/get/lists/statuses
public static GetListTimeline ( this session, long listId, string slug, long ownerId, string ownerScreenName = "", long sinceId, int count = 20, long maxId, bool includeRetweets = true ) : Task>
session this
listId long The numerical id of the list.
slug string You can identify a list by its slug instead of its numerical id. If you decide to do so, note that you'll also have to specify the list owner using the owner_id or owner_screen_name parameters.
ownerId long The user ID of the user who owns the list being requested by a slug.
ownerScreenName string The screen name of the user who owns the list being requested by a slug.
sinceId long Returns results with an ID greater than (that is, more recent than) the specified ID.
count int Specifies the number of results to retrieve per "page."
maxId long Returns results with an ID less than (that is, older than) or equal to the specified ID.
includeRetweets bool the list timeline will contain native retweets (if they exist) in addition to the standard stream of tweets.
return Task>

GetLists() public static method

Returns all lists the authenticating or specified user subscribes to, including their own. The user is specified using the user_id or screen_name parameters. If no user is given, the authenticating user is used.
ref: https://dev.twitter.com/docs/api/1.1/get/lists/list
public static GetLists ( this session, long userId, string screenName = "", bool reverse = false ) : Task>
session this
userId long The ID of the user for whom to return results for. Helpful for disambiguating when a valid user ID is also a valid screen name.
screenName string The screen name of the user for whom to return results for.
reverse bool Set this to true if you would like owned lists to be returned first.
return Task>

GetMembersOnList() public static method

Returns the members of the specified list. Private list members will only be shown if the authenticated user owns the specified list.
ref: https://dev.twitter.com/docs/api/1.1/get/lists/members
public static GetMembersOnList ( this session, long listId, string slug, string ownerScreenName = "", long ownerId, long cursor = -1 ) : Task
session this
listId long The numerical id of the list.
slug string You can identify a list by its slug instead of its numerical id. If you decide to do so, note that you'll also have to specify the list owner using the owner_id or owner_screen_name parameters.
ownerScreenName string The screen name of the user who owns the list being requested by a slug.
ownerId long The user ID of the user who owns the list being requested by a slug.
cursor long Breaks the results into pages.
return Task

GetMyListsUserIsMemberOf() public static method

Returns the authenticating user's lists the specified user has been added to.
ref: https://dev.twitter.com/docs/api/1.1/get/lists/memberships
public static GetMyListsUserIsMemberOf ( this session, long userId, string screenName = "", long cursor = -1 ) : Task
session this
userId long The ID of the user for whom to return results for.
screenName string The screen name of the user for whom to return results for.
cursor long Breaks the results into pages. Provide a value of -1 to begin paging.
return Task

GetMySubscriptions() public static method

Obtain a collection of the lists the specified user is subscribed to, 20 lists per page by default. Does not include the user's own lists.
ref: https://dev.twitter.com/docs/api/1.1/get/lists/subscriptions
public static GetMySubscriptions ( this session, string screenName = "", long userId, int count = 20, long cursor = -1 ) : Task
session this
screenName string The screen name of the user for whom to return results for. Helpful for disambiguating when a valid screen name is also a user ID.
userId long The ID of the user for whom to return results for. Helpful for disambiguating when a valid user ID is also a valid screen name.
count int The amount of results to return per page. Defaults to 20. No more than 1000 results will ever be returned in a single page.
cursor long Breaks the results into pages. Provide a value of -1 to begin paging.
return Task

IsSubscribedToList() public static method

Check if the specified user is a subscriber of the specified list. Returns the user if they are subscriber.
ref: https://dev.twitter.com/docs/api/1.1/get/lists/subscribers/show
public static IsSubscribedToList ( this session, long listId, string slug, long userId, string screenName = "", string ownerScreenName = "", long ownerId ) : Task
session this
listId long The numerical id of the list.
slug string You can identify a list by its slug instead of its numerical id. If you decide to do so, note that you'll also have to specify the list owner using the owner_id or owner_screen_name parameters.
userId long The ID of the user for whom to return results for. Helpful for disambiguating when a valid user ID is also a valid screen name.
screenName string The screen name of the user for whom to return results for. Helpful for disambiguating when a valid screen name is also a user ID.
ownerScreenName string The screen name of the user who owns the list being requested by a slug.
ownerId long The user ID of the user who owns the list being requested by a slug.
return Task

IsUserOnList() public static method

Check if the specified user is a member of the specified list
ref: https://dev.twitter.com/docs/api/1.1/get/lists/members/show
public static IsUserOnList ( this session, long listId, string slug = "", long userId, string screenName = "", string ownerScreenName = "", long ownerId ) : Task
session this
listId long The numerical id of the list.
slug string You can identify a list by its slug instead of its numerical id. If you decide to do so, note that you'll also have to specify the list owner using the owner_id or owner_screen_name parameters.
userId long The ID of the user for whom to return results for. Helpful for disambiguating when a valid user ID is also a valid screen name.
screenName string The screen name of the user for whom to return results for. Helpful for disambiguating when a valid screen name is also a user ID.
ownerScreenName string The screen name of the user who owns the list being requested by a slug.
ownerId long The user ID of the user who owns the list being requested by a slug.
return Task

SubscribeToUsersList() public static method

Subscribes the authenticated user to the specified list.
ref: https://dev.twitter.com/docs/api/1.1/post/lists/subscribers/create
public static SubscribeToUsersList ( this session, long listId, string slug, long ownerId, string ownerScreenName = "" ) : Task
session this
listId long The numerical id of the list.
slug string You can identify a list by its slug instead of its numerical id. If you decide to do so, note that you'll also have to specify the list owner using the owner_id or owner_screen_name parameters.
ownerId long The user ID of the user who owns the list being requested by a slug.
ownerScreenName string The screen name of the user who owns the list being requested by a slug.
return Task