npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

spankbang

v0.0.9

Published

spankbang.com api implementation

Downloads

462

Readme

SpankBang

Install

Spankbang

A Node.js la.spankbang.com Api library

npm install spankbang

Usage

Import

const spankbang = require('spankbang')

fresh

//-- Inside an async function --//

//Retrieve fresh videos

const fresh = await spankbang.videos.fresh()
console.log(fresh)

{
    "favorites":[
        {
            "title",
            "duration",
            "thumbNail",
            "preview",
            "path",
            "views",
            "uploadTime"
        }
    ],
    "upcoming":[
        {
            "title",
            "duration",
            "thumbNail",
            "preview",
            "path",
            "views",
            "uploadTime"
        }
    ],
    "trending":[
        {
            "title",
            "duration",
            "thumbNail",
            "preview",
            "path",
            "views",
            "uploadTime"
        }
    ],
    "moreVideos":[
        {
            "title",
            "duration",
            "thumbNail",
            "preview",
            "path",
            "views",
            "uploadTime"
        }
    ],    
}

Sections

//-- Inside an async function --//
const page = 12
//trending
const data = await spankbang.videos.sections.trending({page})
//upcoming
const data = await spankbang.videos.sections.upcoming({page})
//newVideos
const data = await spankbang.videos.sections.newVideos({page})
//popular
const data = await spankbang.videos.sections.popular({page})

console.log(data)

{
     "pagination": {
        "page",
        "pages" [],
        "hasNext", //bool
        "hasPrevious" //bool
    },
    "videos": [
        {
            "title",
            "duration",
            "thumbNail",
            "preview",
            "path",
            "views",
            "uploadTime"
        },
    ]
}

Details

//-- Inside an async function --//

const url = '/9c8bk/video/hotwifexxx+cheating+asian+wife+sexting+with+black+stud+see+what+happens+next'
const details = await spankbang.videos.details({url})

console.log(details)


{
    "name",
    "description",
    "duration",//"24:07"
    "profile":{
        "name",
        "count"//string
    },
    "thumbNail",
    "tags":[],
    "timeline":{
        "positions":[
            {
                "name",
                "timeStamp", //int Time in seconds
            }
        ],
        "timeline":[
            {
                "image",
                "timeStamp", //int Time in seconds
            }
        ],
    },
    "files":{
        "240p",
        "480p",
        "720p",
        "1080p",
        "4k",
        "hls"
    },
    "videos":[
        {
            "title",
            "duration",
            "thumbNail",
            "preview",
            "path",
            "views",
            "uploadTime"
        }
    ]
}

Search

//-- Inside an async function --//

 const { search,page } = req.body
 const query = await spankbang.videos.search({search,page})

console.log(search)

{
    "pagination": {
        "page":1, //int
        "pages":1001 //int
        "hasNext", //bool
        "hasPrevious", //bool
    },
    "results":[
        {
            "title",
            "duration",
            "thumbNail",
            "preview",
            "path",
            "views",
            "uploadTime"
        }
    ]
}

Tags

//-- Inside an async function --//


const tags = await spankbang.tags()

console.log(tags)

{
    "tags":[
       //a total of 1000 tags are obtained 
    ]
}


// To limit the number of items use the limit property passing a number with the required quantity

const {limit} = req.body //10

const tags = await spankbang.tags({limit})

console.log(tags)

{
    tags:[
        // 10 items
    ]
}

//To search for a tag you can pass the 'search' property

const {search} = req.body 
const tags = await spankbang.tags({search})

console.log(tags)
{
    'tags':[]
}

/*In the event that it is required to limit the amount of
 the search, it can also be done by passing both the 'limit' and 'search' properties.*/

const { limit, search } = req.body 
const tags = await spb.tags({limit,search})

cosole.log(tags)

{
    "tags":[]
}

Pornstars


const pstars = await spankbang.pstars()

cosole.log(pstars)

{
    "pagination":{
        "page": 1,
        "pagination":[
            "1",
            "2",
            "3",
            "166"
        ]
    },
    "hasNext", // bool
    "hasPrevious", // bool
    "pStars":[
        {
            "name",
            "path",
            "thumbNail",
            "views",
            "videos"
        }
    ]
}

//To change the page you can pass the 'page' parameter.
const { page }= req.body//2
const pstars = await spankbang.pstars({page})

cosole.log(pstars)

{
   "pagination":{
        "page": 2,
        "pagination":[
            "1",
            "2",
            "3",
            "166"
        ]
    },
    "hasNext", // bool
    "hasPrevious", // bool
    "pStars":[
        {
            "name",
            "path",
            "thumbNail",
            "views",
            "videos"
        }
    ] 
}

Search Pornstars


const {search}= req.body
const pstars = await spankbang.searchPstar({search})

console.log(pstars)

{
    "pStars":[
        {
            "name",
            "path",
            "videos"
        }
    ]
}
/*
In the event that it is required to limit the number of results, the 'limit' property can be passed.
*/

const { search,limit }= req.body
const pstars = await spankbang.searchPstar({search, limit})

Channels

//-- Inside an async function --//
//hot
const data = await spankbang.channels.hot()
//newChannels
const data = await spankbang.channels.newChannels()
//popular
const data = await spankbang.channels.popular()
//name
const data = await spankbang.channels.name()


console.log(data)
{
    "pagination": {
        "page",
        "pages": [],
        "hasNext": true,
        "hasPrevious": true
    },
    "channels": [
        {
            "path",
            "thumbNail",
            "name"
        },
    ]
}

Channel Details


    const path = '/ho/channel/brazzers/'
    const page = 1
    
    //newVideos
    const data = await spankbang.channelDetails.newVideos({path, page})
    //popular
    const data = await spankbang.channelDetails.popular({path, page})
    //longest
    const data = await spankbang.channelDetails.longest({path, page})
    //present
    const data = await spankbang.channelDetails.present({path, page})

    console.log(data)

{
    "name",
    "createdBy": {
        "name",
        "path"
    },
    "thumbNail",
    "pagination": {
        "page",
        "pages": []
         "hasNext", //bool
        "hasPrevious": //bool
    },
    "videos": [
        {
            "title",
            "duration",
            "thumbNail",
            "preview",
            "path",
            "views",
            "uploadTime"
        },
    ]
}

Profile Details

async function test()  {
    const path = '/profile/dealamaju14'
    //popular
    const data = await spankbang.profileDetails.popular({ path })
    //present
    const data = await spankbang.profileDetails.present({ path })
    //longest
    const data = await spankbang.profileDetails.longest({ path })
    console.log(data)
}

{
    "pagination": { 
        "page": 1,
        "pages": [], 
        "hasNext": false, 
        "hasPrevious": false,
    }
    'name',
    'flag',
    'thumbNail',
    'count' //subs
    'videos':[
       {
            "title",
            "duration",
            "thumbNail",
            "preview",
            "path",
            "views",
            "uploadTime"
        },
    ]
}
  • API functions will be added in future versions