1.0.0 • Published 2 years ago
behance-node v1.0.0
Behance-node
An asynchronous module for scrapping Behance using JavaScript.
Install
npm i behance-nodeUsage
const Behance = require('behance-node');Documentation
User data
Return data about user.
- Method:
user(username: string, detailed?: boolean)
Parameters:
Name Type Info usernamestring Desired username detailedboolean Return more detail about user or not Example:
- Get detailed data about this user
https://www.behance.net/moesalah.Behance.user('moesalah', true) .then( result => console.log(result) ) .catch( error => console.log(error) );
- Get detailed data about this user
Project data
Return data about project.
- Method:
project(path: string)
Parameter:
Name Type Info pathstring Desired project path, must contain project id and name Example:
- Get data about this project
https://www.behance.net/gallery/77156181/Amazon-Rebranding-UI-Concept.Behance.project('77156181/Amazon-Rebranding-UI-Concept') .then( result => console.log(result) ) .catch( error => console.log(error) );
- Get data about this project
Random project
Get a random project data using sort.
- Method:
randomProject( sort?: 'recommended' | 'curated' | 'most_appreciated' | 'most_viewed' | 'most_commented' | 'most_recent', time?: 'today' | 'this_week' | 'this_month' | 'all_time' )
Parameters:
Name Type Info sortrecommended,curated,most_appreciated,most_viewed,most_commented,most_recentOnly most_appreciated,most_viewed,most_commentedcan be used withtimeparametertimetoday,this_week,this_month,all_timeSort result by date Examples:
- Get a random project from most viewed this week.
Behance.randomProject('most_viewed', 'this_week') .then( result => console.log(result) ) .catch( error => console.log(error) ); - Get a random curated project.
Behance.randomProject('curated') .then( result => console.log(result) ) .catch( error => console.log(error) );
- Get a random project from most viewed this week.