tumblrinbrowser
Due to CORS restrictions, you're going to have a really hard time using this library in the browser. Although GET endpoints on the Tumblr API support JSONP, this library is not intended for in-browser use. Sorry!
The unofficial JavaScript client library for both Tumblr API v2 and v1 intended for use in browser. (splitted from chooslr/chooslr-api)
Installation
cdn
npm
yarn add tumblrinbrowser
v2
const tumblr = api_key proxy
new Tumblr({ api_key, proxy })
Required at least one either.
.blog(name)
result: Promise<Blog>
.posts(name[, params])
result: Promise<Post[]>
params
type
tag
id
limit
offset
reblog_info
notes_info
filter
.total(name[, params])
result: Promise<number>
params
type
tag
.post(name, id[, params])
result: Promise<Post>
params
reblog_info
notes_info
.samplingPosts(options) / .samplingTags(options)
result: Promise<Post[]>
/ Promise<Tag[]>
options
name
denom
maxLimit
params
.generatePosts(options)
const supply = await tumblrconst done value: posts = await const done value: posts = await
result: Promise<SupplyFn>
(tiloop
's)
options
name
random
params
modules
const url = v2 const blog = await v2const posts = await v2const total = await v2const post = await v2 const posts = await v2const tags = await v2 const supply = await v2
v1
const blog = await v1const posts = await v1const total = await v1const post = await v1const posts = await v1 const posts = await v1const tags = await v1 const supply = await v1const supply = await v1
License
MIT (http://opensource.org/licenses/MIT)