Browse Source

remove twitter

main
Aaron Parecki 9 months ago
parent
commit
568bc51248
28 changed files with 4 additions and 5902 deletions
  1. +4
    -15
      README.md
  2. +0
    -24
      lib/XRay/Fetcher.php
  3. +0
    -344
      lib/XRay/Formats/Twitter.php
  4. +0
    -4
      lib/XRay/Parser.php
  5. +0
    -25
      tests/LibraryTest.php
  6. +0
    -332
      tests/TwitterTest.php
  7. +0
    -166
      tests/data/api.twitter.com/719914707566649344.json
  8. +0
    -191
      tests/data/api.twitter.com/791704641046052864.json
  9. +0
    -227
      tests/data/api.twitter.com/818912506496229376.json
  10. +0
    -262
      tests/data/api.twitter.com/818913178260160512.json
  11. +0
    -482
      tests/data/api.twitter.com/818913351623245824.json
  12. +0
    -431
      tests/data/api.twitter.com/818913488609251331.json
  13. +0
    -177
      tests/data/api.twitter.com/818913630569664512.json
  14. +0
    -147
      tests/data/api.twitter.com/818928092383166465.json
  15. +0
    -263
      tests/data/api.twitter.com/818935308813103104.json
  16. +0
    -147
      tests/data/api.twitter.com/818943244553699328.json
  17. +0
    -393
      tests/data/api.twitter.com/820039442773798912.json
  18. +0
    -120
      tests/data/api.twitter.com/967046438822674432.json
  19. +0
    -110
      tests/data/api.twitter.com/streaming-tweet-reply.json
  20. +0
    -434
      tests/data/api.twitter.com/streaming-tweet-truncated-with-photo.json
  21. +0
    -290
      tests/data/api.twitter.com/streaming-tweet-truncated-with-video.json
  22. +0
    -113
      tests/data/api.twitter.com/streaming-tweet-truncated.json
  23. +0
    -85
      tests/data/api.twitter.com/streaming-tweet-with-link.json
  24. +0
    -105
      tests/data/api.twitter.com/streaming-tweet-with-mentions.json
  25. +0
    -206
      tests/data/api.twitter.com/tweet-with-gif.json
  26. +0
    -113
      tests/data/api.twitter.com/tweet-with-html.json
  27. +0
    -318
      tests/data/api.twitter.com/tweet-with-newlines.json
  28. +0
    -378
      tests/data/api.twitter.com/tweet-with-truncated-quoted-tweet.json

+ 4
- 15
README.md View File

@ -8,7 +8,6 @@ XRay parses structured content from a URL.
XRay will parse content in the following formats. First the URL is checked against known services:
* Twitter
* GitHub
* XKCD
* Hackernews
@ -68,7 +67,7 @@ In both cases, you can add an additional parameter to configure various options
* `expect=feed` - If you know the thing you are parsing is a feed, include this parameter which will avoid running the autodetection rules and will provide better results for some feeds.
* `accept` - (options: `html`, `json`, `activitypub`, `xml`) - Without this parameter, XRay sends a default `Accept` header to prioritize getting the most likely best result from a page. If you are parsing a page for a specific purpose and expect to find only one type of content (e.g. webmentions will probably only be from HTML pages), you can include this parameter to adjust the `Accept` header XRay sends.
Additional parameters are supported when making requests that use the Twitter or GitHub API. See the Authentication section below for details.
Additional parameters are supported when making requests that use the GitHub API. See the Authentication section below for details.
The XRay constructor can optionally be passed an array of default options, which will be applied in
addition to (and can be overridden by) the options passed to individual `parse()` calls.
@ -249,7 +248,7 @@ url=https://aaronparecki.com/2016/01/16/11/
&body=<html>....</html>
```
or for Twitter/GitHub where you might have JSON,
or for GitHub where you might have JSON,
```
POST /parse
@ -286,19 +285,9 @@ url=https://aaronparecki.com/2016/01/16/11/
### API Authentication
XRay uses the Twitter and Github APIs to fetch posts, and those API require authentication. In order to keep XRay stateless, it is required that you pass in the credentials to the parse call.
XRay uses the Github APIs to fetch posts, and those API require authentication. In order to keep XRay stateless, it is required that you pass in the credentials to the parse call.
You should only send the credentials when the URL you are trying to parse is a Twitter URL or a GitHub URL, so you'll want to check for whether the hostname is `twitter.com`, `github.com`, etc. before you include credentials in this call.
#### Twitter Authentication
XRay uses the Twitter API to fetch Twitter URLs. You can register an application on the Twitter developer website, and generate an access token for your account without writing any code, and then use those credentials when making an API request to XRay.
* `twitter_api_key` - Your application's API key
* `twitter_api_secret` - Your application's API secret
* `twitter_access_token` - Your Twitter access token
* `twitter_access_token_secret` - Your Twitter secret access token
You should only send the credentials when the URL you are trying to parse is a GitHub URL, so you'll want to check for whether the hostname is `github.com`, etc. before you include credentials in this call.
#### GitHub Authentication

+ 0
- 24
lib/XRay/Fetcher.php View File

@ -38,11 +38,6 @@ class Fetcher {
$url = normalize_url($url);
$host = parse_url($url, PHP_URL_HOST);
// Check if this is a Twitter URL and use the API
if(Formats\Twitter::matches_host($url)) {
return $this->_fetch_tweet($url, $opts);
}
// Transform the HTML GitHub URL into an GitHub API request and fetch the API response
if(Formats\GitHub::matches_host($url)) {
return $this->_fetch_github($url, $opts);
@ -164,25 +159,6 @@ class Fetcher {
];
}
private function _fetch_tweet($url, $opts) {
$fields = ['twitter_api_key','twitter_api_secret','twitter_access_token','twitter_access_token_secret'];
$creds = [];
foreach($fields as $f) {
if(isset($opts[$f]))
$creds[$f] = $opts[$f];
}
if(count($creds) < 4) {
return [
'error_code' => 400,
'error' => 'missing_parameters',
'error_description' => 'All 4 Twitter credentials must be included in the request'
];
}
return Formats\Twitter::fetch($url, $creds);
}
private function _fetch_github($url, $opts) {
$fields = ['github_access_token'];
$creds = [];

+ 0
- 344
lib/XRay/Formats/Twitter.php View File

@ -1,344 +0,0 @@
<?php
namespace p3k\XRay\Formats;
use DateTime, DateTimeZone;
class Twitter extends Format {
public static function matches_host($url) {
$host = parse_url($url, PHP_URL_HOST);
return in_array($host, ['mobile.twitter.com','twitter.com','www.twitter.com','twtr.io']);
}
public static function matches($url) {
if(preg_match('/https?:\/\/(?:mobile\.twitter\.com|twitter\.com|twtr\.io)\/(?:[a-z0-9_\/!#]+statuse?s?\/([0-9]+)|([a-zA-Z0-9_]+))/i', $url, $match))
return $match;
else
return false;
}
public static function fetch($url, $creds) {
if(!($match = self::matches($url))) {
return false;
}
$tweet_id = $match[1];
$host = parse_url($url, PHP_URL_HOST);
if($host == 'twtr.io') {
$tweet_id = self::b60to10($tweet_id);
}
$twitter = new \Twitter($creds['twitter_api_key'], $creds['twitter_api_secret'], $creds['twitter_access_token'], $creds['twitter_access_token_secret']);
try {
$tweet = $twitter->request('statuses/show/'.$tweet_id, 'GET', ['tweet_mode'=>'extended']);
} catch(\TwitterException $e) {
return [
'error' => 'twitter_error',
'error_description' => $e->getMessage()
];
}
return [
'url' => $url,
'body' => $tweet,
'code' => 200,
];
}
public static function parse($http_response) {
$json = is_array($http_response) ? $http_response['body'] : $http_response->body;
$url = is_array($http_response) ? $http_response['url'] : $http_response->url;
if(is_string($json))
$tweet = json_decode($json);
else
$tweet = $json;
if(!$tweet) {
return self::_unknown();
}
$entry = array(
'type' => 'entry',
'url' => $url,
'author' => [
'type' => 'card',
'name' => null,
'nickname' => null,
'photo' => null,
'url' => null,
]
);
$refs = [];
if(property_exists($tweet, 'retweeted_status')) {
// No content for retweets
$reposted = $tweet->retweeted_status;
$repostOf = 'https://twitter.com/' . $reposted->user->screen_name . '/status/' . $reposted->id_str;
$entry['repost-of'] = $repostOf;
$repostedEntry = self::parse(['body' => $reposted, 'url' => $repostOf]);
if(isset($repostedEntry['data']['refs'])) {
foreach($repostedEntry['data']['refs'] as $k=>$v) {
$refs[$k] = $v;
}
}
$refs[$repostOf] = $repostedEntry['data'];
} else {
$entry['content'] = self::expandTweetContent($tweet);
}
// Published date
$published = new DateTime($tweet->created_at);
if(property_exists($tweet->user, 'utc_offset')) {
$tz = new DateTimeZone(sprintf('%+d', $tweet->user->utc_offset / 3600));
$published->setTimeZone($tz);
}
$entry['published'] = $published->format('c');
// Hashtags
if(property_exists($tweet, 'entities') && property_exists($tweet->entities, 'hashtags')) {
if(count($tweet->entities->hashtags)) {
$entry['category'] = [];
foreach($tweet->entities->hashtags as $hashtag) {
$entry['category'][] = $hashtag->text;
}
}
}
// In-Reply-To
if(property_exists($tweet, 'in_reply_to_status_id_str') && $tweet->in_reply_to_status_id_str) {
$entry['in-reply-to'] = [
'https://twitter.com/'.$tweet->in_reply_to_screen_name.'/status/'.$tweet->in_reply_to_status_id_str
];
}
// Don't include the RT'd photo or video in the main object.
// They get included in the reposted object instead.
if(!property_exists($tweet, 'retweeted_status')) {
// Photos and Videos
if(property_exists($tweet, 'extended_entities') && property_exists($tweet->extended_entities, 'media')) {
foreach($tweet->extended_entities->media as $media) {
self::extractMedia($media, $entry);
}
}
// Photos from Streaming API Tweets
if(property_exists($tweet, 'extended_tweet')) {
if(property_exists($tweet->extended_tweet, 'entities') && property_exists($tweet->extended_tweet->entities, 'media')) {
foreach($tweet->extended_tweet->entities->media as $media) {
self::extractMedia($media, $entry);
}
}
}
// Place
if(property_exists($tweet, 'place') && $tweet->place) {
$place = $tweet->place;
if($place->place_type == 'city') {
$entry['location'] = $place->url;
$refs[$place->url] = [
'type' => 'adr',
'name' => $place->full_name,
'locality' => $place->name,
'country-name' => $place->country,
];
}
}
}
// Quoted Status
if(property_exists($tweet, 'quoted_status')) {
$quoteOf = 'https://twitter.com/' . $tweet->quoted_status->user->screen_name . '/status/' . $tweet->quoted_status_id_str;
$quotedEntry = self::parse(['body' => $tweet->quoted_status, 'url' => $quoteOf]);
if(isset($quotedEntry['data']['refs'])) {
foreach($quotedEntry['data']['refs'] as $k=>$v) {
$refs[$k] = $v;
}
}
$refs[$quoteOf] = $quotedEntry['data'];
$entry['quotation-of'] = $quoteOf;
}
if($author = self::_buildHCardFromTwitterProfile($tweet->user)) {
$entry['author'] = $author;
}
if(count($refs)) {
$entry['refs'] = $refs;
}
$entry['post-type'] = \p3k\XRay\PostType::discover($entry);
return [
'data' => $entry,
'original' => $tweet,
'source-format' => 'twitter',
];
}
private static function extractMedia($media, &$entry) {
if($media->type == 'photo') {
if(!array_key_exists('photo', $entry))
$entry['photo'] = [];
$entry['photo'][] = $media->media_url_https;
} elseif($media->type == 'video' || $media->type == 'animated_gif') {
if(!array_key_exists('photo', $entry))
$entry['photo'] = [];
if(!array_key_exists('video', $entry))
$entry['video'] = [];
// Include the thumbnail
$entry['photo'][] = $media->media_url_https;
// Find the highest bitrate video that is mp4
$videos = $media->video_info->variants;
$videos = array_filter($videos, function($v) {
return property_exists($v, 'bitrate') && $v->content_type == 'video/mp4';
});
if(count($videos)) {
usort($videos, function($a,$b) {
return $a->bitrate < $b->bitrate;
});
$entry['video'][] = $videos[0]->url;
}
}
}
private static function _buildHCardFromTwitterProfile($profile) {
if(!$profile) return false;
$author = [
'type' => 'card'
];
$author['nickname'] = $profile->screen_name;
$author['location'] = $profile->location;
$author['bio'] = self::expandTwitterObjectURLs($profile->description, $profile, 'description');
if($profile->name)
$author['name'] = $profile->name;
else
$author['name'] = $profile->screen_name;
$author['url'] = 'https://twitter.com/' . $profile->screen_name;
$author['photo'] = $profile->profile_image_url_https;
return $author;
}
private static function expandTweetContent($tweet) {
$entities = new \StdClass;
if(property_exists($tweet, 'truncated') && $tweet->truncated) {
if(property_exists($tweet, 'extended_tweet')) {
$text = $tweet->extended_tweet->full_text;
$text = mb_substr($text,
$tweet->extended_tweet->display_text_range[0],
$tweet->extended_tweet->display_text_range[1]-$tweet->extended_tweet->display_text_range[0],
'UTF-8');
if(property_exists($tweet->extended_tweet, 'entities')) {
$entities = $tweet->extended_tweet->entities;
}
} else {
$text = $tweet->text;
if(property_exists($tweet, 'entities')) {
$entities = $tweet->entities;
}
}
} else {
// Only use the "display" segment of the text
if(property_exists($tweet, 'full_text')) {
// Only use the "display" segment of the text
$text = mb_substr($tweet->full_text,
$tweet->display_text_range[0],
$tweet->display_text_range[1]-$tweet->display_text_range[0],
'UTF-8');
} else {
$text = $tweet->text;
}
if(property_exists($tweet, 'entities')) {
$entities = $tweet->entities;
}
}
// Twitter escapes & as &amp; in the text
$text = html_entity_decode($text);
$html = htmlspecialchars($text);
$html = str_replace("\n", "<br>\n", $html);
if(property_exists($entities, 'user_mentions')) {
foreach($entities->user_mentions as $user) {
$html = str_replace('@'.$user->screen_name, '<a href="https://twitter.com/'.$user->screen_name.'">@'.$user->screen_name.'</a>', $html);
}
}
if(property_exists($entities, 'urls')) {
foreach($entities->urls as $url) {
$text = str_replace($url->url, $url->expanded_url, $text);
$html = str_replace($url->url, '<a href="'.$url->expanded_url.'">'.$url->expanded_url.'</a>', $html);
}
}
$content = [
'text' => $text,
];
if($html != $text)
$content['html'] = $html;
return $content;
}
private static function expandTwitterObjectURLs($text, $object, $key) {
if(property_exists($object, 'entities')
&& property_exists($object->entities, $key)
&& property_exists($object->entities->{$key}, 'urls')) {
foreach($object->entities->{$key}->urls as $url) {
$text = str_replace($url->url, $url->expanded_url, $text);
}
}
return $text;
}
/**
* Converts base 60 to base 10, with error checking
* http://tantek.pbworks.com/NewBase60
* @param string $s
* @return int
*/
function b60to10($s)
{
$n = 0;
for($i = 0; $i < strlen($s); $i++) // iterate from first to last char of $s
{
$c = ord($s[$i]); // put current ASCII of char into $c
if ($c>=48 && $c<=57) { $c=bcsub($c,48); }
else if ($c>=65 && $c<=72) { $c=bcsub($c,55); }
else if ($c==73 || $c==108) { $c=1; } // typo capital I, lowercase l to 1
else if ($c>=74 && $c<=78) { $c=bcsub($c,56); }
else if ($c==79) { $c=0; } // error correct typo capital O to 0
else if ($c>=80 && $c<=90) { $c=bcsub($c,57); }
else if ($c==95) { $c=34; } // underscore
else if ($c>=97 && $c<=107) { $c=bcsub($c,62); }
else if ($c>=109 && $c<=122) { $c=bcsub($c,63); }
else { $c = 0; } // treat all other noise as 0
$n = bcadd(bcmul(60, $n), $c);
}
return $n;
}
}

+ 0
- 4
lib/XRay/Parser.php View File

@ -83,10 +83,6 @@ class Parser {
return Formats\GitHub::parse($http_response);
}
if(Formats\Twitter::matches($url)) {
return Formats\Twitter::parse($http_response);
}
if(Formats\XKCD::matches($url)) {
return Formats\XKCD::parse($http_response);
}

+ 0
- 25
tests/LibraryTest.php View File

@ -109,29 +109,4 @@ class LibraryTest extends PHPUnit\Framework\TestCase
);
}
public function testDefaultOptionsAreUsedForFetching()
{
// LibraryTest::testDefaultOptionsAreUsed can only test that default options are merged and passed
// to the relevant format handler. To test that they’re additionally passed to the fetcher currently
// requires a network request to the twitter API for an auth error.
// A potential future improvement for this would be to make a new mock HTTP client object which
// accepts a callback, which gets passed the request it would send. We can then check that the
// request has the parameters we want without having to actually hit the network.
$url = 'https://twitter.com/BarnabyWalters/status/990659593561952256';
// Confirm the expected behaviour.
$xray = new p3k\XRay();
$result = $xray->parse($url);
$this->assertEquals('missing_parameters', $result['error']);
$xray = new p3k\XRay([
'twitter_api_key' => 'extremely real API credentials',
'twitter_api_secret' => 'extremely real API credentials',
'twitter_access_token' => 'extremely real API credentials',
'twitter_access_token_secret' => 'extremely real API credentials'
]);
$result = $xray->parse($url);
$this->assertEquals('twitter_error', $result['error']);
}
}

+ 0
- 332
tests/TwitterTest.php View File

@ -1,332 +0,0 @@
<?php
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
class TwitterTest extends PHPUnit\Framework\TestCase
{
public function setUp(): void
{
$this->client = new Parse();
$this->client->mc = null;
}
private function parse($params)
{
$request = new Request($params);
$response = new Response();
$result = $this->client->parse($request, $response);
$body = $result->getContent();
$this->assertEquals(200, $result->getStatusCode());
return json_decode($body, true);
}
private function loadTweet($id)
{
$url = 'https://twitter.com/_/status/'.$id;
$json = file_get_contents(dirname(__FILE__).'/data/api.twitter.com/'.$id.'.json');
$parsed = json_decode($json);
$url = 'https://twitter.com/'.$parsed->user->screen_name.'/status/'.$id;
return [$url, $json];
}
public function testBasicProfileInfo()
{
list($url, $json) = $this->loadTweet('818912506496229376');
$data = $this->parse(['url' => $url, 'body' => $json]);
$this->assertEquals('twitter', $data['source-format']);
$this->assertEquals('entry', $data['data']['type']);
$this->assertEquals('aaronpk dev', $data['data']['author']['name']);
$this->assertEquals('pkdev', $data['data']['author']['nickname']);
$this->assertEquals('https://twitter.com/pkdev', $data['data']['author']['url']);
$this->assertEquals('Portland, OR', $data['data']['author']['location']);
$this->assertEquals('Dev account for testing Twitter things. Follow me here: https://twitter.com/aaronpk', $data['data']['author']['bio']);
$this->assertEquals('https://pbs.twimg.com/profile_images/638125135904436224/qd_d94Qn_normal.jpg', $data['data']['author']['photo']);
}
public function testProfileWithNonExpandedURL()
{
list($url, $json) = $this->loadTweet('791704641046052864');
$data = $this->parse(['url' => $url, 'body' => $json]);
$this->assertEquals('https://twitter.com/agiletortoise', $data['data']['author']['url']);
}
public function testBasicTestStuff()
{
list($url, $json) = $this->loadTweet('818913630569664512');
$data = $this->parse(['url' => $url, 'body' => $json]);
$this->assertEquals(null, $data['code']); // no code is expected if we pass in the body
$this->assertEquals('twitter', $data['source-format']);
$this->assertEquals('https://twitter.com/pkdev/status/818913630569664512', $data['url']);
$this->assertEquals('entry', $data['data']['type']);
$this->assertEquals('note', $data['data']['post-type']);
$this->assertEquals('A tweet with a URL https://indieweb.org/ #and #some #hashtags', $data['data']['content']['text']);
$this->assertContains('and', $data['data']['category']);
$this->assertContains('some', $data['data']['category']);
$this->assertContains('hashtags', $data['data']['category']);
// Published date should be set to the timezone of the user
$this->assertEquals('2017-01-10T12:13:18-08:00', $data['data']['published']);
}
public function testPositiveTimezone()
{
list($url, $json) = $this->loadTweet('719914707566649344');
$data = $this->parse(['url' => $url, 'body' => $json]);
$this->assertEquals("2016-04-12T16:46:56+01:00", $data['data']['published']);
}
public function testTweetWithEmoji()
{
list($url, $json) = $this->loadTweet('818943244553699328');
$data = $this->parse(['url' => $url, 'body' => $json]);
$this->assertEquals('twitter', $data['source-format']);
$this->assertEquals('entry', $data['data']['type']);
$this->assertEquals('Here 🎉 have an emoji', $data['data']['content']['text']);
}
public function testHTMLEscaping()
{
list($url, $json) = $this->loadTweet('818928092383166465');
$data = $this->parse(['url' => $url, 'body' => $json]);
$this->assertEquals('entry', $data['data']['type']);
$this->assertEquals('Double escaping &amp; & amp', $data['data']['content']['text']);
}
public function testTweetWithPhoto()
{
list($url, $json) = $this->loadTweet('818912506496229376');
$data = $this->parse(['url' => $url, 'body' => $json]);
$this->assertEquals('entry', $data['data']['type']);
$this->assertEquals('photo', $data['data']['post-type']);
$this->assertEquals('Tweet with a photo and a location', $data['data']['content']['text']);
$this->assertEquals('https://pbs.twimg.com/media/C11cfRJUoAI26h9.jpg', $data['data']['photo'][0]);
}
public function testTweetWithTwoPhotos()
{
list($url, $json) = $this->loadTweet('818935308813103104');
$data = $this->parse(['url' => $url, 'body' => $json]);
$this->assertEquals('entry', $data['data']['type']);
$this->assertEquals('photo', $data['data']['post-type']);
$this->assertEquals('Two photos', $data['data']['content']['text']);
$this->assertContains('https://pbs.twimg.com/media/C11xS1wUcAAeaKF.jpg', $data['data']['photo']);
$this->assertContains('https://pbs.twimg.com/media/C11wtndUoAE1WfE.jpg', $data['data']['photo']);
}
public function testTweetWithVideo()
{
list($url, $json) = $this->loadTweet('818913178260160512');
$data = $this->parse(['url' => $url, 'body' => $json]);
$this->assertEquals('entry', $data['data']['type']);
$this->assertEquals('video', $data['data']['post-type']);
$this->assertEquals('Tweet with a video', $data['data']['content']['text']);
$this->assertEquals('https://pbs.twimg.com/ext_tw_video_thumb/818913089248595970/pr/img/qVoEjF03Y41SKpNt.jpg', $data['data']['photo'][0]);
$this->assertEquals('https://video.twimg.com/ext_tw_video/818913089248595970/pr/vid/1280x720/qP-sDx-Q0Hs-ckVv.mp4', $data['data']['video'][0]);
}
public function testTweetWithGif()
{
list($url, $json) = $this->loadTweet('tweet-with-gif');
$data = $this->parse(['url' => $url, 'body' => $json]);
$this->assertEquals('entry', $data['data']['type']);
$this->assertEquals('reply', $data['data']['post-type']);
$this->assertEquals('https://twitter.com/SwiftOnSecurity/status/1018178408398966784', $data['data']['in-reply-to'][0]);
$this->assertEquals('Look! A distraction 🐁', $data['data']['content']['text']);
$this->assertEquals('https://video.twimg.com/tweet_video/DiFOUuYV4AAUsgL.mp4', $data['data']['video'][0]);
$this->assertEquals('https://pbs.twimg.com/tweet_video_thumb/DiFOUuYV4AAUsgL.jpg', $data['data']['photo'][0]);
}
public function testTweetWithLocation()
{
list($url, $json) = $this->loadTweet('818912506496229376');
$data = $this->parse(['url' => $url, 'body' => $json]);
$this->assertEquals('entry', $data['data']['type']);
$this->assertEquals('Tweet with a photo and a location', $data['data']['content']['text']);
$this->assertEquals('https://api.twitter.com/1.1/geo/id/ac88a4f17a51c7fc.json', $data['data']['location']);
$location = $data['data']['refs']['https://api.twitter.com/1.1/geo/id/ac88a4f17a51c7fc.json'];
$this->assertEquals('adr', $location['type']);
$this->assertEquals('Portland', $location['locality']);
$this->assertEquals('United States', $location['country-name']);
$this->assertEquals('Portland, OR', $location['name']);
}
public function testRetweet()
{
list($url, $json) = $this->loadTweet('818913351623245824');
$data = $this->parse(['url' => $url, 'body' => $json]);
$this->assertEquals('twitter', $data['source-format']);
$this->assertEquals('entry', $data['data']['type']);
$this->assertEquals('repost', $data['data']['post-type']);
$this->assertArrayNotHasKey('content', $data['data']);
$repostOf = 'https://twitter.com/aaronpk/status/817414679131660288';
$this->assertEquals($repostOf, $data['data']['repost-of']);
$tweet = $data['data']['refs'][$repostOf];
$this->assertEquals('Yeah that\'s me http://xkcd.com/1782/', $tweet['content']['text']);
}
public function testRetweetWithPhoto()
{
list($url, $json) = $this->loadTweet('820039442773798912');
$data = $this->parse(['url' => $url, 'body' => $json]);
$this->assertEquals('entry', $data['data']['type']);
$this->assertEquals('repost', $data['data']['post-type']);
$this->assertArrayNotHasKey('content', $data['data']);
$this->assertArrayNotHasKey('photo', $data['data']);
$repostOf = 'https://twitter.com/phlaimeaux/status/819943954724556800';
$this->assertEquals($repostOf, $data['data']['repost-of']);
$tweet = $data['data']['refs'][$repostOf];
$this->assertEquals('this headline is such a rollercoaster', $tweet['content']['text']);
}
public function testQuotedTweet()
{
list($url, $json) = $this->loadTweet('818913488609251331');
$data = $this->parse(['url' => $url, 'body' => $json]);
$this->assertEquals('entry', $data['data']['type']);
$this->assertEquals('note', $data['data']['post-type']);
$this->assertEquals('Quoted tweet with a #hashtag https://twitter.com/aaronpk/status/817414679131660288', $data['data']['content']['text']);
$this->assertEquals('https://twitter.com/aaronpk/status/817414679131660288', $data['data']['quotation-of']);
$tweet = $data['data']['refs']['https://twitter.com/aaronpk/status/817414679131660288'];
$this->assertEquals('Yeah that\'s me http://xkcd.com/1782/', $tweet['content']['text']);
}
public function testTruncatedQuotedTweet()
{
list($url, $json) = $this->loadTweet('tweet-with-truncated-quoted-tweet');
$data = $this->parse(['url' => $url, 'body' => $json]);
$this->assertEquals('entry', $data['data']['type']);
$this->assertEquals('.@stream_pdx is a real treasure of our city.', $data['data']['content']['text']);
$this->assertEquals('https://twitter.com/PDXStephenG/status/964598574322339841', $data['data']['quotation-of']);
$tweet = $data['data']['refs']['https://twitter.com/PDXStephenG/status/964598574322339841'];
$this->assertEquals('Hey @OregonGovBrown @tedwheeler day 16 of #BHM is for @stream_pdx. An amazing podcast trailer run by @tyeshasnow helping to democratize story telling in #PDX. Folks can get training in the production of podcasts. @siliconflorist #SupportBlackBusiness', $tweet['content']['text']);
$this->assertEquals("Hey <a href=\"https://twitter.com/OregonGovBrown\">@OregonGovBrown</a> <a href=\"https://twitter.com/tedwheeler\">@tedwheeler</a> day 16 of #BHM is for <a href=\"https://twitter.com/stream_pdx\">@stream_pdx</a>. An amazing podcast trailer run by <a href=\"https://twitter.com/tyeshasnow\">@tyeshasnow</a> helping to democratize story telling in #PDX. Folks can get training in the production of podcasts. <a href=\"https://twitter.com/siliconflorist\">@siliconflorist</a> #SupportBlackBusiness", $tweet['content']['html']);
}
public function testTweetWithHTML()
{
list($url, $json) = $this->loadTweet('tweet-with-html');
$data = $this->parse(['url' => $url, 'body' => $json]);
$this->assertStringContainsString('<script>', $data['data']['content']['text']);
$this->assertStringContainsString('&lt;script&gt;', $data['data']['content']['html']);
}
public function testStreamingTweetWithLink()
{
list($url, $json) = $this->loadTweet('streaming-tweet-with-link');
$data = $this->parse(['url' => $url, 'body' => $json]);
$this->assertEquals('twitter', $data['source-format']);
$this->assertEquals('what happens if i include a link like https://kmikeym.com', $data['data']['content']['text']);
$this->assertEquals('what happens if i include a link like <a href="https://kmikeym.com">https://kmikeym.com</a>', $data['data']['content']['html']);
}
public function testStreamingTweetWithMentions()
{
list($url, $json) = $this->loadTweet('streaming-tweet-with-mentions');
$data = $this->parse(['url' => $url, 'body' => $json]);
$this->assertEquals('Offer accepted! @aaronpk bought 1 shares from @coledrobison at $6.73 https://kmikeym.com/trades', $data['data']['content']['text']);
$this->assertEquals('Offer accepted! <a href="https://twitter.com/aaronpk">@aaronpk</a> bought 1 shares from <a href="https://twitter.com/coledrobison">@coledrobison</a> at $6.73 <a href="https://kmikeym.com/trades">https://kmikeym.com/trades</a>', $data['data']['content']['html']);
}
public function testStreamingTweetTruncated()
{
list($url, $json) = $this->loadTweet('streaming-tweet-truncated');
$data = $this->parse(['url' => $url, 'body' => $json]);
$this->assertEquals("#indieweb community. Really would like to see a Micropub client for Gratitude logging and also a Mastodon poster similar to the twitter one.\nFeel like I could (maybe) rewrite previous open code to do some of this :)", $data['data']['content']['text']);
$this->assertEquals(
'#indieweb community. Really would like to see a Micropub client for Gratitude logging and also a Mastodon poster similar to the twitter one.<br>
Feel like I could (maybe) rewrite previous open code to do some of this :)', $data['data']['content']['html']
);
}
public function testStreamingTweetTruncatedWithPhoto()
{
list($url, $json) = $this->loadTweet('streaming-tweet-truncated-with-photo');
$data = $this->parse(['url' => $url, 'body' => $json]);
$this->assertEquals("#MicrosoftFlow ninja-tip.\nI'm getting better at custom-connector and auth. Thanks @skillriver \nThis is OAuth2 with MSA/Live (not AzureAD) which I need to do MVP timesheets.\nStill dislike Swagger so I don't know why I bother with this. I'm just that lazy doing this manually", $data['data']['content']['text']);
$this->assertEquals(4, count($data['data']['photo']));
$this->assertEquals('https://pbs.twimg.com/media/DWZ-5UPVAAAQOWY.jpg', $data['data']['photo'][0]);
$this->assertEquals('https://pbs.twimg.com/media/DWaAhZ2UQAAIEoS.jpg', $data['data']['photo'][3]);
}
public function testStreamingTweetTruncatedWithVideo()
{
list($url, $json) = $this->loadTweet('streaming-tweet-truncated-with-video');
$data = $this->parse(['url' => $url, 'body' => $json]);
$this->assertEquals("hi @aaronpk Ends was a great job I was just talking to her about the house I think she is just talking to you about that stuff like that you don't have any idea of how to make to your job so you don't want me going back on your own to make it happen", $data['data']['content']['text']);
$this->assertEquals(1, count($data['data']['video']));
$this->assertEquals('https://video.twimg.com/ext_tw_video/965608338917548032/pu/vid/720x720/kreAfCMf-B1dLqBH.mp4', $data['data']['video'][0]);
}
public function testTweetWithNewlines()
{
list($url, $json) = $this->loadTweet('tweet-with-newlines');
$data = $this->parse(['url' => $url, 'body' => $json]);
$this->assertEquals(4, substr_count($data['data']['content']['text'], "\n"));
$this->assertEquals(4, substr_count($data['data']['content']['html'], "<br>\n"));
$this->assertEquals(
"🌈🌈 I’ve watched the sun rise at Corona Heights countless times, but never before have I seen a #rainbow at #sunrise.
#CoronaHeights #SanFrancisco #SF #wakeupthesun #fromwhereirun #nofilter
Woke up this morning feeling compelled to run to Corona… http://tantek.com/2018/049/t3/rainbow-at-sunrise", $data['data']['content']['text']
);
}
public function testStreamingTweetReply()
{
list($url, $json) = $this->loadTweet('streaming-tweet-reply');
$data = $this->parse(['url' => $url, 'body' => $json]);
$this->assertEquals('twitter', $data['source-format']);
$this->assertEquals('https://twitter.com/anomalily/status/967024586423386112', $data['data']['in-reply-to'][0]);
}
public function testTweetReply()
{
list($url, $json) = $this->loadTweet('967046438822674432');
$data = $this->parse(['url' => $url, 'body' => $json]);
$this->assertEquals('twitter', $data['source-format']);
$this->assertEquals('https://twitter.com/anomalily/status/967024586423386112', $data['data']['in-reply-to'][0]);
}
}

+ 0
- 166
tests/data/api.twitter.com/719914707566649344.json View File

@ -1,166 +0,0 @@
{
"created_at": "Tue Apr 12 15:46:56 +0000 2016",
"id": 719914707566649344,
"id_str": "719914707566649344",
"full_text": "Interested in re-claiming your #web? Go #IndieWeb together with @t @adactio @aaronpk in @nuernberg_de this WE https://t.co/OSGu8tYBNF",
"truncated": false,
"display_text_range": [
0,
133
],
"entities": {
"hashtags": [
{
"text": "web",
"indices": [
31,
35
]
},
{
"text": "IndieWeb",
"indices": [
40,
49
]
}
],
"symbols": [
],
"user_mentions": [
{
"screen_name": "t",
"name": "⚡️",
"id": 11628,
"id_str": "11628",
"indices": [
64,
66
]
},
{
"screen_name": "adactio",
"name": "Jeremy Keith",
"id": 11250,
"id_str": "11250",
"indices": [
67,
75
]
},
{
"screen_name": "aaronpk",
"name": "Aaron Parecki",
"id": 14447132,
"id_str": "14447132",
"indices": [
76,
84
]
},
{
"screen_name": "nuernberg_de",
"name": "Stadt Nürnberg",
"id": 22136838,
"id_str": "22136838",
"indices": [
88,
101
]
}
],
"urls": [
{
"url": "https://t.co/OSGu8tYBNF",
"expanded_url": "https://indiewebcamp.com/2016/Nuremberg",
"display_url": "indiewebcamp.com/2016/Nuremberg",
"indices": [
110,
133
]
}
]
},
"source": "<a href=\"https://about.twitter.com/products/tweetdeck\" rel=\"nofollow\">TweetDeck</a>",
"in_reply_to_status_id": null,
"in_reply_to_status_id_str": null,
"in_reply_to_user_id": null,
"in_reply_to_user_id_str": null,
"in_reply_to_screen_name": null,
"user": {
"id": 15134408,
"id_str": "15134408",
"name": "openSUSE",
"screen_name": "openSUSE",
"location": "Internet",
"description": "Your friendly neighborhood #FOSS project promoting the use of #Linux everywhere, working together as part of the worldwide community.",
"url": "http://t.co/PhcXzjUcfM",
"entities": {
"url": {
"urls": [
{
"url": "http://t.co/PhcXzjUcfM",
"expanded_url": "http://www.opensuse.org/",
"display_url": "opensuse.org",
"indices": [
0,
22
]
}
]
},
"description": {
"urls": [
]
}
},
"protected": false,
"followers_count": 49423,
"friends_count": 376,
"listed_count": 1543,
"created_at": "Mon Jun 16 14:16:26 +0000 2008",
"favourites_count": 787,
"utc_offset": 3600,
"time_zone": "Berlin",
"geo_enabled": true,
"verified": false,
"statuses_count": 7271,
"lang": "en",
"contributors_enabled": false,
"is_translator": false,
"is_translation_enabled": false,
"profile_background_color": "131006",
"profile_background_image_url": "http://pbs.twimg.com/profile_background_images/540413620933238784/IUmiNwDx.png",
"profile_background_image_url_https": "https://pbs.twimg.com/profile_background_images/540413620933238784/IUmiNwDx.png",
"profile_background_tile": true,
"profile_image_url": "http://pbs.twimg.com/profile_images/539701542740172803/MnpABm74_normal.png",
"profile_image_url_https": "https://pbs.twimg.com/profile_images/539701542740172803/MnpABm74_normal.png",
"profile_banner_url": "https://pbs.twimg.com/profile_banners/15134408/1446618674",
"profile_link_color": "131006",
"profile_sidebar_border_color": "EEEEEE",
"profile_sidebar_fill_color": "EFEFEF",
"profile_text_color": "333333",
"profile_use_background_image": true,
"has_extended_profile": false,
"default_profile": false,
"default_profile_image": false,
"following": false,
"follow_request_sent": false,
"notifications": false,
"translator_type": "none"
},
"geo": null,
"coordinates": null,
"place": null,
"contributors": null,
"is_quote_status": false,
"retweet_count": 9,
"favorite_count": 10,
"favorited": false,
"retweeted": true,
"possibly_sensitive": false,
"possibly_sensitive_appealable": false,
"lang": "en"
}

+ 0
- 191
tests/data/api.twitter.com/791704641046052864.json View File

@ -1,191 +0,0 @@
{
"created_at": "Thu Oct 27 18:14:30 +0000 2016",
"id": 791704641046052864,
"id_str": "791704641046052864",
"full_text": "Can’t wait. https://t.co/CR7Feah4q6",
"truncated": false,
"display_text_range": [
0,
11
],
"entities": {
"hashtags": [
],
"symbols": [
],
"user_mentions": [
],
"urls": [
],
"media": [
{
"id": 791704634058387456,
"id_str": "791704634058387456",
"indices": [
12,
35
],
"media_url": "http://pbs.twimg.com/media/CvyzK4gUsAACJWa.jpg",
"media_url_https": "https://pbs.twimg.com/media/CvyzK4gUsAACJWa.jpg",
"url": "https://t.co/CR7Feah4q6",
"display_url": "pic.twitter.com/CR7Feah4q6",
"expanded_url": "https://twitter.com/agiletortoise/status/791704641046052864/photo/1",
"type": "photo",
"sizes": {
"small": {
"w": 680,
"h": 321,
"resize": "fit"
},
"thumb": {
"w": 150,
"h": 150,
"resize": "crop"
},
"medium": {
"w": 929,
"h": 439,
"resize": "fit"
},
"large": {
"w": 929,
"h": 439,
"resize": "fit"
}
}
}
]
},
"extended_entities": {
"media": [
{
"id": 791704634058387456,
"id_str": "791704634058387456",
"indices": [
12,
35
],
"media_url": "http://pbs.twimg.com/media/CvyzK4gUsAACJWa.jpg",
"media_url_https": "https://pbs.twimg.com/media/CvyzK4gUsAACJWa.jpg",
"url": "https://t.co/CR7Feah4q6",
"display_url": "pic.twitter.com/CR7Feah4q6",
"expanded_url": "https://twitter.com/agiletortoise/status/791704641046052864/photo/1",
"type": "photo",
"sizes": {
"small": {
"w": 680,
"h": 321,
"resize": "fit"
},
"thumb": {
"w": 150,
"h": 150,
"resize": "crop"
},
"medium": {
"w": 929,
"h": 439,
"resize": "fit"
},
"large": {
"w": 929,
"h": 439,
"resize": "fit"
}
}
}
]
},
"source": "<a href=\"http://tapbots.com/software/tweetbot/mac\" rel=\"nofollow\">Tweetbot for Mac</a>",
"in_reply_to_status_id": null,
"in_reply_to_status_id_str": null,
"in_reply_to_user_id": null,
"in_reply_to_user_id_str": null,
"in_reply_to_screen_name": null,
"user": {
"id": 6152112,
"id_str": "6152112",
"name": "Greg Pierce",
"screen_name": "agiletortoise",
"location": "N Richland Hills, TX",
"description": "I make @draftsapp, @interact_app, @dicedapp. I wrote the @xcallbackurl spec. This is my personal account, visit https://t.co/LJaFQkB5wy for support.",
"url": "http://agiletortoise.com",
"entities": {
"url": {
"urls": [
{
"url": "http://agiletortoise.com",
"expanded_url": null,
"indices": [
0,
24
]
}
]
},
"description": {
"urls": [
{
"url": "https://t.co/LJaFQkB5wy",
"expanded_url": "http://help.agiletortoise.com",
"display_url": "help.agiletortoise.com",
"indices": [
112,
135
]
}
]
}
},
"protected": false,
"followers_count": 5536,
"friends_count": 359,
"listed_count": 476,
"created_at": "Sat May 19 02:34:45 +0000 2007",
"favourites_count": 3604,
"utc_offset": -21600,
"time_zone": "Central Time (US & Canada)",
"geo_enabled": false,
"verified": false,
"statuses_count": 19912,
"lang": "en",
"contributors_enabled": false,
"is_translator": false,
"is_translation_enabled": false,
"profile_background_color": "706E65",
"profile_background_image_url": "http://pbs.twimg.com/profile_background_images/2571674/images.jpeg",
"profile_background_image_url_https": "https://pbs.twimg.com/profile_background_images/2571674/images.jpeg",
"profile_background_tile": false,
"profile_image_url": "http://pbs.twimg.com/profile_images/718519462656237568/t8hpFYGa_normal.jpg",
"profile_image_url_https": "https://pbs.twimg.com/profile_images/718519462656237568/t8hpFYGa_normal.jpg",
"profile_banner_url": "https://pbs.twimg.com/profile_banners/6152112/1476386061",
"profile_link_color": "071E7A",
"profile_sidebar_border_color": "FFFFFF",
"profile_sidebar_fill_color": "EBEBEB",
"profile_text_color": "000000",
"profile_use_background_image": false,
"has_extended_profile": true,
"default_profile": false,
"default_profile_image": false,
"following": false,
"follow_request_sent": false,
"notifications": false,
"translator_type": "none"
},
"geo": null,
"coordinates": null,
"place": null,
"contributors": null,
"is_quote_status": false,
"retweet_count": 1245,
"favorite_count": 1429,
"favorited": false,
"retweeted": true,
"possibly_sensitive": false,
"possibly_sensitive_appealable": false,
"lang": "en"
}

+ 0
- 227
tests/data/api.twitter.com/818912506496229376.json View File

@ -1,227 +0,0 @@
{
"created_at": "Tue Jan 10 20:08:50 +0000 2017",
"id": 818912506496229376,
"id_str": "818912506496229376",
"full_text": "Tweet with a photo and a location https://t.co/GwEzHTHlUC",
"truncated": false,
"display_text_range": [
0,
33
],
"entities": {
"hashtags": [
],
"symbols": [
],
"user_mentions": [
],
"urls": [
],
"media": [
{
"id": 818912399499501570,
"id_str": "818912399499501570",
"indices": [
34,
57
],
"media_url": "http://pbs.twimg.com/media/C11cfRJUoAI26h9.jpg",
"media_url_https": "https://pbs.twimg.com/media/C11cfRJUoAI26h9.jpg",
"url": "https://t.co/GwEzHTHlUC",
"display_url": "pic.twitter.com/GwEzHTHlUC",
"expanded_url": "https://twitter.com/pkdev/status/818912506496229376/photo/1",
"type": "photo",
"sizes": {
"medium": {
"w": 1200,
"h": 800,
"resize": "fit"
},
"small": {
"w": 680,
"h": 453,
"resize": "fit"
},
"thumb": {
"w": 150,
"h": 150,
"resize": "crop"
},
"large": {
"w": 2048,
"h": 1365,
"resize": "fit"
}
}
}
]
},
"extended_entities": {
"media": [
{
"id": 818912399499501570,
"id_str": "818912399499501570",
"indices": [
34,
57
],
"media_url": "http://pbs.twimg.com/media/C11cfRJUoAI26h9.jpg",
"media_url_https": "https://pbs.twimg.com/media/C11cfRJUoAI26h9.jpg",
"url": "https://t.co/GwEzHTHlUC",
"display_url": "pic.twitter.com/GwEzHTHlUC",
"expanded_url": "https://twitter.com/pkdev/status/818912506496229376/photo/1",
"type": "photo",
"sizes": {
"medium": {
"w": 1200,
"h": 800,
"resize": "fit"
},
"small": {
"w": 680,
"h": 453,
"resize": "fit"
},
"thumb": {
"w": 150,
"h": 150,
"resize": "crop"
},
"large": {
"w": 2048,
"h": 1365,
"resize": "fit"
}
}
}
]
},
"source": "<a href=\"http://twitter.com\" rel=\"nofollow\">Twitter Web Client</a>",
"in_reply_to_status_id": null,
"in_reply_to_status_id_str": null,
"in_reply_to_user_id": null,
"in_reply_to_user_id_str": null,
"in_reply_to_screen_name": null,
"user": {
"id": 143883456,
"id_str": "143883456",
"name": "aaronpk dev",
"screen_name": "pkdev",
"location": "Portland, OR",
"description": "Dev account for testing Twitter things. Follow me here: http://t.co/DtzRLfxayu",
"url": "https://t.co/fXLomQaMAd",
"entities": {
"url": {
"urls": [
{
"url": "https://t.co/fXLomQaMAd",
"expanded_url": "https://aaronparecki.com/",
"display_url": "aaronparecki.com",
"indices": [
0,
23
]
}
]
},
"description": {
"urls": [
{
"url": "http://t.co/DtzRLfxayu",
"expanded_url": "https://twitter.com/aaronpk",
"display_url": "twitter.com/aaronpk",
"indices": [
56,
78
]
}
]
}
},
"protected": true,
"followers_count": 4,
"friends_count": 1,
"listed_count": 1,
"created_at": "Fri May 14 17:47:15 +0000 2010",
"favourites_count": 1,
"utc_offset": -28800,
"time_zone": "Pacific Time (US & Canada)",
"geo_enabled": true,
"verified": false,
"statuses_count": 31,
"lang": "en",
"contributors_enabled": false,
"is_translator": false,
"is_translation_enabled": false,
"profile_background_color": "C0DEED",
"profile_background_image_url": "http://abs.twimg.com/images/themes/theme1/bg.png",
"profile_background_image_url_https": "https://abs.twimg.com/images/themes/theme1/bg.png",
"profile_background_tile": false,
"profile_image_url": "http://pbs.twimg.com/profile_images/638125135904436224/qd_d94Qn_normal.jpg",
"profile_image_url_https": "https://pbs.twimg.com/profile_images/638125135904436224/qd_d94Qn_normal.jpg",
"profile_link_color": "1DA1F2",
"profile_sidebar_border_color": "C0DEED",
"profile_sidebar_fill_color": "DDEEF6",
"profile_text_color": "333333",
"profile_use_background_image": true,
"has_extended_profile": false,
"default_profile": true,
"default_profile_image": false,
"following": true,
"follow_request_sent": false,
"notifications": false,
"translator_type": "none"
},
"geo": null,
"coordinates": null,
"place": {
"id": "ac88a4f17a51c7fc",
"url": "https://api.twitter.com/1.1/geo/id/ac88a4f17a51c7fc.json",
"place_type": "city",
"name": "Portland",
"full_name": "Portland, OR",
"country_code": "US",
"country": "United States",
"contained_within": [
],
"bounding_box": {
"type": "Polygon",
"coordinates": [
[
[
-122.7900653,
45.421863
],
[
-122.471751,
45.421863
],
[
-122.471751,
45.6509405
],
[
-122.7900653,
45.6509405
]
]
]
},
"attributes": {
}
},
"contributors": null,
"is_quote_status": false,
"retweet_count": 0,
"favorite_count": 0,
"favorited": false,
"retweeted": false,
"possibly_sensitive": false,
"possibly_sensitive_appealable": false,
"lang": "en"
}

+ 0
- 262
tests/data/api.twitter.com/818913178260160512.json View File

@ -1,262 +0,0 @@
{
"created_at": "Tue Jan 10 20:11:31 +0000 2017",
"id": 818913178260160512,
"id_str": "818913178260160512",
"full_text": "Tweet with a video https://t.co/6hyv5rr3FL",
"truncated": false,
"display_text_range": [
0,
18
],
"entities": {
"hashtags": [
],
"symbols": [
],
"user_mentions": [
],
"urls": [
],
"media": [
{
"id": 818913089248595970,
"id_str": "818913089248595970",
"indices": [
19,
42
],
"media_url": "http://pbs.twimg.com/ext_tw_video_thumb/818913089248595970/pr/img/qVoEjF03Y41SKpNt.jpg",
"media_url_https": "https://pbs.twimg.com/ext_tw_video_thumb/818913089248595970/pr/img/qVoEjF03Y41SKpNt.jpg",
"url": "https://t.co/6hyv5rr3FL",
"display_url": "pic.twitter.com/6hyv5rr3FL",
"expanded_url": "https://twitter.com/pkdev/status/818913178260160512/video/1",
"type": "photo",
"sizes": {
"thumb": {
"w": 150,
"h": 150,
"resize": "crop"
},
"medium": {
"w": 600,
"h": 338,
"resize": "fit"
},
"small": {
"w": 340,
"h": 191,
"resize": "fit"
},
"large": {
"w": 1024,
"h": 576,
"resize": "fit"
}
}
}
]
},
"extended_entities": {
"media": [
{
"id": 818913089248595970,
"id_str": "818913089248595970",
"indices": [
19,
42
],
"media_url": "http://pbs.twimg.com/ext_tw_video_thumb/818913089248595970/pr/img/qVoEjF03Y41SKpNt.jpg",
"media_url_https": "https://pbs.twimg.com/ext_tw_video_thumb/818913089248595970/pr/img/qVoEjF03Y41SKpNt.jpg",
"url": "https://t.co/6hyv5rr3FL",
"display_url": "pic.twitter.com/6hyv5rr3FL",
"expanded_url": "https://twitter.com/pkdev/status/818913178260160512/video/1",
"type": "video",
"sizes": {
"thumb": {
"w": 150,
"h": 150,
"resize": "crop"
},
"medium": {
"w": 600,
"h": 338,
"resize": "fit"
},
"small": {
"w": 340,
"h": 191,
"resize": "fit"
},
"large": {
"w": 1024,
"h": 576,
"resize": "fit"
}
},
"video_info": {
"aspect_ratio": [
16,
9
],
"duration_millis": 41534,
"variants": [
{
"content_type": "application/x-mpegURL",
"url": "https://video.twimg.com/ext_tw_video/818913089248595970/pr/pl/TrPaTlyUsAN8GjxN.m3u8"
},
{
"bitrate": 320000,
"content_type": "video/mp4",
"url": "https://video.twimg.com/ext_tw_video/818913089248595970/pr/vid/320x180/XMltLv_V-HjjJw3B.mp4"
},
{
"bitrate": 2176000,
"content_type": "video/mp4",
"url": "https://video.twimg.com/ext_tw_video/818913089248595970/pr/vid/1280x720/qP-sDx-Q0Hs-ckVv.mp4"
},
{
"content_type": "application/dash+xml",
"url": "https://video.twimg.com/ext_tw_video/818913089248595970/pr/pl/TrPaTlyUsAN8GjxN.mpd"
},
{
"bitrate": 832000,
"content_type": "video/mp4",
"url": "https://video.twimg.com/ext_tw_video/818913089248595970/pr/vid/640x360/1oP83JGgjXpDd4WY.mp4"
}
]
},
"additional_media_info": {
"monetizable": false
}
}
]
},
"source": "<a href=\"http://twitter.com\" rel=\"nofollow\">Twitter Web Client</a>",
"in_reply_to_status_id": null,
"in_reply_to_status_id_str": null,
"in_reply_to_user_id": null,
"in_reply_to_user_id_str": null,
"in_reply_to_screen_name": null,
"user": {
"id": 143883456,
"id_str": "143883456",
"name": "aaronpk dev",
"screen_name": "pkdev",
"location": "Portland, OR",
"description": "Dev account for testing Twitter things. Follow me here: http://t.co/DtzRLfxayu",
"url": "https://t.co/fXLomQaMAd",
"entities": {
"url": {
"urls": [
{
"url": "https://t.co/fXLomQaMAd",
"expanded_url": "https://aaronparecki.com/",
"display_url": "aaronparecki.com",
"indices": [
0,
23
]
}
]
},
"description": {
"urls": [
{
"url": "http://t.co/DtzRLfxayu",
"expanded_url": "https://twitter.com/aaronpk",
"display_url": "twitter.com/aaronpk",
"indices": [
56,
78
]
}
]
}
},
"protected": true,
"followers_count": 4,
"friends_count": 1,
"listed_count": 1,
"created_at": "Fri May 14 17:47:15 +0000 2010",
"favourites_count": 1,
"utc_offset": -28800,
"time_zone": "Pacific Time (US & Canada)",
"geo_enabled": true,
"verified": false,
"statuses_count": 36,
"lang": "en",
"contributors_enabled": false,
"is_translator": false,
"is_translation_enabled": false,
"profile_background_color": "C0DEED",
"profile_background_image_url": "http://abs.twimg.com/images/themes/theme1/bg.png",
"profile_background_image_url_https": "https://abs.twimg.com/images/themes/theme1/bg.png",
"profile_background_tile": false,
"profile_image_url": "http://pbs.twimg.com/profile_images/638125135904436224/qd_d94Qn_normal.jpg",
"profile_image_url_https": "https://pbs.twimg.com/profile_images/638125135904436224/qd_d94Qn_normal.jpg",
"profile_link_color": "1DA1F2",
"profile_sidebar_border_color": "C0DEED",
"profile_sidebar_fill_color": "DDEEF6",
"profile_text_color": "333333",
"profile_use_background_image": true,
"has_extended_profile": true,
"default_profile": true,
"default_profile_image": false,
"following": true,
"follow_request_sent": false,
"notifications": false,
"translator_type": "none"
},
"geo": null,
"coordinates": null,
"place": {
"id": "ac88a4f17a51c7fc",
"url": "https://api.twitter.com/1.1/geo/id/ac88a4f17a51c7fc.json",
"place_type": "city",
"name": "Portland",
"full_name": "Portland, OR",
"country_code": "US",
"country": "United States",
"contained_within": [
],
"bounding_box": {
"type": "Polygon",
"coordinates": [
[
[
-122.7900653,
45.421863
],
[
-122.471751,
45.421863
],
[
-122.471751,
45.6509405
],
[
-122.7900653,
45.6509405
]
]
]
},
"attributes": {
}
},
"contributors": null,
"is_quote_status": false,
"retweet_count": 0,
"favorite_count": 0,
"favorited": false,
"retweeted": false,
"possibly_sensitive": false,
"possibly_sensitive_appealable": false,
"lang": "en"
}

+ 0
- 482
tests/data/api.twitter.com/818913351623245824.json View File

@ -1,482 +0,0 @@
{
"created_at": "Tue Jan 10 20:12:12 +0000 2017",
"id": 818913351623245824,
"id_str": "818913351623245824",
"full_text": "RT @aaronpk: Yeah that's me https://t.co/6ZjcRmb3ec https://t.co/n0k56i1nSl",
"truncated": false,
"display_text_range": [
0,
75
],
"entities": {
"hashtags": [
],
"symbols": [
],
"user_mentions": [
{
"screen_name": "aaronpk",
"name": "Aaron Parecki",
"id": 14447132,
"id_str": "14447132",
"indices": [
3,
11
]
}
],
"urls": [
{
"url": "https://t.co/6ZjcRmb3ec",
"expanded_url": "http://xkcd.com/1782/",
"display_url": "xkcd.com/1782/",
"indices": [
28,
51
]
}
],
"media": [
{
"id": 817414678586372096,
"id_str": "817414678586372096",
"indices": [
52,
75
],
"media_url": "http://pbs.twimg.com/media/C1gKUb9UsAAbi2R.jpg",
"media_url_https": "https://pbs.twimg.com/media/C1gKUb9UsAAbi2R.jpg",
"url": "https://t.co/n0k56i1nSl",
"display_url": "pic.twitter.com/n0k56i1nSl",
"expanded_url": "https://twitter.com/aaronpk/status/817414679131660288/photo/1",
"type": "photo",
"sizes": {
"small": {
"w": 680,
"h": 290,
"resize": "fit"
},
"large": {
"w": 700,
"h": 299,
"resize": "fit"
},
"thumb": {
"w": 150,
"h": 150,
"resize": "crop"
},
"medium": {
"w": 700,
"h": 299,
"resize": "fit"
}
},
"source_status_id": 817414679131660288,
"source_status_id_str": "817414679131660288",
"source_user_id": 14447132,
"source_user_id_str": "14447132"
}
]
},
"extended_entities": {
"media": [
{
"id": 817414678586372096,
"id_str": "817414678586372096",
"indices": [
52,
75
],
"media_url": "http://pbs.twimg.com/media/C1gKUb9UsAAbi2R.jpg",
"media_url_https": "https://pbs.twimg.com/media/C1gKUb9UsAAbi2R.jpg",
"url": "https://t.co/n0k56i1nSl",
"display_url": "pic.twitter.com/n0k56i1nSl",
"expanded_url": "https://twitter.com/aaronpk/status/817414679131660288/photo/1",
"type": "photo",
"sizes": {
"small": {
"w": 680,
"h": 290,
"resize": "fit"
},
"large": {
"w": 700,
"h": 299,
"resize": "fit"
},
"thumb": {
"w": 150,
"h": 150,
"resize": "crop"
},
"medium": {
"w": 700,
"h": 299,
"resize": "fit"
}
},
"source_status_id": 817414679131660288,
"source_status_id_str": "817414679131660288",
"source_user_id": 14447132,
"source_user_id_str": "14447132"
}
]
},
"source": "<a href=\"http://twitter.com\" rel=\"nofollow\">Twitter Web Client</a>",
"in_reply_to_status_id": null,
"in_reply_to_status_id_str": null,
"in_reply_to_user_id": null,
"in_reply_to_user_id_str": null,
"in_reply_to_screen_name": null,
"user": {
"id": 143883456,
"id_str": "143883456",
"name": "aaronpk dev",
"screen_name": "pkdev",
"location": "Portland, OR",
"description": "Dev account for testing Twitter things. Follow me here: http://t.co/DtzRLfxayu",
"url": "https://t.co/fXLomQaMAd",
"entities": {
"url": {
"urls": [
{
"url": "https://t.co/fXLomQaMAd",
"expanded_url": "https://aaronparecki.com/",
"display_url": "aaronparecki.com",
"indices": [
0,
23
]
}
]
},
"description": {
"urls": [
{
"url": "http://t.co/DtzRLfxayu",
"expanded_url": "https://twitter.com/aaronpk",
"display_url": "twitter.com/aaronpk",
"indices": [
56,
78
]
}
]
}
},
"protected": true,
"followers_count": 4,
"friends_count": 1,
"listed_count": 1,
"created_at": "Fri May 14 17:47:15 +0000 2010",
"favourites_count": 1,
"utc_offset": -28800,
"time_zone": "Pacific Time (US & Canada)",
"geo_enabled": true,
"verified": false,
"statuses_count": 37,
"lang": "en",
"contributors_enabled": false,
"is_translator": false,
"is_translation_enabled": false,
"profile_background_color": "C0DEED",
"profile_background_image_url": "http://abs.twimg.com/images/themes/theme1/bg.png",
"profile_background_image_url_https": "https://abs.twimg.com/images/themes/theme1/bg.png",
"profile_background_tile": false,
"profile_image_url": "http://pbs.twimg.com/profile_images/638125135904436224/qd_d94Qn_normal.jpg",
"profile_image_url_https": "https://pbs.twimg.com/profile_images/638125135904436224/qd_d94Qn_normal.jpg",
"profile_link_color": "1DA1F2",
"profile_sidebar_border_color": "C0DEED",
"profile_sidebar_fill_color": "DDEEF6",
"profile_text_color": "333333",
"profile_use_background_image": true,
"has_extended_profile": true,
"default_profile": true,
"default_profile_image": false,
"following": true,
"follow_request_sent": false,
"notifications": false,
"translator_type": "none"
},
"geo": null,
"coordinates": null,
"place": null,
"contributors": null,
"retweeted_status": {
"created_at": "Fri Jan 06 16:57:00 +0000 2017",
"id": 817414679131660288,
"id_str": "817414679131660288",
"full_text": "Yeah that's me https://t.co/6ZjcRmb3ec https://t.co/n0k56i1nSl",
"truncated": false,
"display_text_range": [
0,
38
],
"entities": {
"hashtags": [
],
"symbols": [
],
"user_mentions": [
],
"urls": [
{
"url": "https://t.co/6ZjcRmb3ec",
"expanded_url": "http://xkcd.com/1782/",
"display_url": "xkcd.com/1782/",
"indices": [
15,
38
]
}
],
"media": [
{
"id": 817414678586372096,
"id_str": "817414678586372096",
"indices": [
39,
62
],
"media_url": "http://pbs.twimg.com/media/C1gKUb9UsAAbi2R.jpg",
"media_url_https": "https://pbs.twimg.com/media/C1gKUb9UsAAbi2R.jpg",
"url": "https://t.co/n0k56i1nSl",
"display_url": "pic.twitter.com/n0k56i1nSl",
"expanded_url": "https://twitter.com/aaronpk/status/817414679131660288/photo/1",
"type": "photo",
"sizes": {
"small": {
"w": 680,
"h": 290,
"resize": "fit"
},
"large": {
"w": 700,
"h": 299,
"resize": "fit"
},
"thumb": {
"w": 150,
"h": 150,
"resize": "crop"
},
"medium": {
"w": 700,
"h": 299,
"resize": "fit"
}
}
}
]
},
"extended_entities": {
"media": [
{
"id": 817414678586372096,
"id_str": "817414678586372096",
"indices": [
39,
62
],
"media_url": "http://pbs.twimg.com/media/C1gKUb9UsAAbi2R.jpg",
"media_url_https": "https://pbs.twimg.com/media/C1gKUb9UsAAbi2R.jpg",
"url": "https://t.co/n0k56i1nSl",
"display_url": "pic.twitter.com/n0k56i1nSl",
"expanded_url": "https://twitter.com/aaronpk/status/817414679131660288/photo/1",
"type": "photo",
"sizes": {
"small": {
"w": 680,
"h": 290,
"resize": "fit"
},
"large": {
"w": 700,
"h": 299,
"resize": "fit"
},
"thumb": {
"w": 150,
"h": 150,
"resize": "crop"
},
"medium": {
"w": 700,
"h": 299,
"resize": "fit"
}
}
}
]
},
"source": "<a href=\"https://silopub.p3k.io\" rel=\"nofollow\">Silo Pub for p3k</a>",
"in_reply_to_status_id": null,
"in_reply_to_status_id_str": null,
"in_reply_to_user_id": null,
"in_reply_to_user_id_str": null,
"in_reply_to_screen_name": null,
"user": {
"id": 14447132,
"id_str": "14447132",
"name": "Aaron Parecki",
"screen_name": "aaronpk",
"location": "Portland, OR",
"description": "Cofounder of #indieweb/@indiewebcamp • I maintain https://t.co/zBgRc3oyhG • Editor of https://t.co/JxW2Ws0Ctv and https://t.co/bjsh7VQ4ZI • @W7APK",
"url": "https://t.co/LvwC5LPQlU",
"entities": {
"url": {
"urls": [
{
"url": "https://t.co/LvwC5LPQlU",
"expanded_url": "http://aaronparecki.com",
"display_url": "aaronparecki.com",
"indices": [
0,
23
]
}
]
},
"description": {
"urls": [
{
"url": "https://t.co/zBgRc3oyhG",
"expanded_url": "http://oauth.net",
"display_url": "oauth.net",
"indices": [
50,
73
]
},
{
"url": "https://t.co/JxW2Ws0Ctv",
"expanded_url": "http://w3.org/TR/micropub",
"display_url": "w3.org/TR/micropub",
"indices": [
86,
109
]
},
{
"url": "https://t.co/bjsh7VQ4ZI",
"expanded_url": "http://w3.org/TR/webmention",
"display_url": "w3.org/TR/webmention",
"indices": [
114,
137
]
}
]
}
},
"protected": false,
"followers_count": 3379,
"friends_count": 1036,
"listed_count": 346,
"created_at": "Sat Apr 19 22:38:15 +0000 2008",
"favourites_count": 3703,
"utc_offset": -28800,
"time_zone": "Pacific Time (US & Canada)",
"geo_enabled": true,
"verified": true,
"statuses_count": 6675,
"lang": "en",
"contributors_enabled": false,
"is_translator": false,
"is_translation_enabled": false,
"profile_background_color": "7A9AAF",
"profile_background_image_url": "http://pbs.twimg.com/profile_background_images/185835062/4786064324_b7049fbec8_b.jpg",
"profile_background_image_url_https": "https://pbs.twimg.com/profile_background_images/185835062/4786064324_b7049fbec8_b.jpg",
"profile_background_tile": true,
"profile_image_url": "http://pbs.twimg.com/profile_images/775755455188512768/CA3YxGa4_normal.jpg",
"profile_image_url_https": "https://pbs.twimg.com/profile_images/775755455188512768/CA3YxGa4_normal.jpg",
"profile_banner_url": "https://pbs.twimg.com/profile_banners/14447132/1398201184",
"profile_link_color": "FF5900",
"profile_sidebar_border_color": "87BC44",
"profile_sidebar_fill_color": "94C8FF",
"profile_text_color": "000000",
"profile_use_background_image": true,
"has_extended_profile": true,
"default_profile": false,
"default_profile_image": false,
"following": false,
"follow_request_sent": false,
"notifications": false,
"translator_type": "none"
},
"geo": {
"type": "Point",
"coordinates": [
45.53553,
-122.62139
]
},
"coordinates": {
"type": "Point",
"coordinates": [
-122.62139,
45.53553
]
},
"place": {
"id": "ac88a4f17a51c7fc",
"url": "https://api.twitter.com/1.1/geo/id/ac88a4f17a51c7fc.json",
"place_type": "city",
"name": "Portland",
"full_name": "Portland, OR",
"country_code": "US",
"country": "United States",
"contained_within": [
],
"bounding_box": {
"type": "Polygon",
"coordinates": [
[
[
-122.7900653,
45.421863
],
[
-122.471751,
45.421863
],
[
-122.471751,
45.6509405
],
[
-122.7900653,
45.6509405
]
]
]
},
"attributes": {
}
},
"contributors": null,
"is_quote_status": false,
"retweet_count": 3,
"favorite_count": 6,
"favorited": false,
"retweeted": false,
"possibly_sensitive": false,
"possibly_sensitive_appealable": false,
"lang": "en"
},
"is_quote_status": false,
"retweet_count": 3,
"favorite_count": 0,
"favorited": false,
"retweeted": false,
"possibly_sensitive": false,
"possibly_sensitive_appealable": false,
"lang": "en"
}

+ 0
- 431
tests/data/api.twitter.com/818913488609251331.json View File

@ -1,431 +0,0 @@
{
"created_at": "Tue Jan 10 20:12:45 +0000 2017",
"id": 818913488609251331,
"id_str": "818913488609251331",
"full_text": "Quoted tweet with a #hashtag https://t.co/m8RAfr0S3e",
"truncated": false,
"display_text_range": [
0,
52
],
"entities": {
"hashtags": [
{
"text": "hashtag",
"indices": [
20,
28
]
}
],
"symbols": [
],
"user_mentions": [
],
"urls": [
{
"url": "https://t.co/m8RAfr0S3e",
"expanded_url": "https://twitter.com/aaronpk/status/817414679131660288",
"display_url": "twitter.com/aaronpk/status…",
"indices": [
29,
52
]
}
]
},
"source": "<a href=\"http://twitter.com\" rel=\"nofollow\">Twitter Web Client</a>",
"in_reply_to_status_id": null,
"in_reply_to_status_id_str": null,
"in_reply_to_user_id": null,
"in_reply_to_user_id_str": null,
"in_reply_to_screen_name": null,
"user": {
"id": 143883456,
"id_str": "143883456",
"name": "aaronpk dev",
"screen_name": "pkdev",
"location": "Portland, OR",
"description": "Dev account for testing Twitter things. Follow me here: http://t.co/DtzRLfxayu",
"url": "https://t.co/fXLomQaMAd",
"entities": {
"url": {
"urls": [
{
"url": "https://t.co/fXLomQaMAd",
"expanded_url": "https://aaronparecki.com/",
"display_url": "aaronparecki.com",
"indices": [
0,
23
]
}
]
},
"description": {
"urls": [
{
"url": "http://t.co/DtzRLfxayu",
"expanded_url": "https://twitter.com/aaronpk",
"display_url": "twitter.com/aaronpk",
"indices": [
56,
78
]
}
]
}
},
"protected": true,
"followers_count": 4,
"friends_count": 1,
"listed_count": 1,
"created_at": "Fri May 14 17:47:15 +0000 2010",
"favourites_count": 1,
"utc_offset": -28800,
"time_zone": "Pacific Time (US & Canada)",
"geo_enabled": true,
"verified": false,
"statuses_count": 37,
"lang": "en",
"contributors_enabled": false,
"is_translator": false,
"is_translation_enabled": false,
"profile_background_color": "C0DEED",
"profile_background_image_url": "http://abs.twimg.com/images/themes/theme1/bg.png",
"profile_background_image_url_https": "https://abs.twimg.com/images/themes/theme1/bg.png",
"profile_background_tile": false,
"profile_image_url": "http://pbs.twimg.com/profile_images/638125135904436224/qd_d94Qn_normal.jpg",
"profile_image_url_https": "https://pbs.twimg.com/profile_images/638125135904436224/qd_d94Qn_normal.jpg",
"profile_link_color": "1DA1F2",
"profile_sidebar_border_color": "C0DEED",
"profile_sidebar_fill_color": "DDEEF6",
"profile_text_color": "333333",
"profile_use_background_image": true,
"has_extended_profile": true,
"default_profile": true,
"default_profile_image": false,
"following": true,
"follow_request_sent": false,
"notifications": false,
"translator_type": "none"
},
"geo": null,
"coordinates": null,
"place": {
"id": "ac88a4f17a51c7fc",
"url": "https://api.twitter.com/1.1/geo/id/ac88a4f17a51c7fc.json",
"place_type": "city",
"name": "Portland",
"full_name": "Portland, OR",
"country_code": "US",
"country": "United States",
"contained_within": [
],
"bounding_box": {
"type": "Polygon",
"coordinates": [
[
[
-122.7900653,
45.421863
],
[
-122.471751,
45.421863
],
[
-122.471751,
45.6509405
],
[
-122.7900653,
45.6509405
]
]
]
},
"attributes": {
}
},
"contributors": null,
"is_quote_status": true,
"quoted_status_id": 817414679131660288,
"quoted_status_id_str": "817414679131660288",
"quoted_status": {
"created_at": "Fri Jan 06 16:57:00 +0000 2017",
"id": 817414679131660288,
"id_str": "817414679131660288",
"full_text": "Yeah that's me https://t.co/6ZjcRmb3ec https://t.co/n0k56i1nSl",
"truncated": false,
"display_text_range": [
0,
38
],
"entities": {
"hashtags": [
],
"symbols": [
],
"user_mentions": [
],
"urls": [
{
"url": "https://t.co/6ZjcRmb3ec",
"expanded_url": "http://xkcd.com/1782/",
"display_url": "xkcd.com/1782/",
"indices": [
15,
38
]
}
],
"media": [
{
"id": 817414678586372096,
"id_str": "817414678586372096",
"indices": [
39,
62
],
"media_url": "http://pbs.twimg.com/media/C1gKUb9UsAAbi2R.jpg",
"media_url_https": "https://pbs.twimg.com/media/C1gKUb9UsAAbi2R.jpg",
"url": "https://t.co/n0k56i1nSl",
"display_url": "pic.twitter.com/n0k56i1nSl",
"expanded_url": "https://twitter.com/aaronpk/status/817414679131660288/photo/1",
"type": "photo",
"sizes": {
"small": {
"w": 680,
"h": 290,
"resize": "fit"
},
"large": {
"w": 700,
"h": 299,
"resize": "fit"
},
"thumb": {
"w": 150,
"h": 150,
"resize": "crop"
},
"medium": {
"w": 700,
"h": 299,
"resize": "fit"
}
}
}
]
},
"extended_entities": {
"media": [
{
"id": 817414678586372096,
"id_str": "817414678586372096",
"indices": [
39,
62
],
"media_url": "http://pbs.twimg.com/media/C1gKUb9UsAAbi2R.jpg",
"media_url_https": "https://pbs.twimg.com/media/C1gKUb9UsAAbi2R.jpg",
"url": "https://t.co/n0k56i1nSl",
"display_url": "pic.twitter.com/n0k56i1nSl",
"expanded_url": "https://twitter.com/aaronpk/status/817414679131660288/photo/1",
"type": "photo",
"sizes": {
"small": {
"w": 680,
"h": 290,
"resize": "fit"
},
"large": {
"w": 700,
"h": 299,
"resize": "fit"
},
"thumb": {
"w": 150,
"h": 150,
"resize": "crop"
},
"medium": {
"w": 700,
"h": 299,
"resize": "fit"
}
}
}
]
},
"source": "<a href=\"https://silopub.p3k.io\" rel=\"nofollow\">Silo Pub for p3k</a>",
"in_reply_to_status_id": null,
"in_reply_to_status_id_str": null,
"in_reply_to_user_id": null,
"in_reply_to_user_id_str": null,
"in_reply_to_screen_name": null,
"user": {
"id": 14447132,
"id_str": "14447132",
"name": "Aaron Parecki",
"screen_name": "aaronpk",
"location": "Portland, OR",
"description": "Cofounder of #indieweb/@indiewebcamp • I maintain https://t.co/zBgRc3oyhG • Editor of https://t.co/JxW2Ws0Ctv and https://t.co/bjsh7VQ4ZI • @W7APK",
"url": "https://t.co/LvwC5LPQlU",
"entities": {
"url": {
"urls": [
{
"url": "https://t.co/LvwC5LPQlU",
"expanded_url": "http://aaronparecki.com",
"display_url": "aaronparecki.com",
"indices": [
0,
23
]
}
]
},
"description": {
"urls": [
{
"url": "https://t.co/zBgRc3oyhG",
"expanded_url": "http://oauth.net",
"display_url": "oauth.net",
"indices": [
50,
73
]
},
{
"url": "https://t.co/JxW2Ws0Ctv",
"expanded_url": "http://w3.org/TR/micropub",
"display_url": "w3.org/TR/micropub",
"indices": [
86,
109
]
},
{
"url": "https://t.co/bjsh7VQ4ZI",
"expanded_url": "http://w3.org/TR/webmention",
"display_url": "w3.org/TR/webmention",
"indices": [
114,
137
]
}
]
}
},
"protected": false,
"followers_count": 3379,
"friends_count": 1036,
"listed_count": 346,
"created_at": "Sat Apr 19 22:38:15 +0000 2008",
"favourites_count": 3703,
"utc_offset": -28800,
"time_zone": "Pacific Time (US & Canada)",
"geo_enabled": true,
"verified": true,
"statuses_count": 6675,
"lang": "en",
"contributors_enabled": false,
"is_translator": false,
"is_translation_enabled": false,
"profile_background_color": "7A9AAF",
"profile_background_image_url": "http://pbs.twimg.com/profile_background_images/185835062/4786064324_b7049fbec8_b.jpg",
"profile_background_image_url_https": "https://pbs.twimg.com/profile_background_images/185835062/4786064324_b7049fbec8_b.jpg",
"profile_background_tile": true,
"profile_image_url": "http://pbs.twimg.com/profile_images/775755455188512768/CA3YxGa4_normal.jpg",
"profile_image_url_https": "https://pbs.twimg.com/profile_images/775755455188512768/CA3YxGa4_normal.jpg",
"profile_banner_url": "https://pbs.twimg.com/profile_banners/14447132/1398201184",
"profile_link_color": "FF5900",
"profile_sidebar_border_color": "87BC44",
"profile_sidebar_fill_color": "94C8FF",
"profile_text_color": "000000",
"profile_use_background_image": true,
"has_extended_profile": true,
"default_profile": false,
"default_profile_image": false,
"following": false,
"follow_request_sent": false,
"notifications": false,
"translator_type": "none"
},
"geo": {
"type": "Point",
"coordinates": [
45.53553,
-122.62139
]
},
"coordinates": {
"type": "Point",
"coordinates": [
-122.62139,
45.53553
]
},
"place": {
"id": "ac88a4f17a51c7fc",
"url": "https://api.twitter.com/1.1/geo/id/ac88a4f17a51c7fc.json",
"place_type": "city",
"name": "Portland",
"full_name": "Portland, OR",
"country_code": "US",
"country": "United States",
"contained_within": [
],
"bounding_box": {
"type": "Polygon",
"coordinates": [
[
[
-122.7900653,
45.421863
],
[
-122.471751,
45.421863
],
[
-122.471751,
45.6509405
],
[
-122.7900653,
45.6509405
]
]
]
},
"attributes": {
}
},
"contributors": null,
"is_quote_status": false,
"retweet_count": 3,
"favorite_count": 6,
"favorited": false,
"retweeted": false,
"possibly_sensitive": false,
"possibly_sensitive_appealable": false,
"lang": "en"
},
"retweet_count": 0,
"favorite_count": 0,
"favorited": false,
"retweeted": false,
"possibly_sensitive": false,
"possibly_sensitive_appealable": false,
"lang": "en"
}

+ 0
- 177
tests/data/api.twitter.com/818913630569664512.json View File

@ -1,177 +0,0 @@
{
"created_at": "Tue Jan 10 20:13:18 +0000 2017",
"id": 818913630569664512,
"id_str": "818913630569664512",
"full_text": "A tweet with a URL https://t.co/sVq9EOlcNs #and #some #hashtags",
"truncated": false,
"display_text_range": [
0,
63
],
"entities": {
"hashtags": [
{
"text": "and",
"indices": [
43,
47
]
},
{
"text": "some",
"indices": [
48,
53
]
},
{
"text": "hashtags",
"indices": [
54,
63
]
}
],
"symbols": [
],
"user_mentions": [
],
"urls": [
{
"url": "https://t.co/sVq9EOlcNs",
"expanded_url": "https://indieweb.org/",
"display_url": "indieweb.org",
"indices": [
19,
42
]
}
]
},
"source": "<a href=\"http://twitter.com\" rel=\"nofollow\">Twitter Web Client</a>",
"in_reply_to_status_id": null,
"in_reply_to_status_id_str": null,
"in_reply_to_user_id": null,
"in_reply_to_user_id_str": null,
"in_reply_to_screen_name": null,
"user": {
"id": 143883456,
"id_str": "143883456",
"name": "aaronpk dev",
"screen_name": "pkdev",
"location": "Portland, OR",
"description": "Dev account for testing Twitter things. Follow me here: http://t.co/DtzRLfxayu",
"url": "https://t.co/fXLomQaMAd",
"entities": {
"url": {
"urls": [
{
"url": "https://t.co/fXLomQaMAd",
"expanded_url": "https://aaronparecki.com/",
"display_url": "aaronparecki.com",
"indices": [
0,
23
]
}
]
},
"description": {
"urls": [
{
"url": "http://t.co/DtzRLfxayu",
"expanded_url": "https://twitter.com/aaronpk",
"display_url": "twitter.com/aaronpk",
"indices": [
56,
78
]
}
]
}
},
"protected": true,
"followers_count": 4,
"friends_count": 1,
"listed_count": 1,
"created_at": "Fri May 14 17:47:15 +0000 2010",
"favourites_count": 1,
"utc_offset": -28800,
"time_zone": "Pacific Time (US & Canada)",
"geo_enabled": true,
"verified": false,
"statuses_count": 35,
"lang": "en",
"contributors_enabled": false,
"is_translator": false,
"is_translation_enabled": false,
"profile_background_color": "C0DEED",
"profile_background_image_url": "http://abs.twimg.com/images/themes/theme1/bg.png",
"profile_background_image_url_https": "https://abs.twimg.com/images/themes/theme1/bg.png",
"profile_background_tile": false,
"profile_image_url": "http://pbs.twimg.com/profile_images/638125135904436224/qd_d94Qn_normal.jpg",
"profile_image_url_https": "https://pbs.twimg.com/profile_images/638125135904436224/qd_d94Qn_normal.jpg",
"profile_link_color": "1DA1F2",
"profile_sidebar_border_color": "C0DEED",
"profile_sidebar_fill_color": "DDEEF6",
"profile_text_color": "333333",
"profile_use_background_image": true,
"has_extended_profile": false,
"default_profile": true,
"default_profile_image": false,
"following": true,
"follow_request_sent": false,
"notifications": false,
"translator_type": "none"
},
"geo": null,
"coordinates": null,
"place": {
"id": "ac88a4f17a51c7fc",
"url": "https://api.twitter.com/1.1/geo/id/ac88a4f17a51c7fc.json",
"place_type": "city",
"name": "Portland",
"full_name": "Portland, OR",
"country_code": "US",
"country": "United States",
"contained_within": [
],
"bounding_box": {
"type": "Polygon",
"coordinates": [
[
[
-122.7900653,
45.421863
],
[
-122.471751,
45.421863
],
[
-122.471751,
45.6509405
],
[
-122.7900653,
45.6509405
]
]
]
},
"attributes": {
}
},
"contributors": null,
"is_quote_status": false,
"retweet_count": 0,
"favorite_count": 0,
"favorited": false,
"retweeted": false,
"possibly_sensitive": false,
"possibly_sensitive_appealable": false,
"lang": "en"
}

+ 0
- 147
tests/data/api.twitter.com/818928092383166465.json View File

@ -1,147 +0,0 @@
{
"created_at": "Tue Jan 10 21:10:46 +0000 2017",
"id": 818928092383166465,
"id_str": "818928092383166465",
"full_text": "Double escaping &amp;amp; &amp; amp",
"truncated": false,
"display_text_range": [
0,
35
],
"entities": {
"hashtags": [
],
"symbols": [
],
"user_mentions": [
],
"urls": [
]
},
"source": "<a href=\"http://twitter.com\" rel=\"nofollow\">Twitter Web Client</a>",
"in_reply_to_status_id": null,
"in_reply_to_status_id_str": null,
"in_reply_to_user_id": null,
"in_reply_to_user_id_str": null,
"in_reply_to_screen_name": null,
"user": {
"id": 143883456,
"id_str": "143883456",
"name": "aaronpk dev",
"screen_name": "pkdev",
"location": "Portland, OR",
"description": "Dev account for testing Twitter things. Follow me here: http://t.co/DtzRLfxayu",
"url": "https://t.co/fXLomQaMAd",
"entities": {
"url": {
"urls": [
{
"url": "https://t.co/fXLomQaMAd",
"expanded_url": "https://aaronparecki.com/",
"display_url": "aaronparecki.com",
"indices": [
0,
23
]
}
]
},
"description": {
"urls": [
{
"url": "http://t.co/DtzRLfxayu",
"expanded_url": "https://twitter.com/aaronpk",
"display_url": "twitter.com/aaronpk",
"indices": [
56,
78
]
}
]
}
},
"protected": true,
"followers_count": 4,
"friends_count": 1,
"listed_count": 1,
"created_at": "Fri May 14 17:47:15 +0000 2010",
"favourites_count": 1,
"utc_offset": -28800,
"time_zone": "Pacific Time (US & Canada)",
"geo_enabled": true,
"verified": false,
"statuses_count": 36,
"lang": "en",
"contributors_enabled": false,
"is_translator": false,
"is_translation_enabled": false,
"profile_background_color": "C0DEED",
"profile_background_image_url": "http://abs.twimg.com/images/themes/theme1/bg.png",
"profile_background_image_url_https": "https://abs.twimg.com/images/themes/theme1/bg.png",
"profile_background_tile": false,
"profile_image_url": "http://pbs.twimg.com/profile_images/638125135904436224/qd_d94Qn_normal.jpg",
"profile_image_url_https": "https://pbs.twimg.com/profile_images/638125135904436224/qd_d94Qn_normal.jpg",
"profile_link_color": "1DA1F2",
"profile_sidebar_border_color": "C0DEED",
"profile_sidebar_fill_color": "DDEEF6",
"profile_text_color": "333333",
"profile_use_background_image": true,
"has_extended_profile": true,
"default_profile": true,
"default_profile_image": false,
"following": true,
"follow_request_sent": false,
"notifications": false,
"translator_type": "none"
},
"geo": null,
"coordinates": null,
"place": {
"id": "ac88a4f17a51c7fc",
"url": "https://api.twitter.com/1.1/geo/id/ac88a4f17a51c7fc.json",
"place_type": "city",
"name": "Portland",
"full_name": "Portland, OR",
"country_code": "US",
"country": "United States",
"contained_within": [
],
"bounding_box": {
"type": "Polygon",
"coordinates": [
[
[
-122.7900653,
45.421863
],
[
-122.471751,
45.421863
],
[
-122.471751,
45.6509405
],
[
-122.7900653,
45.6509405
]
]
]
},
"attributes": {
}
},
"contributors": null,
"is_quote_status": false,
"retweet_count": 0,
"favorite_count": 0,
"favorited": false,
"retweeted": false,
"lang": "en"
}

+ 0
- 263
tests/data/api.twitter.com/818935308813103104.json View File

@ -1,263 +0,0 @@
{
"created_at": "Tue Jan 10 21:39:27 +0000 2017",
"id": 818935308813103104,
"id_str": "818935308813103104",
"full_text": "Two photos https://t.co/esnJCdKVol",
"truncated": false,
"display_text_range": [
0,
10
],
"entities": {
"hashtags": [
],
"symbols": [
],
"user_mentions": [
],
"urls": [
],
"media": [
{
"id": 818934636239691777,
"id_str": "818934636239691777",
"indices": [
11,
34
],
"media_url": "http://pbs.twimg.com/media/C11wtndUoAE1WfE.jpg",
"media_url_https": "https://pbs.twimg.com/media/C11wtndUoAE1WfE.jpg",
"url": "https://t.co/esnJCdKVol",
"display_url": "pic.twitter.com/esnJCdKVol",
"expanded_url": "https://twitter.com/pkdev/status/818935308813103104/photo/1",
"type": "photo",
"sizes": {
"medium": {
"w": 1200,
"h": 800,
"resize": "fit"
},
"small": {
"w": 680,
"h": 453,
"resize": "fit"
},
"thumb": {
"w": 150,
"h": 150,
"resize": "crop"
},
"large": {
"w": 2048,
"h": 1365,
"resize": "fit"
}
}
}
]
},
"extended_entities": {
"media": [
{
"id": 818934636239691777,
"id_str": "818934636239691777",
"indices": [
11,
34
],
"media_url": "http://pbs.twimg.com/media/C11wtndUoAE1WfE.jpg",
"media_url_https": "https://pbs.twimg.com/media/C11wtndUoAE1WfE.jpg",
"url": "https://t.co/esnJCdKVol",
"display_url": "pic.twitter.com/esnJCdKVol",
"expanded_url": "https://twitter.com/pkdev/status/818935308813103104/photo/1",
"type": "photo",
"sizes": {
"medium": {
"w": 1200,
"h": 800,
"resize": "fit"
},
"small": {
"w": 680,
"h": 453,
"resize": "fit"
},
"thumb": {
"w": 150,
"h": 150,
"resize": "crop"
},
"large": {
"w": 2048,
"h": 1365,
"resize": "fit"
}
}
},
{
"id": 818935275732627456,
"id_str": "818935275732627456",
"indices": [
11,
34
],
"media_url": "http://pbs.twimg.com/media/C11xS1wUcAAeaKF.jpg",
"media_url_https": "https://pbs.twimg.com/media/C11xS1wUcAAeaKF.jpg",
"url": "https://t.co/esnJCdKVol",
"display_url": "pic.twitter.com/esnJCdKVol",
"expanded_url": "https://twitter.com/pkdev/status/818935308813103104/photo/1",
"type": "photo",
"sizes": {
"medium": {
"w": 1200,
"h": 800,
"resize": "fit"
},
"small": {
"w": 680,
"h": 453,
"resize": "fit"
},
"thumb": {
"w": 150,
"h": 150,
"resize": "crop"
},
"large": {
"w": 2048,
"h": 1365,
"resize": "fit"
}
}
}
]
},
"source": "<a href=\"http://twitter.com\" rel=\"nofollow\">Twitter Web Client</a>",
"in_reply_to_status_id": null,
"in_reply_to_status_id_str": null,
"in_reply_to_user_id": null,
"in_reply_to_user_id_str": null,
"in_reply_to_screen_name": null,
"user": {
"id": 143883456,
"id_str": "143883456",
"name": "aaronpk dev",
"screen_name": "pkdev",
"location": "Portland, OR",
"description": "Dev account for testing Twitter things. Follow me here: http://t.co/DtzRLfxayu",
"url": "https://t.co/fXLomQaMAd",
"entities": {
"url": {
"urls": [
{
"url": "https://t.co/fXLomQaMAd",
"expanded_url": "https://aaronparecki.com/",
"display_url": "aaronparecki.com",
"indices": [
0,
23
]
}
]
},
"description": {
"urls": [
{
"url": "http://t.co/DtzRLfxayu",
"expanded_url": "https://twitter.com/aaronpk",
"display_url": "twitter.com/aaronpk",
"indices": [
56,
78
]
}
]
}
},
"protected": true,
"followers_count": 4,
"friends_count": 1,
"listed_count": 1,
"created_at": "Fri May 14 17:47:15 +0000 2010",
"favourites_count": 1,
"utc_offset": -28800,
"time_zone": "Pacific Time (US & Canada)",
"geo_enabled": true,
"verified": false,
"statuses_count": 36,
"lang": "en",
"contributors_enabled": false,
"is_translator": false,
"is_translation_enabled": false,
"profile_background_color": "C0DEED",
"profile_background_image_url": "http://abs.twimg.com/images/themes/theme1/bg.png",
"profile_background_image_url_https": "https://abs.twimg.com/images/themes/theme1/bg.png",
"profile_background_tile": false,
"profile_image_url": "http://pbs.twimg.com/profile_images/638125135904436224/qd_d94Qn_normal.jpg",
"profile_image_url_https": "https://pbs.twimg.com/profile_images/638125135904436224/qd_d94Qn_normal.jpg",
"profile_link_color": "1DA1F2",
"profile_sidebar_border_color": "C0DEED",
"profile_sidebar_fill_color": "DDEEF6",
"profile_text_color": "333333",
"profile_use_background_image": true,
"has_extended_profile": true,
"default_profile": true,
"default_profile_image": false,
"following": true,
"follow_request_sent": false,
"notifications": false,
"translator_type": "none"
},
"geo": null,
"coordinates": null,
"place": {
"id": "ac88a4f17a51c7fc",
"url": "https://api.twitter.com/1.1/geo/id/ac88a4f17a51c7fc.json",
"place_type": "city",
"name": "Portland",
"full_name": "Portland, OR",
"country_code": "US",
"country": "United States",
"contained_within": [
],
"bounding_box": {
"type": "Polygon",
"coordinates": [
[
[
-122.7900653,
45.421863
],
[
-122.471751,
45.421863
],
[
-122.471751,
45.6509405
],
[
-122.7900653,
45.6509405
]
]
]
},
"attributes": {
}
},
"contributors": null,
"is_quote_status": false,
"retweet_count": 0,
"favorite_count": 0,
"favorited": false,
"retweeted": false,
"possibly_sensitive": false,
"possibly_sensitive_appealable": false,
"lang": "en"
}

+ 0
- 147
tests/data/api.twitter.com/818943244553699328.json View File

@ -1,147 +0,0 @@
{
"created_at": "Tue Jan 10 22:10:59 +0000 2017",
"id": 818943244553699328,
"id_str": "818943244553699328",
"full_text": "Here 🎉 have an emoji",
"truncated": false,
"display_text_range": [
0,
20
],
"entities": {
"hashtags": [
],
"symbols": [
],
"user_mentions": [
],
"urls": [
]
},
"source": "<a href=\"http://twitter.com\" rel=\"nofollow\">Twitter Web Client</a>",
"in_reply_to_status_id": null,
"in_reply_to_status_id_str": null,
"in_reply_to_user_id": null,
"in_reply_to_user_id_str": null,
"in_reply_to_screen_name": null,
"user": {
"id": 143883456,
"id_str": "143883456",
"name": "aaronpk dev",
"screen_name": "pkdev",
"location": "Portland, OR",
"description": "Dev account for testing Twitter things. Follow me here: http://t.co/DtzRLfxayu",
"url": "https://t.co/fXLomQaMAd",
"entities": {
"url": {
"urls": [
{
"url": "https://t.co/fXLomQaMAd",
"expanded_url": "https://aaronparecki.com/",
"display_url": "aaronparecki.com",
"indices": [
0,
23
]
}
]
},
"description": {
"urls": [
{
"url": "http://t.co/DtzRLfxayu",
"expanded_url": "https://twitter.com/aaronpk",
"display_url": "twitter.com/aaronpk",
"indices": [
56,
78
]
}
]
}
},
"protected": true,
"followers_count": 4,
"friends_count": 1,
"listed_count": 1,
"created_at": "Fri May 14 17:47:15 +0000 2010",
"favourites_count": 1,
"utc_offset": -28800,
"time_zone": "Pacific Time (US & Canada)",
"geo_enabled": true,
"verified": false,
"statuses_count": 37,
"lang": "en",
"contributors_enabled": false,
"is_translator": false,
"is_translation_enabled": false,
"profile_background_color": "C0DEED",
"profile_background_image_url": "http://abs.twimg.com/images/themes/theme1/bg.png",
"profile_background_image_url_https": "https://abs.twimg.com/images/themes/theme1/bg.png",
"profile_background_tile": false,
"profile_image_url": "http://pbs.twimg.com/profile_images/638125135904436224/qd_d94Qn_normal.jpg",
"profile_image_url_https": "https://pbs.twimg.com/profile_images/638125135904436224/qd_d94Qn_normal.jpg",
"profile_link_color": "1DA1F2",
"profile_sidebar_border_color": "C0DEED",
"profile_sidebar_fill_color": "DDEEF6",
"profile_text_color": "333333",
"profile_use_background_image": true,
"has_extended_profile": true,
"default_profile": true,
"default_profile_image": false,
"following": true,
"follow_request_sent": false,
"notifications": false,
"translator_type": "none"
},
"geo": null,
"coordinates": null,
"place": {
"id": "ac88a4f17a51c7fc",
"url": "https://api.twitter.com/1.1/geo/id/ac88a4f17a51c7fc.json",
"place_type": "city",
"name": "Portland",
"full_name": "Portland, OR",
"country_code": "US",
"country": "United States",
"contained_within": [
],
"bounding_box": {
"type": "Polygon",
"coordinates": [
[
[
-122.7900653,
45.421863
],
[
-122.471751,
45.421863
],
[
-122.471751,
45.6509405
],
[
-122.7900653,
45.6509405
]
]
]
},
"attributes": {
}
},
"contributors": null,
"is_quote_status": false,
"retweet_count": 0,
"favorite_count": 0,
"favorited": false,
"retweeted": false,
"lang": "en"
}

+ 0
- 393
tests/data/api.twitter.com/820039442773798912.json View File

@ -1,393 +0,0 @@
{
"created_at": "Fri Jan 13 22:46:53 +0000 2017",
"id": 820039442773798912,
"id_str": "820039442773798912",
"full_text": "RT @phlaimeaux: this headline is such a rollercoaster https://t.co/YX4liS3uK8",
"truncated": false,
"display_text_range": [
0,
77
],
"entities": {
"hashtags": [
],
"symbols": [
],
"user_mentions": [
{
"screen_name": "phlaimeaux",
"name": "David O'Doherty",
"id": 22560570,
"id_str": "22560570",
"indices": [
3,
14
]
}
],
"urls": [
],
"media": [
{
"id": 819943761371418624,
"id_str": "819943761371418624",
"indices": [
54,
77
],
"media_url": "http://pbs.twimg.com/media/C2EGgbhXUAAC54v.jpg",
"media_url_https": "https://pbs.twimg.com/media/C2EGgbhXUAAC54v.jpg",
"url": "https://t.co/YX4liS3uK8",
"display_url": "pic.twitter.com/YX4liS3uK8",
"expanded_url": "https://twitter.com/phlaimeaux/status/819943954724556800/photo/1",
"type": "photo",
"sizes": {
"large": {
"w": 622,
"h": 158,
"resize": "fit"
},
"thumb": {
"w": 150,
"h": 150,
"resize": "crop"
},
"small": {
"w": 622,
"h": 158,
"resize": "fit"
},
"medium": {
"w": 622,
"h": 158,
"resize": "fit"
}
},
"source_status_id": 819943954724556800,
"source_status_id_str": "819943954724556800",
"source_user_id": 22560570,
"source_user_id_str": "22560570"
}
]
},
"extended_entities": {
"media": [
{
"id": 819943761371418624,
"id_str": "819943761371418624",
"indices": [
54,
77
],
"media_url": "http://pbs.twimg.com/media/C2EGgbhXUAAC54v.jpg",
"media_url_https": "https://pbs.twimg.com/media/C2EGgbhXUAAC54v.jpg",
"url": "https://t.co/YX4liS3uK8",
"display_url": "pic.twitter.com/YX4liS3uK8",
"expanded_url": "https://twitter.com/phlaimeaux/status/819943954724556800/photo/1",
"type": "photo",
"sizes": {
"large": {
"w": 622,
"h": 158,
"resize": "fit"
},
"thumb": {
"w": 150,
"h": 150,
"resize": "crop"
},
"small": {
"w": 622,
"h": 158,
"resize": "fit"
},
"medium": {
"w": 622,
"h": 158,
"resize": "fit"
}
},
"source_status_id": 819943954724556800,
"source_status_id_str": "819943954724556800",
"source_user_id": 22560570,
"source_user_id_str": "22560570"
}
]
},
"source": "<a href=\"http://twitter.com\" rel=\"nofollow\">Twitter Web Client</a>",
"in_reply_to_status_id": null,
"in_reply_to_status_id_str": null,
"in_reply_to_user_id": null,
"in_reply_to_user_id_str": null,
"in_reply_to_screen_name": null,
"user": {
"id": 208111887,
"id_str": "208111887",
"name": "Auke Hulst",
"screen_name": "aukehulst",
"location": "Amsterdam",
"description": "Schrijver van het Ruige Land | Muzikant bij o.a. @de_meisjes | Wijsneus @nrc | En ik herinner me Titus Broederland (**** VK / NRC / De Standaard / DvhN / AD).",
"url": "http://t.co/51ffnkz9u9",
"entities": {
"url": {
"urls": [
{
"url": "http://t.co/51ffnkz9u9",
"expanded_url": "http://www.aukehulst.nl",
"display_url": "aukehulst.nl",
"indices": [
0,
22
]
}
]
},
"description": {
"urls": [
]
}
},
"protected": false,
"followers_count": 2243,
"friends_count": 457,
"listed_count": 48,
"created_at": "Tue Oct 26 17:12:32 +0000 2010",
"favourites_count": 782,
"utc_offset": null,
"time_zone": null,
"geo_enabled": false,
"verified": false,
"statuses_count": 17419,
"lang": "en",
"contributors_enabled": false,
"is_translator": false,
"is_translation_enabled": false,
"profile_background_color": "FFF04D",
"profile_background_image_url": "http://pbs.twimg.com/profile_background_images/513237743950786560/aZFYSiNy.jpeg",
"profile_background_image_url_https": "https://pbs.twimg.com/profile_background_images/513237743950786560/aZFYSiNy.jpeg",
"profile_background_tile": true,
"profile_image_url": "http://pbs.twimg.com/profile_images/771698996658180096/a_RhSq5T_normal.jpg",
"profile_image_url_https": "https://pbs.twimg.com/profile_images/771698996658180096/a_RhSq5T_normal.jpg",
"profile_banner_url": "https://pbs.twimg.com/profile_banners/208111887/1440355860",
"profile_link_color": "0099CC",
"profile_sidebar_border_color": "FFFFFF",
"profile_sidebar_fill_color": "F6FFD1",
"profile_text_color": "333333",
"profile_use_background_image": true,
"has_extended_profile": false,
"default_profile": false,
"default_profile_image": false,
"following": false,
"follow_request_sent": false,
"notifications": false,
"translator_type": "none"
},
"geo": null,
"coordinates": null,
"place": null,
"contributors": null,
"retweeted_status": {
"created_at": "Fri Jan 13 16:27:27 +0000 2017",
"id": 819943954724556800,
"id_str": "819943954724556800",
"full_text": "this headline is such a rollercoaster https://t.co/YX4liS3uK8",
"truncated": false,
"display_text_range": [
0,
37
],
"entities": {
"hashtags": [
],
"symbols": [
],
"user_mentions": [
],
"urls": [
],
"media": [
{
"id": 819943761371418624,
"id_str": "819943761371418624",
"indices": [
38,
61
],
"media_url": "http://pbs.twimg.com/media/C2EGgbhXUAAC54v.jpg",
"media_url_https": "https://pbs.twimg.com/media/C2EGgbhXUAAC54v.jpg",
"url": "https://t.co/YX4liS3uK8",
"display_url": "pic.twitter.com/YX4liS3uK8",
"expanded_url": "https://twitter.com/phlaimeaux/status/819943954724556800/photo/1",
"type": "photo",
"sizes": {
"large": {
"w": 622,
"h": 158,
"resize": "fit"
},
"thumb": {
"w": 150,
"h": 150,
"resize": "crop"
},
"small": {
"w": 622,
"h": 158,
"resize": "fit"
},
"medium": {
"w": 622,
"h": 158,
"resize": "fit"
}
}
}
]
},
"extended_entities": {
"media": [
{
"id": 819943761371418624,
"id_str": "819943761371418624",
"indices": [
38,
61
],
"media_url": "http://pbs.twimg.com/media/C2EGgbhXUAAC54v.jpg",
"media_url_https": "https://pbs.twimg.com/media/C2EGgbhXUAAC54v.jpg",
"url": "https://t.co/YX4liS3uK8",
"display_url": "pic.twitter.com/YX4liS3uK8",
"expanded_url": "https://twitter.com/phlaimeaux/status/819943954724556800/photo/1",
"type": "photo",
"sizes": {
"large": {
"w": 622,
"h": 158,
"resize": "fit"
},
"thumb": {
"w": 150,
"h": 150,
"resize": "crop"
},
"small": {
"w": 622,
"h": 158,
"resize": "fit"
},
"medium": {
"w": 622,
"h": 158,
"resize": "fit"
}
}
}
]
},
"source": "<a href=\"http://twitter.com\" rel=\"nofollow\">Twitter Web Client</a>",
"in_reply_to_status_id": null,
"in_reply_to_status_id_str": null,
"in_reply_to_user_id": null,
"in_reply_to_user_id_str": null,
"in_reply_to_screen_name": null,
"user": {
"id": 22560570,
"id_str": "22560570",
"name": "David O'Doherty",
"screen_name": "phlaimeaux",
"location": "",
"description": "my recorded comedy works are available at https://t.co/sBJTcq49up",
"url": "http://t.co/uYxxjGy2Qc",
"entities": {
"url": {
"urls": [
{
"url": "http://t.co/uYxxjGy2Qc",
"expanded_url": "http://www.davidodoherty.com",
"display_url": "davidodoherty.com",
"indices": [
0,
22
]
}
]
},
"description": {
"urls": [
{
"url": "https://t.co/sBJTcq49up",
"expanded_url": "http://davidodoherty.bandcamp.com",
"display_url": "davidodoherty.bandcamp.com",
"indices": [
42,
65
]
}
]
}
},
"protected": false,
"followers_count": 142131,
"friends_count": 666,
"listed_count": 991,
"created_at": "Tue Mar 03 00:43:57 +0000 2009",
"favourites_count": 3091,
"utc_offset": 0,
"time_zone": "Dublin",
"geo_enabled": false,
"verified": true,
"statuses_count": 20323,
"lang": "en",
"contributors_enabled": false,
"is_translator": false,
"is_translation_enabled": false,
"profile_background_color": "C0DEED",
"profile_background_image_url": "http://abs.twimg.com/images/themes/theme1/bg.png",
"profile_background_image_url_https": "https://abs.twimg.com/images/themes/theme1/bg.png",
"profile_background_tile": false,
"profile_image_url": "http://pbs.twimg.com/profile_images/378800000664498083/f698d88b299fb50e3a97aabcd962c217_normal.jpeg",
"profile_image_url_https": "https://pbs.twimg.com/profile_images/378800000664498083/f698d88b299fb50e3a97aabcd962c217_normal.jpeg",
"profile_banner_url": "https://pbs.twimg.com/profile_banners/22560570/1469218172",
"profile_link_color": "1DA1F2",
"profile_sidebar_border_color": "C0DEED",
"profile_sidebar_fill_color": "DDEEF6",
"profile_text_color": "333333",
"profile_use_background_image": true,
"has_extended_profile": true,
"default_profile": true,
"default_profile_image": false,
"following": false,
"follow_request_sent": false,
"notifications": false,
"translator_type": "none"
},
"geo": null,
"coordinates": null,
"place": null,
"contributors": null,
"is_quote_status": false,
"retweet_count": 232,
"favorite_count": 518,
"favorited": false,
"retweeted": false,
"possibly_sensitive": false,
"possibly_sensitive_appealable": false,
"lang": "en"
},
"is_quote_status": false,
"retweet_count": 232,
"favorite_count": 0,
"favorited": false,
"retweeted": false,
"possibly_sensitive": false,
"possibly_sensitive_appealable": false,
"lang": "en"
}

+ 0
- 120
tests/data/api.twitter.com/967046438822674432.json View File

@ -1,120 +0,0 @@
{
"created_at": "Fri Feb 23 14:40:12 +0000 2018",
"id": 967046438822674432,
"id_str": "967046438822674432",
"full_text": "@anomalily @i_stan4u @borrowtheair It’d be SO BORING if they just skated until they did big jumps and there was no artistry.",
"truncated": false,
"display_text_range": [
35,
124
],
"entities": {
"hashtags": [
],
"symbols": [
],
"user_mentions": [
{
"screen_name": "anomalily",
"name": "Lillian Karabaic (book out 4/17!)",
"id": 46416755,
"id_str": "46416755",
"indices": [
0,
10
]
},
{
"screen_name": "i_stan4u",
"name": "iStan",
"id": 947754749964591104,
"id_str": "947754749964591104",
"indices": [
11,
20
]
},
{
"screen_name": "borrowtheair",
"name": "to be honest",
"id": 932418774384254977,
"id_str": "932418774384254977",
"indices": [
21,
34
]
}
],
"urls": [
]
},
"source": "<a href=\"http://twitter.com/download/iphone\" rel=\"nofollow\">Twitter for iPhone</a>",
"in_reply_to_status_id": 967024586423386112,
"in_reply_to_status_id_str": "967024586423386112",
"in_reply_to_user_id": 46416755,
"in_reply_to_user_id_str": "46416755",
"in_reply_to_screen_name": "anomalily",
"user": {
"id": 349298514,
"id_str": "349298514",
"name": "Maggie Williams",
"screen_name": "pdxmaggie",
"location": "Portland, OR",
"description": "Prodigal daughter returns to Portland to find she's now constantly overdressed for her hometown.",
"url": null,
"entities": {
"description": {
"urls": [
]
}
},
"protected": false,
"followers_count": 441,
"friends_count": 309,
"listed_count": 18,
"created_at": "Fri Aug 05 21:54:05 +0000 2011",
"favourites_count": 2761,
"utc_offset": -18000,
"time_zone": "Eastern Time (US & Canada)",
"geo_enabled": true,
"verified": false,
"statuses_count": 7256,
"lang": "en",
"contributors_enabled": false,
"is_translator": false,
"is_translation_enabled": false,
"profile_background_color": "C0DEED",
"profile_background_image_url": "http://abs.twimg.com/images/themes/theme1/bg.png",
"profile_background_image_url_https": "https://abs.twimg.com/images/themes/theme1/bg.png",
"profile_background_tile": false,
"profile_image_url": "http://pbs.twimg.com/profile_images/875413860257103872/mz3WUmK3_normal.jpg",
"profile_image_url_https": "https://pbs.twimg.com/profile_images/875413860257103872/mz3WUmK3_normal.jpg",
"profile_banner_url": "https://pbs.twimg.com/profile_banners/349298514/1449637782",
"profile_link_color": "1DA1F2",
"profile_sidebar_border_color": "C0DEED",
"profile_sidebar_fill_color": "DDEEF6",
"profile_text_color": "333333",
"profile_use_background_image": true,
"has_extended_profile": true,
"default_profile": true,
"default_profile_image": false,
"following": false,
"follow_request_sent": false,
"notifications": false,
"translator_type": "none"
},
"geo": null,
"coordinates": null,
"place": null,
"contributors": null,
"is_quote_status": false,
"retweet_count": 0,
"favorite_count": 1,
"favorited": false,
"retweeted": false,
"lang": "en"
}

+ 0
- 110
tests/data/api.twitter.com/streaming-tweet-reply.json View File

@ -1,110 +0,0 @@
{
"created_at": "Fri Feb 23 14:40:12 +0000 2018",
"id": 967046438822674432,
"id_str": "967046438822674432",
"text": "@anomalily @i_stan4u @borrowtheair It\u2019d be SO BORING if they just skated until they did big jumps and there was no artistry.",
"display_text_range": [
35,
124
],
"source": "<a href=\"http://twitter.com/download/iphone\" rel=\"nofollow\">Twitter for iPhone</a>",
"truncated": false,
"in_reply_to_status_id": 967024586423386112,
"in_reply_to_status_id_str": "967024586423386112",
"in_reply_to_user_id": 46416755,
"in_reply_to_user_id_str": "46416755",
"in_reply_to_screen_name": "anomalily",
"user": {
"id": 349298514,
"id_str": "349298514",
"name": "Maggie Williams",
"screen_name": "pdxmaggie",
"location": "Portland, OR",
"url": null,
"description": "Prodigal daughter returns to Portland to find she's now constantly overdressed for her hometown.",
"translator_type": "none",
"protected": false,
"verified": false,
"followers_count": 441,
"friends_count": 309,
"listed_count": 18,
"favourites_count": 2758,
"statuses_count": 7249,
"created_at": "Fri Aug 05 21:54:05 +0000 2011",
"utc_offset": -18000,
"time_zone": "Eastern Time (US & Canada)",
"geo_enabled": true,
"lang": "en",
"contributors_enabled": false,
"is_translator": false,
"profile_background_color": "C0DEED",
"profile_background_image_url": "http://abs.twimg.com/images/themes/theme1/bg.png",
"profile_background_image_url_https": "https://abs.twimg.com/images/themes/theme1/bg.png",
"profile_background_tile": false,
"profile_link_color": "1DA1F2",
"profile_sidebar_border_color": "C0DEED",
"profile_sidebar_fill_color": "DDEEF6",
"profile_text_color": "333333",
"profile_use_background_image": true,
"profile_image_url": "http://pbs.twimg.com/profile_images/875413860257103872/mz3WUmK3_normal.jpg",
"profile_image_url_https": "https://pbs.twimg.com/profile_images/875413860257103872/mz3WUmK3_normal.jpg",
"profile_banner_url": "https://pbs.twimg.com/profile_banners/349298514/1449637782",
"default_profile": true,
"default_profile_image": false,
"following": null,
"follow_request_sent": null,
"notifications": null
},
"geo": null,
"coordinates": null,
"place": null,
"contributors": null,
"is_quote_status": false,
"quote_count": 0,
"reply_count": 0,
"retweet_count": 0,
"favorite_count": 0,
"entities": {
"hashtags": [],
"urls": [],
"user_mentions": [
{
"screen_name": "anomalily",
"name": "Lillian Karabaic (book out 4/17!)",
"id": 46416755,
"id_str": "46416755",
"indices": [
0,
10
]
},
{
"screen_name": "i_stan4u",
"name": "iStan",
"id": 947754749964591104,
"id_str": "947754749964591104",
"indices": [
11,
20
]
},
{
"screen_name": "borrowtheair",
"name": "to be honest",
"id": 932418774384254977,
"id_str": "932418774384254977",
"indices": [
21,
34
]
}
],
"symbols": []
},
"favorited": false,
"retweeted": false,
"filter_level": "low",
"lang": "en",
"timestamp_ms": "1519396812526"
}

+ 0
- 434
tests/data/api.twitter.com/streaming-tweet-truncated-with-photo.json View File

@ -1,434 +0,0 @@
{
"created_at": "Mon Feb 19 15:03:23 +0000 2018",
"id": 965602723251945473,
"id_str": "965602723251945473",
"text": "#MicrosoftFlow ninja-tip.\nI'm getting better at custom-connector and auth. Thanks @skillriver \nThis is OAuth2 with\u2026 https://t.co/pL951ynEfd",
"display_text_range": [
0,
140
],
"source": "<a href=\"http://twitter.com\" rel=\"nofollow\">Twitter Web Client</a>",
"truncated": true,
"in_reply_to_status_id": null,
"in_reply_to_status_id_str": null,
"in_reply_to_user_id": null,
"in_reply_to_user_id_str": null,
"in_reply_to_screen_name": null,
"user": {
"id": 17532000,
"id_str": "17532000",
"name": "John LIU",
"screen_name": "johnnliu",
"location": "Sydney",
"url": "http://johnliu.net",
"description": "coder \u2022 blogger \u2022 MVP Office365 & SharePoint \u2022 #MSFlow \n[work sharepointgurus..net]",
"translator_type": "none",
"protected": false,
"verified": false,
"followers_count": 1361,
"friends_count": 421,
"listed_count": 142,
"favourites_count": 8661,
"statuses_count": 13745,
"created_at": "Fri Nov 21 05:46:26 +0000 2008",
"utc_offset": 39600,
"time_zone": "Sydney",
"geo_enabled": true,
"lang": "en",
"contributors_enabled": false,
"is_translator": false,
"profile_background_color": "C0DEED",
"profile_background_image_url": "http://abs.twimg.com/images/themes/theme1/bg.png",
"profile_background_image_url_https": "https://abs.twimg.com/images/themes/theme1/bg.png",
"profile_background_tile": false,
"profile_link_color": "1DA1F2",
"profile_sidebar_border_color": "C0DEED",
"profile_sidebar_fill_color": "DDEEF6",
"profile_text_color": "333333",
"profile_use_background_image": true,
"profile_image_url": "http://pbs.twimg.com/profile_images/961904825716715520/NhPxyw2N_normal.jpg",
"profile_image_url_https": "https://pbs.twimg.com/profile_images/961904825716715520/NhPxyw2N_normal.jpg",
"profile_banner_url": "https://pbs.twimg.com/profile_banners/17532000/1432696432",
"default_profile": true,
"default_profile_image": false,
"following": null,
"follow_request_sent": null,
"notifications": null
},
"geo": null,
"coordinates": null,
"place": null,
"contributors": null,
"is_quote_status": false,
"extended_tweet": {
"full_text": "#MicrosoftFlow ninja-tip.\nI'm getting better at custom-connector and auth. Thanks @skillriver \nThis is OAuth2 with MSA/Live (not AzureAD) which I need to do MVP timesheets.\nStill dislike Swagger so I don't know why I bother with this. I'm just that lazy doing this manually https://t.co/dUDaqcQssO",
"display_text_range": [
0,
274
],
"entities": {
"hashtags": [
{
"text": "MicrosoftFlow",
"indices": [
0,
14
]
}
],
"urls": [],
"user_mentions": [
{
"screen_name": "skillriver",
"name": "Jan Vidar Elven",
"id": 550859390,
"id_str": "550859390",
"indices": [
83,
94
]
}
],
"symbols": [],
"media": [
{
"id": 965598693268193280,
"id_str": "965598693268193280",
"indices": [
275,
298
],
"media_url": "http://pbs.twimg.com/media/DWZ-5UPVAAAQOWY.jpg",
"media_url_https": "https://pbs.twimg.com/media/DWZ-5UPVAAAQOWY.jpg",
"url": "https://t.co/dUDaqcQssO",
"display_url": "pic.twitter.com/dUDaqcQssO",
"expanded_url": "https://twitter.com/johnnliu/status/965602723251945473/photo/1",
"type": "photo",
"sizes": {
"small": {
"w": 638,
"h": 680,
"resize": "fit"
},
"thumb": {
"w": 150,
"h": 150,
"resize": "crop"
},
"medium": {
"w": 754,
"h": 804,
"resize": "fit"
},
"large": {
"w": 754,
"h": 804,
"resize": "fit"
}
}
},
{
"id": 965600129775411204,
"id_str": "965600129775411204",
"indices": [
275,
298
],
"media_url": "http://pbs.twimg.com/media/DWaAM7pVoAQuGhL.jpg",
"media_url_https": "https://pbs.twimg.com/media/DWaAM7pVoAQuGhL.jpg",
"url": "https://t.co/dUDaqcQssO",
"display_url": "pic.twitter.com/dUDaqcQssO",
"expanded_url": "https://twitter.com/johnnliu/status/965602723251945473/photo/1",
"type": "photo",
"sizes": {
"thumb": {
"w": 150,
"h": 150,
"resize": "crop"
},
"medium": {
"w": 562,
"h": 904,
"resize": "fit"
},
"large": {
"w": 562,
"h": 904,
"resize": "fit"
},
"small": {
"w": 423,
"h": 680,
"resize": "fit"
}
}
},
{
"id": 965600383589523456,
"id_str": "965600383589523456",
"indices": [
275,
298
],
"media_url": "http://pbs.twimg.com/media/DWaAbtLVoAA2O68.jpg",
"media_url_https": "https://pbs.twimg.com/media/DWaAbtLVoAA2O68.jpg",
"url": "https://t.co/dUDaqcQssO",
"display_url": "pic.twitter.com/dUDaqcQssO",
"expanded_url": "https://twitter.com/johnnliu/status/965602723251945473/photo/1",
"type": "photo",
"sizes": {
"large": {
"w": 908,
"h": 1017,
"resize": "fit"
},
"thumb": {
"w": 150,
"h": 150,
"resize": "crop"
},
"medium": {
"w": 908,
"h": 1017,
"resize": "fit"
},
"small": {
"w": 607,
"h": 680,
"resize": "fit"
}
}
},
{
"id": 965600481480294400,
"id_str": "965600481480294400",
"indices": [
275,
298
],
"media_url": "http://pbs.twimg.com/media/DWaAhZ2UQAAIEoS.jpg",
"media_url_https": "https://pbs.twimg.com/media/DWaAhZ2UQAAIEoS.jpg",
"url": "https://t.co/dUDaqcQssO",
"display_url": "pic.twitter.com/dUDaqcQssO",
"expanded_url": "https://twitter.com/johnnliu/status/965602723251945473/photo/1",
"type": "photo",
"sizes": {
"large": {
"w": 813,
"h": 1031,
"resize": "fit"
},
"thumb": {
"w": 150,
"h": 150,
"resize": "crop"
},
"small": {
"w": 536,
"h": 680,
"resize": "fit"
},
"medium": {
"w": 813,
"h": 1031,
"resize": "fit"
}
}
}
]
},
"extended_entities": {
"media": [
{
"id": 965598693268193280,
"id_str": "965598693268193280",
"indices": [
275,
298
],
"media_url": "http://pbs.twimg.com/media/DWZ-5UPVAAAQOWY.jpg",
"media_url_https": "https://pbs.twimg.com/media/DWZ-5UPVAAAQOWY.jpg",
"url": "https://t.co/dUDaqcQssO",
"display_url": "pic.twitter.com/dUDaqcQssO",
"expanded_url": "https://twitter.com/johnnliu/status/965602723251945473/photo/1",
"type": "photo",
"sizes": {
"small": {
"w": 638,
"h": 680,
"resize": "fit"
},
"thumb": {
"w": 150,
"h": 150,
"resize": "crop"
},
"medium": {
"w": 754,
"h": 804,
"resize": "fit"
},
"large": {
"w": 754,
"h": 804,
"resize": "fit"
}
}
},
{
"id": 965600129775411204,
"id_str": "965600129775411204",
"indices": [
275,
298
],
"media_url": "http://pbs.twimg.com/media/DWaAM7pVoAQuGhL.jpg",
"media_url_https": "https://pbs.twimg.com/media/DWaAM7pVoAQuGhL.jpg",
"url": "https://t.co/dUDaqcQssO",
"display_url": "pic.twitter.com/dUDaqcQssO",
"expanded_url": "https://twitter.com/johnnliu/status/965602723251945473/photo/1",
"type": "photo",
"sizes": {
"thumb": {
"w": 150,
"h": 150,
"resize": "crop"
},
"medium": {
"w": 562,
"h": 904,
"resize": "fit"
},
"large": {
"w": 562,
"h": 904,
"resize": "fit"
},
"small": {
"w": 423,
"h": 680,
"resize": "fit"
}
}
},
{
"id": 965600383589523456,
"id_str": "965600383589523456",
"indices": [
275,
298
],
"media_url": "http://pbs.twimg.com/media/DWaAbtLVoAA2O68.jpg",
"media_url_https": "https://pbs.twimg.com/media/DWaAbtLVoAA2O68.jpg",
"url": "https://t.co/dUDaqcQssO",
"display_url": "pic.twitter.com/dUDaqcQssO",
"expanded_url": "https://twitter.com/johnnliu/status/965602723251945473/photo/1",
"type": "photo",
"sizes": {
"large": {
"w": 908,
"h": 1017,
"resize": "fit"
},
"thumb": {
"w": 150,
"h": 150,
"resize": "crop"
},
"medium": {
"w": 908,
"h": 1017,
"resize": "fit"
},
"small": {
"w": 607,
"h": 680,
"resize": "fit"
}
}
},
{
"id": 965600481480294400,
"id_str": "965600481480294400",
"indices": [
275,
298
],
"media_url": "http://pbs.twimg.com/media/DWaAhZ2UQAAIEoS.jpg",
"media_url_https": "https://pbs.twimg.com/media/DWaAhZ2UQAAIEoS.jpg",
"url": "https://t.co/dUDaqcQssO",
"display_url": "pic.twitter.com/dUDaqcQssO",
"expanded_url": "https://twitter.com/johnnliu/status/965602723251945473/photo/1",
"type": "photo",
"sizes": {
"large": {
"w": 813,
"h": 1031,
"resize": "fit"
},
"thumb": {
"w": 150,
"h": 150,
"resize": "crop"
},
"small": {
"w": 536,
"h": 680,
"resize": "fit"
},
"medium": {
"w": 813,
"h": 1031,
"resize": "fit"
}
}
}
]
}
},
"quote_count": 0,
"reply_count": 0,
"retweet_count": 0,
"favorite_count": 0,
"entities": {
"hashtags": [
{
"text": "MicrosoftFlow",
"indices": [
0,
14
]
}
],
"urls": [
{
"url": "https://t.co/pL951ynEfd",
"expanded_url": "https://twitter.com/i/web/status/965602723251945473",
"display_url": "twitter.com/i/web/status/9\u2026",
"indices": [
117,
140
]
}
],
"user_mentions": [
{
"screen_name": "skillriver",
"name": "Jan Vidar Elven",
"id": 550859390,
"id_str": "550859390",
"indices": [
83,
94
]
}
],
"symbols": []
},
"favorited": false,
"retweeted": false,
"possibly_sensitive": false,
"filter_level": "low",
"lang": "en",
"timestamp_ms": "1519052603911"
}

+ 0
- 290
tests/data/api.twitter.com/streaming-tweet-truncated-with-video.json View File

@ -1,290 +0,0 @@
{
"created_at": "Mon Feb 19 15:25:48 +0000 2018",
"id": 965608361797419010,
"id_str": "965608361797419010",
"text": "hi @aaronpk Ends was a great job I was just talking to her about the house I think she is just talking to you about\u2026 https://t.co/ggjjk7ZZZY",
"display_text_range": [
0,
140
],
"source": "<a href=\"http://twitter.com/download/iphone\" rel=\"nofollow\">Twitter for iPhone</a>",
"truncated": true,
"in_reply_to_status_id": null,
"in_reply_to_status_id_str": null,
"in_reply_to_user_id": null,
"in_reply_to_user_id_str": null,
"in_reply_to_screen_name": null,
"user": {
"id": 143883456,
"id_str": "143883456",
"name": "aaronpk dev",
"screen_name": "pkdev",
"location": "Portland, OR",
"url": "http://aaronpk.micro.blog/",
"description": "Dev account for testing Twitter things. Follow me here: https://twitter.com/aaronpk",
"translator_type": "none",
"protected": false,
"verified": false,
"followers_count": 1,
"friends_count": 1,
"listed_count": 0,
"favourites_count": 2,
"statuses_count": 58,
"created_at": "Fri May 14 17:47:15 +0000 2010",
"utc_offset": -28800,
"time_zone": "Pacific Time (US & Canada)",
"geo_enabled": true,
"lang": "en",
"contributors_enabled": false,
"is_translator": false,
"profile_background_color": "C0DEED",
"profile_background_image_url": "http://abs.twimg.com/images/themes/theme1/bg.png",
"profile_background_image_url_https": "https://abs.twimg.com/images/themes/theme1/bg.png",
"profile_background_tile": false,
"profile_link_color": "1DA1F2",
"profile_sidebar_border_color": "C0DEED",
"profile_sidebar_fill_color": "DDEEF6",
"profile_text_color": "333333",
"profile_use_background_image": true,
"profile_image_url": "http://pbs.twimg.com/profile_images/638125135904436224/qd_d94Qn_normal.jpg",
"profile_image_url_https": "https://pbs.twimg.com/profile_images/638125135904436224/qd_d94Qn_normal.jpg",
"default_profile": true,
"default_profile_image": false,
"following": null,
"follow_request_sent": null,
"notifications": null
},
"geo": null,
"coordinates": null,
"place": {
"id": "ac88a4f17a51c7fc",
"url": "https://api.twitter.com/1.1/geo/id/ac88a4f17a51c7fc.json",
"place_type": "city",
"name": "Portland",
"full_name": "Portland, OR",
"country_code": "US",
"country": "United States",
"bounding_box": {
"type": "Polygon",
"coordinates": [
[
[
-122.790065,
45.421863
],
[
-122.790065,
45.650941
],
[
-122.471751,
45.650941
],
[
-122.471751,
45.421863
]
]
]
},
"attributes": {}
},
"contributors": null,
"is_quote_status": false,
"extended_tweet": {
"full_text": "hi @aaronpk Ends was a great job I was just talking to her about the house I think she is just talking to you about that stuff like that you don't have any idea of how to make to your job so you don't want me going back on your own to make it happen https://t.co/9ko0nnAG7K",
"display_text_range": [
0,
249
],
"entities": {
"hashtags": [],
"urls": [],
"user_mentions": [
{
"screen_name": "aaronpk",
"name": "Aaron Parecki",
"id": 14447132,
"id_str": "14447132",
"indices": [
3,
11
]
}
],
"symbols": [],
"media": [
{
"id": 965608338917548032,
"id_str": "965608338917548032",
"indices": [
250,
273
],
"media_url": "http://pbs.twimg.com/ext_tw_video_thumb/965608338917548032/pu/img/TXwZ-AA8tSYTaZYS.jpg",
"media_url_https": "https://pbs.twimg.com/ext_tw_video_thumb/965608338917548032/pu/img/TXwZ-AA8tSYTaZYS.jpg",
"url": "https://t.co/9ko0nnAG7K",
"display_url": "pic.twitter.com/9ko0nnAG7K",
"expanded_url": "https://twitter.com/pkdev/status/965608361797419010/video/1",
"type": "video",
"sizes": {
"thumb": {
"w": 150,
"h": 150,
"resize": "crop"
},
"small": {
"w": 680,
"h": 680,
"resize": "fit"
},
"medium": {
"w": 720,
"h": 720,
"resize": "fit"
},
"large": {
"w": 720,
"h": 720,
"resize": "fit"
}
},
"video_info": {
"aspect_ratio": [
1,
1
],
"duration_millis": 3995,
"variants": [
{
"content_type": "application/x-mpegURL",
"url": "https://video.twimg.com/ext_tw_video/965608338917548032/pu/pl/KAdZKmD5lymHTt7A.m3u8"
},
{
"bitrate": 1280000,
"content_type": "video/mp4",
"url": "https://video.twimg.com/ext_tw_video/965608338917548032/pu/vid/720x720/kreAfCMf-B1dLqBH.mp4"
},
{
"bitrate": 256000,
"content_type": "video/mp4",
"url": "https://video.twimg.com/ext_tw_video/965608338917548032/pu/vid/240x240/5ZfV0xsJ4NmRKkcM.mp4"
},
{
"bitrate": 832000,
"content_type": "video/mp4",
"url": "https://video.twimg.com/ext_tw_video/965608338917548032/pu/vid/480x480/EYfnabEG0Uno0Azc.mp4"
}
]
}
}
]
},
"extended_entities": {
"media": [
{
"id": 965608338917548032,
"id_str": "965608338917548032",
"indices": [
250,
273
],
"media_url": "http://pbs.twimg.com/ext_tw_video_thumb/965608338917548032/pu/img/TXwZ-AA8tSYTaZYS.jpg",
"media_url_https": "https://pbs.twimg.com/ext_tw_video_thumb/965608338917548032/pu/img/TXwZ-AA8tSYTaZYS.jpg",
"url": "https://t.co/9ko0nnAG7K",
"display_url": "pic.twitter.com/9ko0nnAG7K",
"expanded_url": "https://twitter.com/pkdev/status/965608361797419010/video/1",
"type": "video",
"sizes": {
"thumb": {
"w": 150,
"h": 150,
"resize": "crop"
},
"small": {
"w": 680,
"h": 680,
"resize": "fit"
},
"medium": {
"w": 720,
"h": 720,
"resize": "fit"
},
"large": {
"w": 720,
"h": 720,
"resize": "fit"
}
},
"video_info": {
"aspect_ratio": [
1,
1
],
"duration_millis": 3995,
"variants": [
{
"content_type": "application/x-mpegURL",
"url": "https://video.twimg.com/ext_tw_video/965608338917548032/pu/pl/KAdZKmD5lymHTt7A.m3u8"
},
{
"bitrate": 1280000,
"content_type": "video/mp4",
"url": "https://video.twimg.com/ext_tw_video/965608338917548032/pu/vid/720x720/kreAfCMf-B1dLqBH.mp4"
},
{
"bitrate": 256000,
"content_type": "video/mp4",
"url": "https://video.twimg.com/ext_tw_video/965608338917548032/pu/vid/240x240/5ZfV0xsJ4NmRKkcM.mp4"
},
{
"bitrate": 832000,
"content_type": "video/mp4",
"url": "https://video.twimg.com/ext_tw_video/965608338917548032/pu/vid/480x480/EYfnabEG0Uno0Azc.mp4"
}
]
}
}
]
}
},
"quote_count": 0,
"reply_count": 0,
"retweet_count": 0,
"favorite_count": 0,
"entities": {
"hashtags": [],
"urls": [
{
"url": "https://t.co/ggjjk7ZZZY",
"expanded_url": "https://twitter.com/i/web/status/965608361797419010",
"display_url": "twitter.com/i/web/status/9\u2026",
"indices": [
117,
140
]
}
],
"user_mentions": [
{
"screen_name": "aaronpk",
"name": "Aaron Parecki",
"id": 14447132,
"id_str": "14447132",
"indices": [
3,
11
]
}
],
"symbols": []
},
"favorited": false,
"retweeted": false,
"possibly_sensitive": false,
"filter_level": "low",
"lang": "en",
"timestamp_ms": "1519053948245"
}

+ 0
- 113
tests/data/api.twitter.com/streaming-tweet-truncated.json View File

@ -1,113 +0,0 @@
{
"created_at": "Mon Feb 19 11:13:36 +0000 2018",
"id": 965544896588406784,
"id_str": "965544896588406784",
"text": "#indieweb community. Really would like to see a Micropub client for Gratitude logging and also a Mastodon poster si\u2026 https://t.co/ElywIO64tX",
"source": "<a href=\"http://corebird.baedert.org\" rel=\"nofollow\">Corebird</a>",
"truncated": true,
"in_reply_to_status_id": null,
"in_reply_to_status_id_str": null,
"in_reply_to_user_id": null,
"in_reply_to_user_id_str": null,
"in_reply_to_screen_name": null,
"user": {
"id": 11525,
"id_str": "11525",
"name": "Ian Forrester",
"screen_name": "cubicgarden",
"location": "Manchester, UK",
"url": "http://www.cubicgarden.com",
"description": "Senior firestarter at BBC R&D, emergent technology expert and serial social geek event organiser.",
"translator_type": "none",
"protected": false,
"verified": false,
"followers_count": 5842,
"friends_count": 216,
"listed_count": 383,
"favourites_count": 535,
"statuses_count": 71775,
"created_at": "Sun Nov 05 12:18:48 +0000 2006",
"utc_offset": 0,
"time_zone": "London",
"geo_enabled": true,
"lang": "en",
"contributors_enabled": false,
"is_translator": false,
"profile_background_color": "000000",
"profile_background_image_url": "http://pbs.twimg.com/profile_background_images/824523637/0aa843688f47b92a6d887901b962e10d.jpeg",
"profile_background_image_url_https": "https://pbs.twimg.com/profile_background_images/824523637/0aa843688f47b92a6d887901b962e10d.jpeg",
"profile_background_tile": false,
"profile_link_color": "009999",
"profile_sidebar_border_color": "000000",
"profile_sidebar_fill_color": "006767",
"profile_text_color": "000000",
"profile_use_background_image": true,
"profile_image_url": "http://pbs.twimg.com/profile_images/766757305413148672/f1-y-0Ng_normal.jpg",
"profile_image_url_https": "https://pbs.twimg.com/profile_images/766757305413148672/f1-y-0Ng_normal.jpg",
"profile_banner_url": "https://pbs.twimg.com/profile_banners/11525/1471649200",
"default_profile": false,
"default_profile_image": false,
"following": null,
"follow_request_sent": null,
"notifications": null
},
"geo": null,
"coordinates": null,
"place": null,
"contributors": null,
"is_quote_status": false,
"extended_tweet": {
"full_text": "#indieweb community. Really would like to see a Micropub client for Gratitude logging and also a Mastodon poster similar to the twitter one.\nFeel like I could (maybe) rewrite previous open code to do some of this :)",
"display_text_range": [
0,
215
],
"entities": {
"hashtags": [
{
"text": "indieweb",
"indices": [
0,
9
]
}
],
"urls": [],
"user_mentions": [],
"symbols": []
}
},
"quote_count": 0,
"reply_count": 0,
"retweet_count": 0,
"favorite_count": 0,
"entities": {
"hashtags": [
{
"text": "indieweb",
"indices": [
0,
9
]
}
],
"urls": [
{
"url": "https://t.co/ElywIO64tX",
"expanded_url": "https://twitter.com/i/web/status/965544896588406784",
"display_url": "twitter.com/i/web/status/9\u2026",
"indices": [
117,
140
]
}
],
"user_mentions": [],
"symbols": []
},
"favorited": false,
"retweeted": false,
"filter_level": "low",
"lang": "en",
"timestamp_ms": "1519038816960"
}

+ 0
- 85
tests/data/api.twitter.com/streaming-tweet-with-link.json View File

@ -1,85 +0,0 @@
{
"created_at": "Mon Feb 19 03:27:58 +0000 2018",
"id": 965427716135665664,
"id_str": "965427716135665664",
"text": "what happens if i include a link like https://t.co/ut9caNOtx6",
"source": "<a href=\"http://twitter.com\" rel=\"nofollow\">Twitter Web Client</a>",
"truncated": false,
"in_reply_to_status_id": null,
"in_reply_to_status_id_str": null,
"in_reply_to_user_id": null,
"in_reply_to_user_id_str": null,
"in_reply_to_screen_name": null,
"user": {
"id": 143883456,
"id_str": "143883456",
"name": "aaronpk dev",
"screen_name": "pkdev",
"location": "Portland, OR",
"url": "http://aaronpk.micro.blog/",
"description": "Dev account for testing Twitter things. Follow me here: https://twitter.com/aaronpk",
"translator_type": "none",
"protected": false,
"verified": false,
"followers_count": 1,
"friends_count": 1,
"listed_count": 0,
"favourites_count": 2,
"statuses_count": 56,
"created_at": "Fri May 14 17:47:15 +0000 2010",
"utc_offset": -28800,
"time_zone": "Pacific Time (US & Canada)",
"geo_enabled": true,
"lang": "en",
"contributors_enabled": false,
"is_translator": false,
"profile_background_color": "C0DEED",
"profile_background_image_url": "http://abs.twimg.com/images/themes/theme1/bg.png",
"profile_background_image_url_https": "https://abs.twimg.com/images/themes/theme1/bg.png",
"profile_background_tile": false,
"profile_link_color": "1DA1F2",
"profile_sidebar_border_color": "C0DEED",
"profile_sidebar_fill_color": "DDEEF6",
"profile_text_color": "333333",
"profile_use_background_image": true,
"profile_image_url": "http://pbs.twimg.com/profile_images/638125135904436224/qd_d94Qn_normal.jpg",
"profile_image_url_https": "https://pbs.twimg.com/profile_images/638125135904436224/qd_d94Qn_normal.jpg",
"default_profile": true,
"default_profile_image": false,
"following": null,
"follow_request_sent": null,
"notifications": null
},
"geo": null,
"coordinates": null,
"place": null,
"contributors": null,
"is_quote_status": false,
"quote_count": 0,
"reply_count": 0,
"retweet_count": 0,
"favorite_count": 0,
"entities": {
"hashtags": [],
"urls": [
{
"url": "https://t.co/ut9caNOtx6",
"expanded_url": "https://kmikeym.com",
"display_url": "kmikeym.com",
"indices": [
38,
61
]
}
],
"user_mentions": [],
"symbols": []
},
"favorited": false,
"retweeted": false,
"possibly_sensitive": false,
"filter_level": "low",
"lang": "en",
"timestamp_ms": "1519010878963"
}

+ 0
- 105
tests/data/api.twitter.com/streaming-tweet-with-mentions.json View File

@ -1,105 +0,0 @@
{
"created_at": "Mon Feb 19 04:35:43 +0000 2018",
"id": 965444763569635328,
"id_str": "965444763569635328",
"text": "Offer accepted! @aaronpk bought 1 shares from @coledrobison at $6.73 https://t.co/aALIOaq0Ud",
"source": "<a href=\"http://kmikeym.com\" rel=\"nofollow\">k5m</a>",
"truncated": false,
"in_reply_to_status_id": null,
"in_reply_to_status_id_str": null,
"in_reply_to_user_id": null,
"in_reply_to_user_id_str": null,
"in_reply_to_screen_name": null,
"user": {
"id": 1311430404,
"id_str": "1311430404",
"name": "KmikeyM Trades",
"screen_name": "k5mtrades",
"location": "The Internet",
"url": "http://www.kmikeym.com/trades",
"description": "Tweets about recent trades and other activity on http://www.kmikeym.com",
"translator_type": "none",
"protected": false,
"verified": false,
"followers_count": 58,
"friends_count": 1,
"listed_count": 2,
"favourites_count": 1,
"statuses_count": 6448,
"created_at": "Thu Mar 28 18:51:43 +0000 2013",
"utc_offset": -28800,
"time_zone": "Pacific Time (US & Canada)",
"geo_enabled": false,
"lang": "en",
"contributors_enabled": false,
"is_translator": false,
"profile_background_color": "C0DEED",
"profile_background_image_url": "http://abs.twimg.com/images/themes/theme1/bg.png",
"profile_background_image_url_https": "https://abs.twimg.com/images/themes/theme1/bg.png",
"profile_background_tile": false,
"profile_link_color": "1DA1F2",
"profile_sidebar_border_color": "C0DEED",
"profile_sidebar_fill_color": "DDEEF6",
"profile_text_color": "333333",
"profile_use_background_image": true,
"profile_image_url": "http://pbs.twimg.com/profile_images/3450169500/3e3afb3219d4c43187d3b8752d731170_normal.png",
"profile_image_url_https": "https://pbs.twimg.com/profile_images/3450169500/3e3afb3219d4c43187d3b8752d731170_normal.png",
"default_profile": true,
"default_profile_image": false,
"following": null,
"follow_request_sent": null,
"notifications": null
},
"geo": null,
"coordinates": null,
"place": null,
"contributors": null,
"is_quote_status": false,
"quote_count": 0,
"reply_count": 0,
"retweet_count": 0,
"favorite_count": 0,
"entities": {
"hashtags": [],
"urls": [
{
"url": "https://t.co/aALIOaq0Ud",
"expanded_url": "https://kmikeym.com/trades",
"display_url": "kmikeym.com/trades",
"indices": [
69,
92
]
}
],
"user_mentions": [
{
"screen_name": "aaronpk",
"name": "Aaron Parecki",
"id": 14447132,
"id_str": "14447132",
"indices": [
16,
24
]
},
{
"screen_name": "coledrobison",
"name": "COL\u039e Robison",
"id": 2962255453,
"id_str": "2962255453",
"indices": [
46,
59
]
}
],
"symbols": []
},
"favorited": false,
"retweeted": false,
"possibly_sensitive": false,
"filter_level": "low",
"lang": "en",
"timestamp_ms": "1519014943388"
}

+ 0
- 206
tests/data/api.twitter.com/tweet-with-gif.json View File

@ -1,206 +0,0 @@
{
"created_at": "Sat Jul 14 17:11:30 +0000 2018",
"id": 1018181204384731136,
"id_str": "1018181204384731136",
"full_text": "@SwiftOnSecurity Look! A distraction 🐁 https://t.co/MRXk3g3Gvc",
"truncated": false,
"display_text_range": [
17,
38
],
"entities": {
"hashtags": [
],
"symbols": [
],
"user_mentions": [
{
"screen_name": "SwiftOnSecurity",
"name": "SwiftOnSecurity",
"id": 2436389418,
"id_str": "2436389418",
"indices": [
0,
16
]
}
],
"urls": [
],
"media": [
{
"id": 1018181108716920832,
"id_str": "1018181108716920832",
"indices": [
39,
62
],
"media_url": "http://pbs.twimg.com/tweet_video_thumb/DiFOUuYV4AAUsgL.jpg",
"media_url_https": "https://pbs.twimg.com/tweet_video_thumb/DiFOUuYV4AAUsgL.jpg",
"url": "https://t.co/MRXk3g3Gvc",
"display_url": "pic.twitter.com/MRXk3g3Gvc",
"expanded_url": "https://twitter.com/JenMsft/status/1018181204384731136/photo/1",
"type": "photo",
"sizes": {
"small": {
"w": 500,
"h": 210,
"resize": "fit"
},
"thumb": {
"w": 150,
"h": 150,
"resize": "crop"
},
"large": {
"w": 500,
"h": 210,
"resize": "fit"
},
"medium": {
"w": 500,
"h": 210,
"resize": "fit"
}
}
}
]
},
"extended_entities": {
"media": [
{
"id": 1018181108716920832,
"id_str": "1018181108716920832",
"indices": [
39,
62
],
"media_url": "http://pbs.twimg.com/tweet_video_thumb/DiFOUuYV4AAUsgL.jpg",
"media_url_https": "https://pbs.twimg.com/tweet_video_thumb/DiFOUuYV4AAUsgL.jpg",
"url": "https://t.co/MRXk3g3Gvc",
"display_url": "pic.twitter.com/MRXk3g3Gvc",
"expanded_url": "https://twitter.com/JenMsft/status/1018181204384731136/photo/1",
"type": "animated_gif",
"sizes": {
"small": {
"w": 500,
"h": 210,
"resize": "fit"
},
"thumb": {
"w": 150,
"h": 150,
"resize": "crop"
},
"large": {
"w": 500,
"h": 210,
"resize": "fit"
},
"medium": {
"w": 500,
"h": 210,
"resize": "fit"
}
},
"video_info": {
"aspect_ratio": [
50,
21
],
"variants": [
{
"bitrate": 0,
"content_type": "video/mp4",
"url": "https://video.twimg.com/tweet_video/DiFOUuYV4AAUsgL.mp4"
}
]
}
}
]
},
"source": "<a href=\"http://twitter.com\" rel=\"nofollow\">Twitter Web Client</a>",
"in_reply_to_status_id": 1018178408398966784,
"in_reply_to_status_id_str": "1018178408398966784",
"in_reply_to_user_id": 2436389418,
"in_reply_to_user_id_str": "2436389418",
"in_reply_to_screen_name": "SwiftOnSecurity",
"user": {
"id": 3309105596,
"id_str": "3309105596",
"name": "Jen Gentleman 🌺",
"screen_name": "JenMsft",
"location": "Seattle, WA",
"description": "Software Engineer, Community Manager & #WindowsInsider on Shell team @ Microsoft. I work w/ Windows feedback 4 Start, Action center, taskbar, Windows Ink + more",
"url": "https://t.co/ACVIR7xvcT",
"entities": {
"url": {
"urls": [
{
"url": "https://t.co/ACVIR7xvcT",
"expanded_url": "https://www.instagram.com/jenmsft/",
"display_url": "instagram.com/jenmsft/",
"indices": [
0,
23
]
}
]
},
"description": {
"urls": [
]
}
},
"protected": false,
"followers_count": 18038,
"friends_count": 224,
"listed_count": 352,
"created_at": "Fri Aug 07 22:21:33 +0000 2015",
"favourites_count": 130904,
"utc_offset": null,
"time_zone": null,
"geo_enabled": false,
"verified": false,
"statuses_count": 33996,
"lang": "en",
"contributors_enabled": false,
"is_translator": false,
"is_translation_enabled": false,
"profile_background_color": "1A1B1F",
"profile_background_image_url": "http://abs.twimg.com/images/themes/theme9/bg.gif",
"profile_background_image_url_https": "https://abs.twimg.com/images/themes/theme9/bg.gif",
"profile_background_tile": false,
"profile_image_url": "http://pbs.twimg.com/profile_images/987773638614048768/_Z7nZCoF_normal.jpg",
"profile_image_url_https": "https://pbs.twimg.com/profile_images/987773638614048768/_Z7nZCoF_normal.jpg",
"profile_banner_url": "https://pbs.twimg.com/profile_banners/3309105596/1524338784",
"profile_link_color": "CB26D1",
"profile_sidebar_border_color": "000000",
"profile_sidebar_fill_color": "000000",
"profile_text_color": "000000",
"profile_use_background_image": true,
"has_extended_profile": true,
"default_profile": false,
"default_profile_image": false,
"following": false,
"follow_request_sent": false,
"notifications": false,
"translator_type": "none"
},
"geo": null,
"coordinates": null,
"place": null,
"contributors": null,
"is_quote_status": false,
"retweet_count": 25,
"favorite_count": 90,
"favorited": false,
"retweeted": false,
"possibly_sensitive": false,
"possibly_sensitive_appealable": false,
"lang": "en"
}

+ 0
- 113
tests/data/api.twitter.com/tweet-with-html.json View File

@ -1,113 +0,0 @@
{
"created_at": "Wed Feb 10 12:56:18 +0000 2021",
"id": 1359486349984714754,
"id_str": "1359486349984714754",
"full_text": "@dhh Last year I finally gave myself permission to ignore the entire modern JavaScript ecosystem and go back to writing front-end code by typing library-free JavaScript into a &lt;script&gt; block... and it works great!\n\nDon't even need jQuery any more, native JS absorbed its best features",
"truncated": false,
"display_text_range": [
5,
290
],
"entities": {
"hashtags": [
],
"symbols": [
],
"user_mentions": [
{
"screen_name": "dhh",
"name": "DHH",
"id": 14561327,
"id_str": "14561327",
"indices": [
0,
4
]
}
],
"urls": [
]
},
"source": "<a href=\"http://twitter.com/download/iphone\" rel=\"nofollow\">Twitter for iPhone</a>",
"in_reply_to_status_id": 1359426190893862912,
"in_reply_to_status_id_str": "1359426190893862912",
"in_reply_to_user_id": 14561327,
"in_reply_to_user_id_str": "14561327",
"in_reply_to_screen_name": "dhh",
"user": {
"id": 12497,
"id_str": "12497",
"name": "Simon Willison",
"screen_name": "simonw",
"location": "San Francisco, CA",
"description": "Creator of @datasetteproj, co-creator Django. @JSKstanford Fellow 2020. Collector of @nichemuseums. Usually hanging out with @natbat and @cleopaws. He/Him",
"url": "https://t.co/wyNggeHZ8W",
"entities": {
"url": {
"urls": [
{
"url": "https://t.co/wyNggeHZ8W",
"expanded_url": "https://simonwillison.net/",
"display_url": "simonwillison.net",
"indices": [
0,
23
]
}
]
},
"description": {
"urls": [
]
}
},
"protected": false,
"followers_count": 22281,
"friends_count": 4380,
"listed_count": 1310,
"created_at": "Wed Nov 15 13:18:50 +0000 2006",
"favourites_count": 34961,
"utc_offset": null,
"time_zone": null,
"geo_enabled": true,
"verified": true,
"statuses_count": 25772,
"lang": null,
"contributors_enabled": false,
"is_translator": false,
"is_translation_enabled": false,
"profile_background_color": "000000",
"profile_background_image_url": "http://abs.twimg.com/images/themes/theme1/bg.png",
"profile_background_image_url_https": "https://abs.twimg.com/images/themes/theme1/bg.png",
"profile_background_tile": false,
"profile_image_url": "http://pbs.twimg.com/profile_images/378800000261649705/be9cc55e64014e6d7663c50d7cb9fc75_normal.jpeg",
"profile_image_url_https": "https://pbs.twimg.com/profile_images/378800000261649705/be9cc55e64014e6d7663c50d7cb9fc75_normal.jpeg",
"profile_banner_url": "https://pbs.twimg.com/profile_banners/12497/1347977147",
"profile_link_color": "0000FF",
"profile_sidebar_border_color": "FFFFFF",
"profile_sidebar_fill_color": "FFFFFF",
"profile_text_color": "000000",
"profile_use_background_image": true,
"has_extended_profile": true,
"default_profile": false,
"default_profile_image": false,
"following": true,
"follow_request_sent": false,
"notifications": false,
"translator_type": "regular"
},
"geo": null,
"coordinates": null,
"place": null,
"contributors": null,
"is_quote_status": false,
"retweet_count": 2,
"favorite_count": 75,
"favorited": true,
"retweeted": false,
"lang": "en"
}

+ 0
- 318
tests/data/api.twitter.com/tweet-with-newlines.json View File

@ -1,318 +0,0 @@
{
"created_at": "Mon Feb 19 07:53:50 +0000 2018",
"id": 965494622209363968,
"id_str": "965494622209363968",
"full_text": "🌈🌈 I’ve watched the sun rise at Corona Heights countless times, but never before have I seen a #rainbow at #sunrise.\n\n#CoronaHeights #SanFrancisco #SF #wakeupthesun #fromwhereirun #nofilter\n\nWoke up this morning feeling compelled to run to Corona… https://t.co/0otP3aLZo2 https://t.co/0Q5kNFZO9D",
"truncated": false,
"display_text_range": [
0,
271
],
"entities": {
"hashtags": [
{
"text": "rainbow",
"indices": [
95,
103
]
},
{
"text": "sunrise",
"indices": [
107,
115
]
},
{
"text": "CoronaHeights",
"indices": [
118,
132
]
},
{
"text": "SanFrancisco",
"indices": [
133,
146
]
},
{
"text": "SF",
"indices": [
147,
150
]
},
{
"text": "wakeupthesun",
"indices": [
151,
164
]
},
{
"text": "fromwhereirun",
"indices": [
165,
179
]
},
{
"text": "nofilter",
"indices": [
180,
189
]
}
],
"symbols": [
],
"user_mentions": [
],
"urls": [
{
"url": "https://t.co/0otP3aLZo2",
"expanded_url": "http://tantek.com/2018/049/t3/rainbow-at-sunrise",
"display_url": "tantek.com/2018/049/t3/ra…",
"indices": [
248,
271
]
}
],
"media": [
{
"id": 965494609689288705,
"id_str": "965494609689288705",
"indices": [
272,
295
],
"media_url": "http://pbs.twimg.com/media/DWYgO2sVoAEeRK0.jpg",
"media_url_https": "https://pbs.twimg.com/media/DWYgO2sVoAEeRK0.jpg",
"url": "https://t.co/0Q5kNFZO9D",
"display_url": "pic.twitter.com/0Q5kNFZO9D",
"expanded_url": "https://twitter.com/t/status/965494622209363968/photo/1",
"type": "photo",
"sizes": {
"medium": {
"w": 1200,
"h": 667,
"resize": "fit"
},
"thumb": {
"w": 150,
"h": 150,
"resize": "crop"
},
"small": {
"w": 680,
"h": 378,
"resize": "fit"
},
"large": {
"w": 1920,
"h": 1067,
"resize": "fit"
}
}
}
]
},
"extended_entities": {
"media": [
{
"id": 965494609689288705,
"id_str": "965494609689288705",
"indices": [
272,
295
],
"media_url": "http://pbs.twimg.com/media/DWYgO2sVoAEeRK0.jpg",
"media_url_https": "https://pbs.twimg.com/media/DWYgO2sVoAEeRK0.jpg",
"url": "https://t.co/0Q5kNFZO9D",
"display_url": "pic.twitter.com/0Q5kNFZO9D",
"expanded_url": "https://twitter.com/t/status/965494622209363968/photo/1",
"type": "photo",
"sizes": {
"medium": {
"w": 1200,
"h": 667,
"resize": "fit"
},
"thumb": {
"w": 150,
"h": 150,
"resize": "crop"
},
"small": {
"w": 680,
"h": 378,
"resize": "fit"
},
"large": {
"w": 1920,
"h": 1067,
"resize": "fit"
}
}
},
{
"id": 965494615313858560,
"id_str": "965494615313858560",
"indices": [
272,
295
],
"media_url": "http://pbs.twimg.com/media/DWYgPLpVwAAjpFL.jpg",
"media_url_https": "https://pbs.twimg.com/media/DWYgPLpVwAAjpFL.jpg",
"url": "https://t.co/0Q5kNFZO9D",
"display_url": "pic.twitter.com/0Q5kNFZO9D",
"expanded_url": "https://twitter.com/t/status/965494622209363968/photo/1",
"type": "photo",
"sizes": {
"thumb": {
"w": 150,
"h": 150,
"resize": "crop"
},
"medium": {
"w": 900,
"h": 1200,
"resize": "fit"
},
"large": {
"w": 1440,
"h": 1920,
"resize": "fit"
},
"small": {
"w": 510,
"h": 680,
"resize": "fit"
}
}
},
{
"id": 965494620024053760,
"id_str": "965494620024053760",
"indices": [
272,
295
],
"media_url": "http://pbs.twimg.com/media/DWYgPdMVoAAMUbb.jpg",
"media_url_https": "https://pbs.twimg.com/media/DWYgPdMVoAAMUbb.jpg",
"url": "https://t.co/0Q5kNFZO9D",
"display_url": "pic.twitter.com/0Q5kNFZO9D",
"expanded_url": "https://twitter.com/t/status/965494622209363968/photo/1",
"type": "photo",
"sizes": {
"small": {
"w": 680,
"h": 510,
"resize": "fit"
},
"thumb": {
"w": 150,
"h": 150,
"resize": "crop"
},
"medium": {
"w": 1200,
"h": 900,
"resize": "fit"
},
"large": {
"w": 1920,
"h": 1440,
"resize": "fit"
}
}
}
]
},
"source": "<a href=\"https://brid.gy/\" rel=\"nofollow\">Bridgy</a>",
"in_reply_to_status_id": null,
"in_reply_to_status_id_str": null,
"in_reply_to_user_id": null,
"in_reply_to_user_id_str": null,
"in_reply_to_screen_name": null,
"user": {
"id": 11628,
"id_str": "11628",
"name": "🌈",
"screen_name": "t",
"location": "Pacific Time Zone",
"description": "Cofounder #indieweb #barcamp @IndieWebCamp @microformats. Working @Mozilla @w3cab @csswg @socialwebwg. Code @Falcon @cassisjs. #write #climb #run #yoga #RESIST",
"url": "https://t.co/imeZHaJsth",
"entities": {
"url": {
"urls": [
{
"url": "https://t.co/imeZHaJsth",
"expanded_url": "http://tantek.com/",
"display_url": "tantek.com",
"indices": [
0,
23
]
}
]
},
"description": {
"urls": [
]
}
},
"protected": false,
"followers_count": 73397,
"friends_count": 1614,
"listed_count": 2020,
"created_at": "Tue Nov 07 02:26:19 +0000 2006",
"favourites_count": 0,
"utc_offset": -28800,
"time_zone": "Pacific Time (US & Canada)",
"geo_enabled": true,
"verified": false,
"statuses_count": 9252,
"lang": "en",
"contributors_enabled": false,
"is_translator": false,
"is_translation_enabled": false,
"profile_background_color": "C0DEED",
"profile_background_image_url": "http://abs.twimg.com/images/themes/theme1/bg.png",
"profile_background_image_url_https": "https://abs.twimg.com/images/themes/theme1/bg.png",
"profile_background_tile": false,
"profile_image_url": "http://pbs.twimg.com/profile_images/423350922408767488/nlA_m2WH_normal.jpeg",
"profile_image_url_https": "https://pbs.twimg.com/profile_images/423350922408767488/nlA_m2WH_normal.jpeg",
"profile_link_color": "1DA1F2",
"profile_sidebar_border_color": "C0DEED",
"profile_sidebar_fill_color": "DDEEF6",
"profile_text_color": "333333",
"profile_use_background_image": true,
"has_extended_profile": false,
"default_profile": true,
"default_profile_image": false,
"following": true,
"follow_request_sent": false,
"notifications": false,
"translator_type": "regular"
},
"geo": null,
"coordinates": null,
"place": null,
"contributors": null,
"is_quote_status": false,
"retweet_count": 2,
"favorite_count": 8,
"favorited": false,
"retweeted": false,
"possibly_sensitive": false,
"possibly_sensitive_appealable": false,
"lang": "en"
}

+ 0
- 378
tests/data/api.twitter.com/tweet-with-truncated-quoted-tweet.json View File

@ -1,378 +0,0 @@
{
"created_at": "Mon Feb 19 07:25:44 +0000 2018",
"id": 965487550512054273,
"id_str": "965487550512054273",
"full_text": ".@stream_pdx is a real treasure of our city. https://t.co/twMOevR80T",
"truncated": false,
"display_text_range": [
0,
44
],
"entities": {
"hashtags": [
],
"symbols": [
],
"user_mentions": [
{
"screen_name": "stream_pdx",
"name": "Stream PDX",
"id": 770362395579396097,
"id_str": "770362395579396097",
"indices": [
1,
12
]
}
],
"urls": [
{
"url": "https://t.co/twMOevR80T",
"expanded_url": "https://twitter.com/pdxstepheng/status/964598574322339841",
"display_url": "twitter.com/pdxstepheng/st…",
"indices": [
45,
68
]
}
]
},
"source": "<a href=\"http://twitter.com/download/iphone\" rel=\"nofollow\">Twitter for iPhone</a>",
"in_reply_to_status_id": null,
"in_reply_to_status_id_str": null,
"in_reply_to_user_id": null,
"in_reply_to_user_id_str": null,
"in_reply_to_screen_name": null,
"user": {
"id": 3138466140,
"id_str": "3138466140",
"name": "Rowan Bradley",
"screen_name": "rowbradley",
"location": "Portland, Oregon",
"description": "Photography & Digital Marketing @scoutbooks",
"url": "https://t.co/eBvYQVeMHs",
"entities": {
"url": {
"urls": [
{
"url": "https://t.co/eBvYQVeMHs",
"expanded_url": "http://rowanbradley.com",
"display_url": "rowanbradley.com",
"indices": [
0,
23
]
}
]
},
"description": {
"urls": [
]
}
},
"protected": false,
"followers_count": 436,
"friends_count": 2001,
"listed_count": 33,
"created_at": "Sat Apr 04 05:47:27 +0000 2015",
"favourites_count": 27442,
"utc_offset": -28800,
"time_zone": "Pacific Time (US & Canada)",
"geo_enabled": true,
"verified": false,
"statuses_count": 4833,
"lang": "en",
"contributors_enabled": false,
"is_translator": false,
"is_translation_enabled": false,
"profile_background_color": "000000",
"profile_background_image_url": "http://abs.twimg.com/images/themes/theme1/bg.png",
"profile_background_image_url_https": "https://abs.twimg.com/images/themes/theme1/bg.png",
"profile_background_tile": false,
"profile_image_url": "http://pbs.twimg.com/profile_images/703441818038378499/3pkWJotj_normal.jpg",
"profile_image_url_https": "https://pbs.twimg.com/profile_images/703441818038378499/3pkWJotj_normal.jpg",
"profile_banner_url": "https://pbs.twimg.com/profile_banners/3138466140/1444289891",
"profile_link_color": "4A913C",
"profile_sidebar_border_color": "000000",
"profile_sidebar_fill_color": "000000",
"profile_text_color": "000000",
"profile_use_background_image": false,
"has_extended_profile": false,
"default_profile": false,
"default_profile_image": false,
"following": false,
"follow_request_sent": false,
"notifications": false,
"translator_type": "none"
},
"geo": null,
"coordinates": null,
"place": null,
"contributors": null,
"is_quote_status": true,
"quoted_status_id": 964598574322339841,
"quoted_status_id_str": "964598574322339841",
"quoted_status": {
"created_at": "Fri Feb 16 20:33:16 +0000 2018",
"id": 964598574322339841,
"id_str": "964598574322339841",
"full_text": "Hey @OregonGovBrown @tedwheeler day 16 of #BHM is for @stream_pdx. An amazing podcast trailer run by @tyeshasnow helping to democratize story telling in #PDX. Folks can get training in the production of podcasts. @siliconflorist #SupportBlackBusiness https://t.co/dvWAMrzffF",
"truncated": false,
"display_text_range": [
0,
250
],
"entities": {
"hashtags": [
{
"text": "BHM",
"indices": [
42,
46
]
},
{
"text": "PDX",
"indices": [
153,
157
]
},
{
"text": "SupportBlackBusiness",
"indices": [
229,
250
]
}
],
"symbols": [
],
"user_mentions": [
{
"screen_name": "OregonGovBrown",
"name": "Governor Kate Brown",
"id": 3023272478,
"id_str": "3023272478",
"indices": [
4,
19
]
},
{
"screen_name": "tedwheeler",
"name": "Ted Wheeler",
"id": 18708561,
"id_str": "18708561",
"indices": [
20,
31
]
},
{
"screen_name": "stream_pdx",
"name": "Stream PDX",
"id": 770362395579396097,
"id_str": "770362395579396097",
"indices": [
54,
65
]
},
{
"screen_name": "tyeshasnow",
"name": "tyesha snow",
"id": 21260096,
"id_str": "21260096",
"indices": [
101,
112
]
},
{
"screen_name": "siliconflorist",
"name": "Silicon Florist",
"id": 8072912,
"id_str": "8072912",
"indices": [
213,
228
]
}
],
"urls": [
],
"media": [
{
"id": 964598550842826752,
"id_str": "964598550842826752",
"indices": [
251,
274
],
"media_url": "http://pbs.twimg.com/media/DWLxRXXX4AAgn2K.jpg",
"media_url_https": "https://pbs.twimg.com/media/DWLxRXXX4AAgn2K.jpg",
"url": "https://t.co/dvWAMrzffF",
"display_url": "pic.twitter.com/dvWAMrzffF",
"expanded_url": "https://twitter.com/PDXStephenG/status/964598574322339841/photo/1",
"type": "photo",
"sizes": {
"large": {
"w": 1800,
"h": 530,
"resize": "fit"
},
"thumb": {
"w": 150,
"h": 150,
"resize": "crop"
},
"medium": {
"w": 1200,
"h": 353,
"resize": "fit"
},
"small": {
"w": 680,
"h": 200,
"resize": "fit"
}
}
}
]
},
"extended_entities": {
"media": [
{
"id": 964598550842826752,
"id_str": "964598550842826752",
"indices": [
251,
274
],
"media_url": "http://pbs.twimg.com/media/DWLxRXXX4AAgn2K.jpg",
"media_url_https": "https://pbs.twimg.com/media/DWLxRXXX4AAgn2K.jpg",
"url": "https://t.co/dvWAMrzffF",
"display_url": "pic.twitter.com/dvWAMrzffF",
"expanded_url": "https://twitter.com/PDXStephenG/status/964598574322339841/photo/1",
"type": "photo",
"sizes": {
"large": {
"w": 1800,
"h": 530,
"resize": "fit"
},
"thumb": {
"w": 150,
"h": 150,
"resize": "crop"
},
"medium": {
"w": 1200,
"h": 353,
"resize": "fit"
},
"small": {
"w": 680,
"h": 200,
"resize": "fit"
}
}
}
]
},
"source": "<a href=\"http://twitter.com\" rel=\"nofollow\">Twitter Web Client</a>",
"in_reply_to_status_id": null,
"in_reply_to_status_id_str": null,
"in_reply_to_user_id": null,
"in_reply_to_user_id_str": null,
"in_reply_to_screen_name": null,
"user": {
"id": 518975229,
"id_str": "518975229",
"name": "Stephen Green",
"screen_name": "PDXStephenG",
"location": "Portland, OR",
"description": "Blatino, husband, dad, entrepreneur, economist, TEDx talker & recovering banker/vc. Day job, Community Director at @WeWork. #Startup advisor @backstage_cap",
"url": "https://t.co/DNQHGaIJWP",
"entities": {
"url": {
"urls": [
{
"url": "https://t.co/DNQHGaIJWP",
"expanded_url": "http://www.pitchblackpdx.com",
"display_url": "pitchblackpdx.com",
"indices": [
0,
23
]
}
]
},
"description": {
"urls": [
]
}
},
"protected": false,
"followers_count": 8958,
"friends_count": 9790,
"listed_count": 404,
"created_at": "Thu Mar 08 23:12:01 +0000 2012",
"favourites_count": 12352,
"utc_offset": -28800,
"time_zone": "Pacific Time (US & Canada)",
"geo_enabled": true,
"verified": false,
"statuses_count": 7506,
"lang": "en",
"contributors_enabled": false,
"is_translator": false,
"is_translation_enabled": false,
"profile_background_color": "000000",
"profile_background_image_url": "http://abs.twimg.com/images/themes/theme1/bg.png",
"profile_background_image_url_https": "https://abs.twimg.com/images/themes/theme1/bg.png",
"profile_background_tile": false,
"profile_image_url": "http://pbs.twimg.com/profile_images/882333395287658497/KpZZzrI9_normal.jpg",
"profile_image_url_https": "https://pbs.twimg.com/profile_images/882333395287658497/KpZZzrI9_normal.jpg",
"profile_banner_url": "https://pbs.twimg.com/profile_banners/518975229/1511838336",
"profile_link_color": "19CF86",
"profile_sidebar_border_color": "000000",
"profile_sidebar_fill_color": "000000",
"profile_text_color": "000000",
"profile_use_background_image": false,
"has_extended_profile": false,
"default_profile": false,
"default_profile_image": false,
"following": false,
"follow_request_sent": false,
"notifications": false,
"translator_type": "none"
},
"geo": null,
"coordinates": null,
"place": null,
"contributors": null,
"is_quote_status": false,
"retweet_count": 10,
"favorite_count": 22,
"favorited": false,
"retweeted": false,
"possibly_sensitive": false,
"possibly_sensitive_appealable": false,
"lang": "en"
},
"retweet_count": 0,
"favorite_count": 1,
"favorited": false,
"retweeted": false,
"possibly_sensitive": false,
"possibly_sensitive_appealable": false,
"lang": "en"
}

Loading…
Cancel
Save