I have a blog at robert.katzki.de and this is my latest activity:
ro-ka / node-500px Goto Github PK
View Code? Open in Web Editor NEWA wrapper for the 500px.com API
Home Page: http://ro-ka.github.io/node-500px/
License: MIT License
A wrapper for the 500px.com API
Home Page: http://ro-ka.github.io/node-500px/
License: MIT License
I have a blog at robert.katzki.de and this is my latest activity:
node: v0.6.17
is there sth wrong in my commands
myhost:software zhangbin$ node
API500px = require("500px").API500px
[Function: API500px]
consumer_key = 'xxx'
'xxx'
api500px = API500px(consumer_key)
TypeError: Object # has no method '_configure'
at API500px (/Users/zhangbin/software/node_modules/500px/lib/api500px.js:11:7)
at repl:1:13
at REPLServer.eval (repl.js:80:21)
at Interface. (repl.js:182:12)
at Interface.emit (events.js:67:17)
at Interface._onLine (readline.js:162:10)
at Interface._line (readline.js:426:8)
at Interface._ttyWrite (readline.js:603:14)
at ReadStream. (readline.js:82:12)
at ReadStream.emit (events.js:88:20)
after running your sample code on
http://ro-ka.github.io/node-500px/
api500px.photos.getPopular({'sort': 'created_at', 'rpp': '100'}, function(error, results) {
if (error) {
// Error!
} else {
// Do something
}
});
I get { code: undefined }
Under the if(error) part.
Need to write tests and pass travis-ci.
Since this library only exports one thing, no reason to put it on an object like you do here -- you can just make it directly export. This way you could use the library with require('500px')
instead of require('500px').API500px
๐
I don't think this wrapper includes the collections endpoints at the moment. Happy to help out and contribute this piece, just wanted to run it by you first.
https://github.com/500px/api-documentation#collections-resources
Some API endpoints need OAuth to work. Add it!
Hi, I've just submitted PR for that as for now -> your API returns error with code: undefined (that's due to the typo). Anyway - according to 500px docs, we can parse JSON on successful response anyway and then, by parsing responseCode value, we can decide whether to return an error or not. The good thing about that solution is that if we are going to parse JSON from 500px always, we will be able to return user readable error with error.message property that can explain what went wrong.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.