Skip to content

alexzhaohong/_boostertutor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 

Repository files navigation

_boostertutor

Current Status

Twitter

Trigger

Currently set on a schedule: cron: '*/5 * * * *'.

repository_dispatch uses the following curl to trigger:

curl --verbose -X POST -u "brokenthumbs:${GITHUB_PAT}" \
-H "Accept: application/vnd.github.everest-preview+json"  \
-H "Content-Type: application/json" \
https://api.github.com/repos/brokenthumbs/_boostertutor/dispatches \
--data '{"event_type": "_"}'

Notes

  • Using booster pack format of 10 commons, 3 uncommons, and 1 rare or mythic for all editions. Upgrade to this script could adapt returning different numbers and combinations of cards for different editions.

Links

Scrap

# https://scryfall.com/search?q=%28set%3Athb+%21%22Nylea%27s+Forerunner%22%29+or+%28set%3Athb+%21%22Bronze+Sword%22%29&as=grid&order=set
# https://scryfall.com/search?q=%28set%3Athb+%21%22Nylea%27s+Forerunner%22%29+or+%28set%3Athb+%21%22Bronze+Sword%22%29
# https://scryfall.com/search?q=edition%3Athb+rarity%3Acommon+-type%3Aland+%21%22Hyrax+Tower+Scout%22+

payload = {
  'q': [ f" \
    edition:{edition} \
    rarity:{rarity} \
    !\"Bronze Sword\" \
  "]
}

export TWITTER_ACCESS_TOKEN=
export TWITTER_ACCESS_TOKEN_SECRET=
export TWITTER_CONSUMER_KEY=
export TWITTER_CONSUMER_SECRET=

ToDo