GET https://api.twitter.com/1.1/friendships/show.json?source_screen_name=fellythemozzer&target_screen_name=WhiteHouse
Accept: application/json
Authorization: OAuth <elided>
User-Agent: Twitter-API/0.0109 (Perl)
Content-Type: application/json;charset=utf8
X-Twitter-Client: Twitter-API/0.0109 (Perl)
X-Twitter-Client-Url: https://github.com/semifor/Twitter-API
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
use 5.14.1; | |
use warnings; | |
# Usage: | |
# | |
# chunked-media-upload [ --type=TYPE ] [ --category=CATEGORY ] FILENAME | |
use File::stat; | |
use Getopt::Long; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
200 OK | |
Cache-Control: no-cache, no-store, max-age=0 | |
Date: Fri, 23 Apr 2021 15:01:18 GMT | |
Server: tsa_a | |
Content-Length: 263 | |
Content-Type: application/json; charset=utf-8 | |
Content-Disposition: attachment; filename=json.json | |
Set-Cookie: personalization_id="v1_JE0Wf+QnkgraRUU2FloMsw=="; Max-Age=63072000; Expires=Sun, 23 Apr 2023 15:01:18 GMT; Path=/; Domain=.twitter.com; Secure; SameSite=None | |
Set-Cookie: guest_id=v1%3A161919007878889378; Max-Age=63072000; Expires=Sun, 23 Apr 2023 15:01:18 GMT; Path=/; Domain=.twitter.com; Secure; SameSite=None | |
Strict-Transport-Security: max-age=631138519 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ perl -d | |
Loading DB routines from perl5db.pl version 1.49 | |
Editor support available. | |
Enter h or 'h h' for help, or 'man perldebug' for more help. | |
use 5.22.1; | |
use warnings; | |
use feature 'postderef'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Snippet demonstrating how to post a direct message with an attached image | |
# using the new Twitter direct message API | |
# First upload the image | |
my $media = $client->upload_media({ | |
media => [ $image_path_name ], | |
media_category => 'dm_image' | |
}); | |
# Attach the image in message_data |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl -d | |
use 5.22.0; | |
use Getopt::Long; | |
use Twitter::API; | |
use open qw/:std :utf8/; | |
my @traits = qw/Enchilada/; | |
my $traits = ''; | |
GetOptions( |
@realdDonaldTrump's un-follows
This is a least of accounts Donald Trump has un-followed since 2016-01-15 when I started tracking his account. Recently, he has re-followed. The final column shows whether or not he is currently following the account (as of 2017-02-14).
Data from Followerwonk.
screen name | un-followed | currently following |
---|---|---|
Reince | 2017-02-02 | yes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
# ABSTRACT: Post a tweet storm to Twitter | |
# | |
# Copyright (c) 2017 by Marc Mims | |
# This is free software, licensed under The MIT (X11) License | |
use 5.14.0; | |
use warnings; | |
use open qw/:utf8 :std/; | |
use Data::Dump qw/dump/; | |
use Getopt::Long; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
# ABSTRACT: Twitter API CLI | |
# Examples: | |
# | |
# twitter-api verify_credentials | |
# twitter-api --screen_name=semifor show_user | |
# twitter-api update 'current status: hackking' | |
# | |
# You can use get and post, to: |
From mst irc://irc.perl.org#dbix-class, 2016-12-27.
my $source = $schema->source('UserData');
my $new_source = $source->new(%$source, name => "user_data_${user_id}");
$schema->register_source('UserData_'.$user_id => $new_source);
NewerOlder