jfinkels / flask-restless

NO LONGER MAINTAINED - A Flask extension for creating simple ReSTful JSON APIs from SQLAlchemy models.
https://flask-restless.readthedocs.io
GNU Affero General Public License v3.0
1.02k stars 301 forks source link

create_api_blueprint throwing strange errors #644

Closed Datamance closed 7 years ago

Datamance commented 7 years ago

Hi,

So this code:

nps_bp = api_manager.create_api_blueprint( NetPromoterScore, url_prefix='/api/v1', methods=['POST'], collection_name='nps', preprocessors={ 'POST': [nps_entry_preprocessor] } )

Definitely shouldn't throw this error: TypeError: create_api_blueprint() takes at least 3 arguments (6 given)

Any idea what could be going on here?

Datamance commented 7 years ago

whoops! was looking at wrong version of docs :) turns out I needed the blueprint name as my first arg.

Sorry about that!