Tweetinvi

First steps

  • Getting Started
  • Basic Concepts

Credentials

  • Credentials
  • Rate Limits Handlers
  • Rate Limits API

Twitter API - v1.1

  • Tweets
  • Timelines
  • Users
  • Followers, Friends and Relationships
  • Messages
  • Search
    • User Search
    • Tweet Search
    • Saved Searches
  • Lists
  • Direct API calls
  • Media Upload
  • Iterators
  • Trends
  • Help

Twitter API - v2

  • Basics of API V2
  • Tweets V2
  • Users V2
  • Search V2

Authentication

  • Introduction to Authentication
  • URL Redirect Authentication
  • PIN based Authentication

Account Activity

  • Account Activity
  • Account Activity - AspNet
  • Account Activity - HttpServer
  • Account Activity - Subscriptions
  • Account Activity - Stream/Events

Streams V1.1

  • Streams Introduction
  • Tweet Stream
  • Sample Stream
  • Filtered Streams
  • Filtered Stream - Filters
  • Labs Sample Stream
  • Labs Filtered Stream

Streams V2

  • Sample Stream V2

Twitter Client

  • Twitter Client
  • Twitter Client - Events
  • Json - Serialize/Deserialize

Releases

  • Releases

More

  • Exceptions
  • Twitter Labs
  • Extended Tweets
  • Parameters Validators
  • Tweetinvi Container
  • License
  • Help and Feedback
Tweetinvi
  • »
  • Search

Search¶

User Search¶

var users = await userClient.Search.SearchUsersAsync("tweetinvi");

// or

var usersIterator = userClient.Search.GetSearchUsersIterator("tweetinvi");

User search paging of Twitter API does not behave the same as other Twitter API endpoint (including tweet search).

  • First search will run on page 1 (and not 0) - do not change this value to 0.

  • Pages can return the same items multiple times (tweetinvi will filter these for you).

  • Tweetinvi will need to perform 1 additional request to detect the completion of the iterator.

Why?
  • Twitter user search API always return results regardless of the page you request.

  • Twitter user search API always return a number of items equal to count requested.

  • Twitter can return multiple time the same results in different pages.

Tweet Search¶

var tweets = await client.Search.SearchTweetsAsync("hello");

//or

var tweetsIterator = client.Search.GetSearchTweetsIterator(new SearchTweetsParameters("hello"));

Tweet search paging of Twitter API does not inform of no more results available.
As a result Tweetinvi will need to perform 1 additional request to detect the completion of the iterator.

Saved Searches¶

Twitter API offers a way to interact with users’ saved searches.

var savedSearch = await userClient.Search.CreateSavedSearchAsync("hello");
var createdSavedSearch = await userClient.Search.GetSavedSearchAsync(savedSearch.Id);
var mySavedSearches = await userClient.Search.ListSavedSearchesAsync();
await userClient.Search.DestroySavedSearchAsync(savedSearch.Id);
Next Previous

© Copyright 2020, linvi

Built with Sphinx using a theme provided by Read the Docs.