{"id":13620696,"url":"https://github.com/JoeMayo/LinqToTwitter","last_synced_at":"2025-04-14T22:32:18.187Z","repository":{"id":27239892,"uuid":"30711694","full_name":"JoeMayo/LinqToTwitter","owner":"JoeMayo","description":"LINQ Provider for the Twitter API (C# Twitter Library)","archived":false,"fork":false,"pushed_at":"2024-07-16T22:39:24.000Z","size":334876,"stargazers_count":511,"open_issues_count":9,"forks_count":130,"subscribers_count":43,"default_branch":"main","last_synced_at":"2025-04-06T15:09:59.482Z","etag":null,"topics":["c-sharp","csharp","dotnet-core","dotnetcore","linq","linq-provider","tweets","twitter","twitter-api","twitter-api-v2","twitter-bot","twitter-library","twitter-oauth","twitter-streaming-api"],"latest_commit_sha":null,"homepage":"http://www.linqtotwitter.com","language":"C#","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/JoeMayo.png","metadata":{"files":{"readme":"ReadMe.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["joemayo"],"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2015-02-12T16:30:48.000Z","updated_at":"2025-03-17T04:02:57.000Z","dependencies_parsed_at":"2024-08-01T21:54:21.500Z","dependency_job_id":null,"html_url":"https://github.com/JoeMayo/LinqToTwitter","commit_stats":{"total_commits":918,"total_committers":32,"mean_commits":28.6875,"dds":0.383442265795207,"last_synced_commit":"f89eaef7ab2a630aca336e2e7dd0578e160f7b61"},"previous_names":[],"tags_count":25,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JoeMayo%2FLinqToTwitter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JoeMayo%2FLinqToTwitter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JoeMayo%2FLinqToTwitter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JoeMayo%2FLinqToTwitter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JoeMayo","download_url":"https://codeload.github.com/JoeMayo/LinqToTwitter/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248763381,"owners_count":21157907,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["c-sharp","csharp","dotnet-core","dotnetcore","linq","linq-provider","tweets","twitter","twitter-api","twitter-api-v2","twitter-bot","twitter-library","twitter-oauth","twitter-streaming-api"],"created_at":"2024-08-01T21:00:58.553Z","updated_at":"2025-04-14T22:32:18.180Z","avatar_url":"https://github.com/JoeMayo.png","language":"C#","funding_links":["https://github.com/sponsors/joemayo"],"categories":["C# #","Libraries"],"sub_categories":["C# / .NET","Queries"],"readme":"![LINQ to Twitter](https://i.imgur.com/ESNVAR4.png)\n\nLINQ to Twitter is an open source 3rd party LINQ Provider (Twitter Library) for the [Twitter](https://twitter.com/) micro-blogging service.  It uses standard LINQ syntax for queries and includes method calls for changes via the [Twitter API](https://dev.twitter.com/).\n\n## Example\n\nThe following query returns search results where people are tweeting about LINQ providers:\n```C#\nvar twitterCtx = new TwitterContext(...);\n\nTwitterSearch? searchResponse =\n    await\n    (from search in twitterCtx.TwitterSearch\n     where search.Type == SearchType.RecentSearch \u0026\u0026\n           search.Query == \"LINQ to\"\n     select search)\n    .SingleOrDefaultAsync();\n\nif (searchResponse?.Tweets != null)\n    searchResponse.Tweets.ForEach(tweet =\u003e\n        Console.WriteLine(\n            $\"\\nID: {tweet.ID}\" +\n            $\"\\nTweet: {tweet.Text}\"));\n```\nFrom a coding experience perspective, the `TwitterContext` type is analogous to the Entity Framework `DBContext`.  You use the `TwitterContext` instance, `twitterCtx`, to access `IQueryable\u003cT\u003e` tweet categories.  In the example above, the `TwitterSearch` will give you the ability to search Twitter for tweets meeting some criteria.\n\n\u003e *Note:* The ellipses in the TwitterContext parameters indicates that you need to provide an authorizer with credentials, which is required. You can visit [Securing Your Applications](https://github.com/JoeMayo/LinqToTwitter/wiki/Securing-Your-Applications) for documentation on authorizers and visit the Download page for working examples.\n\nEach query category has a `Type` property for the type of tweets you want to get back.  For example, `Tweet` queries can be made for `Mentions`, `ReverseChronological`, or `Tweets` timelines. Each query category also has an `XxxType` enum to help you figure out what is available. The example above uses `SearchType.RecentSearch` to perform searches on matching tweets that happened within the last two weeks or so.  Another example would be `Like` queries which might have `LikeType.Lookup` as its `Type` to get all the users who liked a tweet.  The `Type` idiom is consistent across all query categories.\n\nJust like other LINQ providers, you get an `IQueryable\u003cT\u003e` back from the query.  You can see how to materialize the query by invoking the `SingleOrDefaultAsync` operator.  For `TwitterSearch` results, you receive one `TwitterSearch` entity that contains metadata about the `Search` query and also contains a `Tweets` property that is a collection of `Tweet` entities. Just like other LINQ providers, LINQ to Twitter does deferred execution, so operators such as `ToListAsync` and `SingleOrDefaultAsync` or statements such as `for` and `foreach` loops will cause the query to execute and make the actual call to Twitter.\n\nLINQ to Twitter is asynchronous. You can see this where the code above `await's` the query, using the `SingleOrDefaultAsync` operator. Commands are async also. e.g. `await TweetAsync(\"Hello from LINQ to Twitter\")`.\n\nFor more details on how LINQ to Twitter works, you can visit [LINQ to Twitter v6 APIs](https://www.linqtotwitter.com/LINQ-to-Twitter-v6.html) for API specific examples. The downloadable source code also contains copious examples in the projects. Just look in the _Samples_ folder.\n\n## NuGet\nIn addition to being able to download from this site, you can also automatically install LINQ to Twitter into your projects via [NuGet](https://www.nuget.org/packages/linqtotwitter); \n\n## Available Feature Set\n\nSee [LINQ to Twitter v6 APIs](https://www.linqtotwitter.com/LINQ-to-Twitter-v6.html).\n\n## For more info:\n\n* follow [@JoeMayo](https://twitter.com/JoeMayo) for releases and related blog posts.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FJoeMayo%2FLinqToTwitter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FJoeMayo%2FLinqToTwitter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FJoeMayo%2FLinqToTwitter/lists"}