Coder Social home page Coder Social logo

admariner / pstwitterapi Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mkellerman/pstwitterapi

0.0 0.0 0.0 423 KB

PSTwitterAPI - a PowerShell module for the Twitter API

Home Page: https://mkellerman.github.io/Introducing_PSTwitterAPI/

PowerShell 100.00%

pstwitterapi's Introduction

PSGallery Version PSGallery Downloads

Azure Pipeline Analytics

PSTwitterAPI

Features

  • API Helpers cmdlets to mimic +125 Twitter API enpoints.
  • You can set multiple ApiKey/Token.
  • Handles rate limit for you, and rotate through your ApiKeys.
  • Handles loops to request more data. Available with:
    • Get-TwitterSearch_Tweets
    • Get-TwitterStatuses_HomeTimeline
    • Get-TwitterStatuses_MentionsTimeline
    • Get-TwitterStatuses_UserTimeline

Installation

Install-Module PSTwitterAPI

Getting started

Import-Module PSTwitterAPI

$OAuthSettings = @{
  ApiKey = $env:ApiKey
  ApiSecret = $env:ApiSecret
  AccessToken = $env:AccessToken
  AccessTokenSecret =$env:AccessTokenSecret
}
Set-TwitterOAuthSettings @OAuthSettings

# Use one of the API Helpers provided:
$TwitterUser = Get-TwitterUsers_Lookup -screen_name 'mkellerman'

# Send tweet to your timeline:
Send-TwitterStatuses_Update -status "Hello World!! @mkellerman #PSTwitterAPI"

# Send DM to a user:
$Event = Send-TwitterDirectMessages_EventsNew -recipient_id $TwitterUser.Id -text "Hello @$($TwitterUser.screen_name)!! #PSTwitterAPI"

# Get the tweets you would see on your timeline:
$TwitterStatuses = Get-TwitterStatuses_HomeTimeline -count 100

# Show last 5 home timeline tweets
Get-TwitterStatuses_HomeTimeline -count 5 | Select-Object -Property text -ExpandProperty user | Select-Object name, text | Format-List

# Get tweets from someone elses timeline (what they tweeted):
$TwitterStatuses = Get-TwitterStatuses_UserTimeline -screen_name 'mkellerman' -count 400

# Search for tweets:
$Tweets = Get-TwitterSearch_Tweets -q '#powershell' -count 400

Completed API Helper endpoints [To be tested]

  • Get-TwitterAccount_Settings
  • Get-TwitterAccount_VerifyCredentials
  • Get-TwitterApplication_RateLimitStatus
  • Get-TwitterBlocks_Ids
  • Get-TwitterBlocks_List
  • Get-TwitterCollections_Entries
  • Get-TwitterCollections_List
  • Get-TwitterCollections_Show
  • Get-TwitterCustomProfiles__Id
  • Get-TwitterCustomProfiles_List
  • Get-TwitterDirectMessages_EventsList
  • Get-TwitterDirectMessages_EventsShow
  • Get-TwitterDirectMessages_WelcomeMessagesList
  • Get-TwitterDirectMessages_WelcomeMessagesRulesList
  • Get-TwitterDirectMessages_WelcomeMessagesRulesShow
  • Get-TwitterDirectMessages_WelcomeMessagesShow
  • Get-TwitterFavorites_List
  • Get-TwitterFollowers_Ids
  • Get-TwitterFollowers_List
  • Get-TwitterFriends_Ids
  • Get-TwitterFriends_List
  • Get-TwitterFriendships_Incoming
  • Get-TwitterFriendships_Lookup
  • Get-TwitterFriendships_NoRetweetsIds
  • Get-TwitterFriendships_Outgoing
  • Get-TwitterFriendships_Show
  • Get-TwitterGeo_Id_PlaceId
  • Get-TwitterGeo_ReverseGeocode
  • Get-TwitterGeo_Search
  • Get-TwitterHelp_Configuration
  • Get-TwitterHelp_Languages
  • Get-TwitterHelp_Privacy
  • Get-TwitterHelp_Tos
  • Get-TwitterLists_List
  • Get-TwitterLists_Members
  • Get-TwitterLists_Memberships
  • Get-TwitterLists_MembersShow
  • Get-TwitterLists_Ownerships
  • Get-TwitterLists_Show
  • Get-TwitterLists_Statuses
  • Get-TwitterLists_Subscribers
  • Get-TwitterLists_SubscribersShow
  • Get-TwitterLists_Subscriptions
  • Get-TwitterMutes_UsersIds
  • Get-TwitterMutes_UsersList
  • Get-TwitterOauth_Authenticate
  • Get-TwitterOauth_Authorize
  • Get-TwitterSavedSearches_List
  • Get-TwitterSavedSearches_Show_Id
  • Get-TwitterSearch_Tweets
  • Get-TwitterStatuses_HomeTimeline
  • Get-TwitterStatuses_Lookup
  • Get-TwitterStatuses_MentionsTimeline
  • Get-TwitterStatuses_RetweetersIds
  • Get-TwitterStatuses_Retweets_Id
  • Get-TwitterStatuses_RetweetsOfMe
  • Get-TwitterStatuses_Sample
  • Get-TwitterStatuses_Show_Id
  • Get-TwitterStatuses_UserTimeline
  • Get-TwitterTrends_Available
  • Get-TwitterTrends_Closest
  • Get-TwitterTrends_Place
  • Get-TwitterUsers_Lookup
  • Get-TwitterUsers_ProfileBanner
  • Get-TwitterUsers_Search
  • Get-TwitterUsers_Show
  • Get-TwitterUsers_Suggestions
  • Get-TwitterUsers_Suggestions_Slug
  • Get-TwitterUsers_Suggestions_SlugMembers
  • Remove-TwitterCustomProfiles_Destroy
  • Send-TwitterAccount_RemoveProfileBanner
  • Send-TwitterAccount_Settings
  • Send-TwitterAccount_UpdateProfile
  • Send-TwitterAccount_UpdateProfileBackgroundImage
  • Send-TwitterAccount_UpdateProfileBanner
  • Send-TwitterAccount_UpdateProfileImage
  • Send-TwitterBlocks_Create
  • Send-TwitterBlocks_Destroy
  • Send-TwitterCollections_Create
  • Send-TwitterCollections_Destroy
  • Send-TwitterCollections_EntriesAdd
  • Send-TwitterCollections_EntriesCurate
  • Send-TwitterCollections_EntriesMove
  • Send-TwitterCollections_EntriesRemove
  • Send-TwitterCollections_Update
  • Send-TwitterCustomProfiles_New.Json
  • Send-TwitterDirectMessages_EventsNew
  • Send-TwitterDirectMessages_IndicateTyping
  • Send-TwitterDirectMessages_MarkRead
  • Send-TwitterDirectMessages_WelcomeMessagesNew
  • Send-TwitterDirectMessages_WelcomeMessagesRulesNew
  • Send-TwitterFavorites_Create
  • Send-TwitterFavorites_Destroy
  • Send-TwitterFriendships_Create
  • Send-TwitterFriendships_Destroy
  • Send-TwitterFriendships_Update
  • Send-TwitterLists_Create
  • Send-TwitterLists_Destroy
  • Send-TwitterLists_MembersCreate
  • Send-TwitterLists_MembersCreateAll
  • Send-TwitterLists_MembersDestroy
  • Send-TwitterLists_MembersDestroyAll
  • Send-TwitterLists_SubscribersCreate
  • Send-TwitterLists_SubscribersDestroy
  • Send-TwitterLists_Update
  • Send-TwitterMedia_MetadataCreate
  • Send-TwitterMedia_SubtitlesCreate
  • Send-TwitterMedia_SubtitlesDelete
  • Send-TwitterMedia_Upload
  • Send-TwitterMutes_UsersCreate
  • Send-TwitterMutes_UsersDestroy
  • Send-TwitterOauth_AccessToken
  • Send-TwitterOauth_InvalidateToken
  • Send-TwitterOauth_RequestToken
  • Send-TwitterOauth2_InvalidateToken
  • Send-TwitterOauth2_Token
  • Send-TwitterSavedSearches_Create
  • Send-TwitterSavedSearches_Destroy_Id
  • Send-TwitterStatuses_Destroy_Id
  • Send-TwitterStatuses_Filter
  • Send-TwitterStatuses_Retweet_Id
  • Send-TwitterStatuses_Unretweet_Id
  • Send-TwitterStatuses_Update
  • Send-TwitterStatuses_UpdateWithMedia
  • Send-TwitterUsers_ReportSpam

Resources

pstwitterapi's People

Contributors

ctmcisco avatar kamsalisbury avatar mkellerman avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.