Skip to content
This repository has been archived by the owner on Feb 15, 2020. It is now read-only.

CV Processing Upload Return

coco33920 edited this page Apr 10, 2019 · 6 revisions

CV Processing

I think you know but this is a HTTP API so you will need to have a JSON parser and a HTTP Client in your SDK, you could use embedded libraries but me in Java i use OkHttpClient 2.7.5 and Gson to performs these functions.

Uploading

The end point for uploading is : "/upload" or "/upload_raw", the upload_raw must be use ONLY for raw HTML form response, the "/upload" method with JSON payload is highly prefered

To upload a CV to process you must respect the JSON syntax, however if your langage is object oriented i suggest you to use an help like GSON in Java to parse a object CV into JSON.

If you cant this is the construction :

{

"imageid":1 or 2,( more in the future )

"name":"Some Name",

"scc":"Some SCC",

"currentAssignment":"USS SV",

"currentRank":"ADM",

"currentPosition":"CSO",

"currentSection":"Science",

"text":"text\nseparated\nby\n";

}

Return

My API return JSON. If the CV is successfully process, you will receive a JSON with this form : {"pdfDownload":"http://cv.nwa2coco.fr/file/:uuid/downloadPdf","pngDownload":"","message":"Your CV is successfully uploaded","id":300}.

If the processing had encounter an error, the JSON is a generic error : {"message":"Error occured with downloading","id":500}

The first link is the download link of the final pdf, first i had implement a png download but i replace that with a pdf -> png convertissor, the message is always the same if the pdf is process, the id is useless.

Clone this wiki locally