generated from obsidianmd/obsidian-sample-plugin
-
-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* version bump so I don't forget to do it after * add updated mock tweets and clean up type errors * write tests for create filename function * make timestamp format a required parameter * update the readme with [[date]] instructions
- Loading branch information
Showing
17 changed files
with
679 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
import {Tweet} from 'src/types/tweet' | ||
|
||
export const cashtagTweet: Tweet = { | ||
data: { | ||
public_metrics: { | ||
retweet_count: 0, | ||
reply_count: 0, | ||
like_count: 1, | ||
quote_count: 0, | ||
}, | ||
created_at: '2020-09-02T16:15:47.000Z', | ||
id: '1301192107143561219', | ||
entities: { | ||
urls: [ | ||
{ | ||
start: 102, | ||
end: 125, | ||
url: 'https://t.co/qnyDphmJm2', | ||
expanded_url: | ||
'https://twitter.com/BTheriot2014/status/1301180406226513921', | ||
display_url: 'twitter.com/BTheriot2014/s…', | ||
}, | ||
], | ||
hashtags: [ | ||
{ | ||
start: 22, | ||
end: 31, | ||
tag: 'cashtags', | ||
}, | ||
{ | ||
start: 88, | ||
end: 95, | ||
tag: 'coffee', | ||
}, | ||
], | ||
cashtags: [ | ||
{ | ||
start: 52, | ||
end: 57, | ||
tag: 'SBUX', | ||
}, | ||
], | ||
}, | ||
conversation_id: '1301192107143561219', | ||
text: 'Today I learned about #cashtags - and found out my $SBUX is in current tweet! Must be #coffee time! https://t.co/qnyDphmJm2', | ||
referenced_tweets: [ | ||
{ | ||
type: 'quoted', | ||
id: '1301180406226513921', | ||
}, | ||
], | ||
author_id: '1058876047465209856', | ||
}, | ||
includes: { | ||
users: [ | ||
{ | ||
id: '1058876047465209856', | ||
username: 'Ceascape_ca', | ||
name: 'ceascape.business.solutions', | ||
profile_image_url: | ||
'https://pbs.twimg.com/profile_images/1058877044015038464/u68hN9LW_normal.jpg', | ||
}, | ||
], | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
import {Tweet} from 'src/types/tweet' | ||
|
||
export const ImageTweet: Tweet = { | ||
data: { | ||
created_at: '2020-08-10T15:30:23.000Z', | ||
conversation_id: '1292845757297557505', | ||
id: '1292845757297557505', | ||
attachments: { | ||
media_keys: ['3_1292845624120025090', '3_1292845644567269376'], | ||
}, | ||
entities: { | ||
annotations: [ | ||
{ | ||
start: 104, | ||
end: 115, | ||
probability: 0.9801, | ||
type: 'Person', | ||
normalized_text: 'Mary Douglas', | ||
}, | ||
], | ||
urls: [ | ||
{ | ||
start: 260, | ||
end: 283, | ||
url: 'https://t.co/O2P7WRO1XL', | ||
expanded_url: 'http://maggieappleton.com/dirt', | ||
display_url: 'maggieappleton.com/dirt', | ||
}, | ||
{ | ||
start: 284, | ||
end: 307, | ||
url: 'https://t.co/PSk7lHiv7z', | ||
expanded_url: | ||
'https://twitter.com/Mappletons/status/1292845757297557505/photo/1', | ||
display_url: 'pic.twitter.com/PSk7lHiv7z', | ||
media_key: '3_1292845624120025090', | ||
}, | ||
{ | ||
start: 284, | ||
end: 307, | ||
url: 'https://t.co/PSk7lHiv7z', | ||
expanded_url: | ||
'https://twitter.com/Mappletons/status/1292845757297557505/photo/1', | ||
display_url: 'pic.twitter.com/PSk7lHiv7z', | ||
media_key: '3_1292845644567269376', | ||
}, | ||
], | ||
}, | ||
author_id: '1343443016', | ||
text: '"Dirt is matter out of place" - the loveliest definition of dirt you could hope for from anthropologist Mary Douglas in her classic 1966 book Purity and Danger\n\nHair on my head? Clean. Hair on the table? Dirty!\n\nIllustrating & expanding on her main ideas: https://t.co/O2P7WRO1XL https://t.co/PSk7lHiv7z', | ||
public_metrics: { | ||
retweet_count: 29, | ||
reply_count: 11, | ||
like_count: 191, | ||
quote_count: 2, | ||
}, | ||
}, | ||
includes: { | ||
media: [ | ||
{ | ||
media_key: '3_1292845624120025090', | ||
type: 'photo', | ||
url: 'https://pbs.twimg.com/media/EfEcPs8XoAIXwvH.jpg', | ||
}, | ||
{ | ||
media_key: '3_1292845644567269376', | ||
type: 'photo', | ||
url: 'https://pbs.twimg.com/media/EfEcQ5HX0AA2EvY.jpg', | ||
}, | ||
], | ||
users: [ | ||
{ | ||
username: 'Mappletons', | ||
id: '1343443016', | ||
name: 'Maggie Appleton 🧭', | ||
profile_image_url: | ||
'https://pbs.twimg.com/profile_images/1079304561892966406/1AHsGSnz_normal.jpg', | ||
}, | ||
], | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
export * from './cashtag_tweet' | ||
export * from './image_tweet' | ||
export * from './mentions_tweet' | ||
export * from './poll_tweet' | ||
export * from './tweet_thread' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
import {Tweet} from 'src/types/tweet' | ||
|
||
export const MentionsTweet: Tweet = { | ||
data: { | ||
text: "I've just created a Node.js CLI tool to save tweets as Markdown, great for @NotionHQ, @RoamResearch, @obsdmd, and other Markdown based note-taking systems! https://t.co/9qzNhz5cmN", | ||
public_metrics: { | ||
retweet_count: 0, | ||
reply_count: 0, | ||
like_count: 0, | ||
quote_count: 0, | ||
}, | ||
created_at: '2020-09-09T17:55:42.000Z', | ||
entities: { | ||
urls: [ | ||
{ | ||
start: 156, | ||
end: 179, | ||
url: 'https://t.co/9qzNhz5cmN', | ||
expanded_url: 'https://github.com/kbravh/tweet-to-markdown', | ||
display_url: 'github.com/kbravh/tweet-t…', | ||
images: [ | ||
{ | ||
url: 'https://pbs.twimg.com/news_img/1501819606129950722/opZrrpCT?format=jpg&name=orig', | ||
width: 1280, | ||
height: 640, | ||
}, | ||
{ | ||
url: 'https://pbs.twimg.com/news_img/1501819606129950722/opZrrpCT?format=jpg&name=150x150', | ||
width: 150, | ||
height: 150, | ||
}, | ||
], | ||
status: 200, | ||
title: | ||
'GitHub - kbravh/tweet-to-markdown: A command line tool to convert Tweets to Markdown.', | ||
description: | ||
'A command line tool to convert Tweets to Markdown. - GitHub - kbravh/tweet-to-markdown: A command line tool to convert Tweets to Markdown.', | ||
unwound_url: 'https://github.com/kbravh/tweet-to-markdown', | ||
}, | ||
], | ||
mentions: [ | ||
{ | ||
start: 75, | ||
end: 84, | ||
username: 'NotionHQ', | ||
id: '708915428454576128', | ||
}, | ||
{ | ||
start: 86, | ||
end: 99, | ||
username: 'RoamResearch', | ||
id: '1190410678273626113', | ||
}, | ||
{ | ||
start: 101, | ||
end: 108, | ||
username: 'obsdmd', | ||
id: '1239876481951596545', | ||
}, | ||
], | ||
}, | ||
id: '1303753964291338240', | ||
author_id: '1143604512999034881', | ||
conversation_id: '1303753964291338240', | ||
}, | ||
includes: { | ||
users: [ | ||
{ | ||
username: 'kbravh', | ||
name: 'Karey Higuera 🦈', | ||
id: '1143604512999034881', | ||
profile_image_url: | ||
'https://pbs.twimg.com/profile_images/1163169960505610240/R8BoDqiT_normal.jpg', | ||
}, | ||
], | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
import {Tweet} from 'src/types/tweet' | ||
|
||
export const PollTweet: Tweet = { | ||
data: { | ||
conversation_id: '1029121914260860929', | ||
id: '1029121914260860929', | ||
created_at: '2018-08-13T21:45:59.000Z', | ||
text: 'Which is Better?', | ||
attachments: { | ||
poll_ids: ['1029121913858269191'], | ||
}, | ||
public_metrics: { | ||
retweet_count: 7, | ||
reply_count: 11, | ||
like_count: 47, | ||
quote_count: 2, | ||
}, | ||
author_id: '4071934995', | ||
}, | ||
includes: { | ||
polls: [ | ||
{ | ||
id: '1029121913858269191', | ||
options: [ | ||
{ | ||
position: 1, | ||
label: 'Spring', | ||
votes: 1373, | ||
}, | ||
{ | ||
position: 2, | ||
label: 'Fall', | ||
votes: 3054, | ||
}, | ||
], | ||
}, | ||
], | ||
users: [ | ||
{ | ||
id: '4071934995', | ||
name: 'polls', | ||
username: 'polls', | ||
profile_image_url: | ||
'https://pbs.twimg.com/profile_images/660160253913382913/qgvYqknJ_normal.jpg', | ||
}, | ||
], | ||
}, | ||
} |
Oops, something went wrong.