Coder Social home page Coder Social logo

thedavecarroll / bluebirdps Goto Github PK

View Code? Open in Web Editor NEW
60.0 6.0 11.0 1.59 MB

A Twitter Automation Client for PowerShell 7

Home Page: https://docs.bluebirdps.dev

License: MIT License

PowerShell 63.13% C# 36.87%
twitter-api powershell-module powershell twitter twitter-client powershell-gallery twitterdm tweets tweet twitter-api-v1

bluebirdps's Introduction

BluebirdPS: A Twitter Automation Client for PowerShell 7

BluebirdPS This is the project repo for BluebirdPS, a Twitter automation client for PowerShell 7.

PowerShell Gallery Downloads PowerShell Gallery Version (including pre-releases)

Standard v2

No Longer Active

Due to the recent changes with the Twitter API primarily regarding the new tiers, I will no longer continue developing this project. It should be considered stale and no new versions will be released. The latest version, v0.8.4, seeks to correct an issue in the Free Tier with Publish-Tweet.

This module will allow you to tweet, retweet, send direct messages, manage lists, and more, if you pay for the Basic or Pro Tiers. Otherwise, you should be able to tweet and delete tweets if using the Free Tier.

See Twitter API Documentation for details.

Community Module

This module was developed for the community and accepted feedback from the community to make it what it had become.

Pre-requisites

In order to use this module, you will need to have PowerShell 7 installed and a Twitter Developer account and a Twitter Project/App created and request to API v2 Early Access.

PowerShell 7

In order to support cross-platform scenarios, PowerShell 7 was chosen as the version for this new module. Focusing on a single version will also allow us to forego handling the API calls differently between Windows PowerShell and PowerShell 7.

Please see Installing various versions of PowerShell for instructions on installing PowerShell 7. You can install it on virtually any modern operating system - Windows, MacOS, or Linux.

Developer Account, Project, App, and Access Tokens

In order to use BluebirdPS, or any other Twitter API client or library, you will need to go through several steps to gain access to the API.

Applying for a Developer Account

You must apply for a developer account at https://developer.twitter.com/en/apply-for-access. This process could take a couple weeks.

Activate Developer Portal

Next, activate your developer portal at https://developer.twitter.com/content/developer-twitter/en/portal/opt-in.

Create a Project and Register a Developer App

You must have a project with a developer app created in the portal.

Apply for Access for the Twitter API v2: Early Access

Visit the Twitter API Getting Started page for details and additional links.

Generate Account Tokens

From the portal, you will need to generate the consumer key, otherwise called the API Key and Secret. The API Key is linked to your application.

You will also need to generate an Access Token and Secret. The Access Token is linked to your Twitter user account.

The application must be given access permissions of Read, Write, and Direct Message for full usage. At minimum, the application needs Read access for any Get- commands. Set-, Send-, and Publish-Tweet require Write access, while *-TwitterDM requires Direct Message access.

You can also generate a Bearer Token through the portal, or simply use the Set-TwitterAuthentication command. If your credentials are validated, the bearer token will be requested and set in the authentication file, as well.

Set-TwitterAuthentication
API Key: *************************
API Secret: **************************************************
Access Token: **************************************************
Access Token Secret: *********************************************

How to Install

From the PowerShell Gallery

Start PowerShell 7 and run the following command:

Install-Module -Name BluebirdPS -Scope CurrentUser

For more information, please visit the BluebirdPS page on the PowerShell Gallery.

From the GitHub Release Page

  1. Click here to go to the latest releases, then download the BluebirdPS.zip file attached to the release.
  2. Right-click the downloaded zip, select Properties, then unblock the file. This is to prevent having to unblock each file individually after unzipping.
  3. Unzip the archive.
  4. (Optional) Place the module somewhere in your PSModulePath.
    • You can view the paths listed by running the environment variable $env:PSModulePath

Building from the GitHub Repo

  1. Clone repo to a folder of your choice.
  2. Change into the local repo folder.
  3. Install and Import Module psake, BuildHelpers, PowerShellBuild
  4. Install dotnet (6.0)
  5. Run the build.ps1 script.
  6. Import-Module -Path .\BuildOutput\BluebirdPS\<module version>\BluebirdPS.psd1

Examples

Search-Tweet -SearchString "(from:thedavecarroll)"

Get-Tweet -Id 1398279333823791104

Publish-Tweet -TweetText "A new release of #BluebirdPS will soon be released. BluebirdPS is #PowerShell 7 Twitter automation client. Check it out! https://bit.ly/BluebirdPS"

Get-TwitterList -Id 1397040831777984512 | Add-TwitterListMember -UserName thedavecarroll,BluebirdPS

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.