REST api versioning (only version the representation, not the resource itself)

I completely agree; a URI expresses identity, identity doesn’t change when a new version is introduced. There might be new URIs for additional concepts, of course, and existing URIs might redirect … but including a “v2” in the URI smells RPCish to me. Note that this has got nothing to do with REST, really, as … Read more

Applying LIMIT and OFFSET to all queries in SQLAlchemy

Try adding a first, required argument, which must be a group of query filters. Thus, # q({‘id’: 5}, 2, 50) def q(filters, page=0, page_size=None): query = session.query(…).filter_by(**filters) if page_size: query = query.limit(page_size) if page: query = query.offset(page*page_size) return query or, # q(Model.id == 5, 2, 50) def q(filter, page=0, page_size=None): query = session.query(…).filter(filter) if page_size: … Read more

API Endpoint Semantics

According to this Wikipedia article, the endpoint is a web service, defined by a WSDL file, and does nothing more than define the address or connection point to a web service. It is typically represented by a simple HTTP URL string. Microsoft uses the term endpoint in various contexts, but they all amount to the … Read more

What is the gold standard for website APIs? Twitter, Flickr, Facebook, etc [closed]

We’re doing some research in this area ourselves. Not a lot out there in terms of “gold standard” for website API references. The most common website APIs referenced are: Google APIs http://developers.google.com/api-client-library/java/apis Amazon S3 http://docs.amazonwebservices.com/AmazonS3/latest/API/ Twitter https://dev.twitter.com/ Facebook http://developers.facebook.com/ LinkedIn http://developer.linkedin.com/index.jspa Delicious http://delicious.com/help/api YouTube http://www.youtube.com/dev Netflix http://developer.netflix.com/ Sun Cloud API http://kenai.com/projects/suncloudapis/pages/Home Another list here: http://www.pingable.org/the-top-15-web-apis-for-your-site/ … Read more

Do fluent interfaces violate the Law of Demeter?

Well, the short definition of the law shortens it too much. The real “law” (in reality advice on good API design) basically says: Only access objects you created yourself, or were passed to you as an argument. Do not access objects indirectly through other objects. Methods of fluent interfaces often return the object itself, so … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)