0.5.3 • Published 8 years ago
be-simple v0.5.3
提供一套更適合懶人的 Behance API 介面懶人包。
Initialize
First, you need to register your application at Behance Dev, and store the client_id.
Installation
With NPM:
$ npm install be-simple --save
var Be = require('be-simple');
var be = new Be(YOUR_CLIENT_ID);
//done!
Or another simple way:
<html>
<head>
<script src="/dist/be-simple.js"></script>
<script>
var be = new Be(YOUR_CLIENT_ID);
// done!
</script>
</head>
</html>
Methods
User Methods
Get a user's basic info
be.user(USER_ID, function(data) {
console.log(data);
})
Get a user's projects
be.userProjects(USER_ID, function(data) {
console.log(data);
})
Get all followers of a user
Please be careful when calling this method.
be.userAllFollowers(USER_ID, function(followers) {
console.log(followers);
})
Get all followings of a user
Please be careful when calling this method.
be.userAllFollowings(USER_ID, function(followings) {
console.log(followers);
})
Get a user's statics
be.userStats(USER_ID, function(data) {
console.log(data);
})