A tiny node.js Card Cast API.
const cardcast = require('cardcast');
// View metadata about a deck
cardcast('949PJ')
.info()
.then(console.log);
// View call cards of a deck
cardcast('949PJ')
.calls()
.then(console.log);
// View response cards of a deck
cardcast('949PJ')
.responses()
.then(console.log);
// View the cost of printing a deck
cardcast('949PJ')
.cost()
.then(console.log);
// Search for decks
cardcast
.search({
search: 'me too thanks',
sort: 'created_at'
})
.then(console.log);
cardcast.search
takes the following options (?
denotes optional):
?category
- Structure:
technology
(single category)technology,gaming
(multiple categories are comma-delimited)
- Categories:
books
community
gaming
movies
music
sports
technology
television
translation
other
random
- Structure:
?sort
- Rating:
rating
- Name:
name
- Time:
created_at
- Size:
card_count
- Rating:
?direction
- The direction of the
sort
parameter - Can be
asc
ordesc
- The direction of the
?limit
- Integer in the range
1
and50
(inclusive)
- Integer in the range
?offset
- The offset (pagination)
?author
- The username of the author of the deck
search
- The search query