Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API refactoring; new error handling flow #270

Closed
psolom opened this issue Nov 27, 2017 · 4 comments
Closed

API refactoring; new error handling flow #270

psolom opened this issue Nov 27, 2017 · 4 comments
Assignees
Milestone

Comments

@psolom
Copy link
Owner

psolom commented Nov 27, 2017

Changes in the API for v2.7.0

  1. getfile API method should be RENAMED to getinfo and return either file or folder stats. Restriction to handle files only should be removed.

  2. getfolder API method should be RENAMED to readfolder. No changes in functionality.

  3. API methods readfile, getimage and download should USE THE SAME FLOW to read file and write it to the output. The difference will be in headers and restrictions (validation checks) only. Read/Write flow features which should be implemented (preferably):

    • read in small chunks in order to handle big size files;
    • handle HTTP RANGE for media files;
  4. editfile API method should be REMOVED, instead of it the readfile is used at the client-side.

  5. download API method should be simplified and handled with a single request. Implemented within the commit af60b30

  6. The error handling. When fire an error you have to add the following HTTP headers to the response:

        header('Content-Type: application/json');
        header('HTTP/1.1 500 Internal Server Error');

Also API error format sould correspond to JSON API standard. Imlemented within #210

@psolom
Copy link
Owner Author

psolom commented Nov 27, 2017

@fabriceci, @gmkll, @jsooter, @stevelittlefish, @jlaustill, @forestlake, @sinanbozkus, @richeflits

I have reworked the API (located at the dev branch). Not great but very important changes to keep consistency and remove confusing things. Please, take a look the list and update the connectors that you are maintained.

@fabriceci, @gmkll, @jlaustill, @forestlake, @sinanbozkus, @richeflits I have made some modifications trying to adjust connectors, but my exprience with non-PHP connectors is not enough to cover all the changes. I don't even have a chance to test the modifications I made, so look through your connectors thoroughly, test updated code and implement the missing features, please. (create PR to the dev branch)

@jsooter, @stevelittlefish Both Python Flask connectors are standalone packages, so I had no chance to modify them. Them will become outdated after the v2.7.0 release. Take care to update your connectors, please.

@psolom
Copy link
Owner Author

psolom commented Dec 3, 2017

  1. New seekfolder API method, see Search inside all the userfiles #271

@psolom
Copy link
Owner Author

psolom commented Dec 18, 2017

  1. Modified attributes list in the API response.

Removed "timestamp" attribute. "created" and "modified" attributes now contain unix timestamps instead of formatted datetime strings. Datetime formatting is performed at the client-side now.

@psolom
Copy link
Owner Author

psolom commented Dec 20, 2017

Released in v2.7.0

@psolom psolom closed this as completed Dec 20, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant