Advertisement
dergachevm

Progmatic API v0.1

Aug 8th, 2017
630
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // запросы данных
  2.  
  3. // /profile
  4. // request: getProfileInfo()
  5. {
  6.     "accessToken": 0,
  7.     "action": "getProfileInfo",
  8. }
  9. // response:
  10. {
  11.     "status": 200,
  12.     "data": {
  13.         "mySkills": [
  14.             {"id": 0, "industry": "IT", "name": "Pyton"},
  15.             {"id": 1, "industry": "IT", "name": "MATLAB"},
  16.         ],
  17.         "sticks": [
  18.             {"id": 0, "place": "Morgan Stanley", "progressType": 0, "rank": "Senior Quantitive Trader"},
  19.             {"id": 1, "place": "Apple", "progressType": 6},
  20.         ],
  21.         "education": [
  22.         ],
  23.         "experience": [
  24.             {
  25.                 "id": 0,
  26.                 "pdfUrl": "ya.ru/17",
  27.                 "location": "MSK RU",
  28.                 "company": "MSU, Physics dept",
  29.                 "role": "senior researcher",
  30.                 "description": "Project discussions with the customer (Quantum Center, NPO Refract,",
  31.                 "salary": 10000,
  32.                 "period": [1483232461],
  33.                 "comments": "comments",
  34.             },{
  35.                 "id": 1,
  36.                 "pdfUrl": "ya.ru/18",
  37.                 "location": "Kishinev MD",
  38.                 "company": "Univercity of Kishinev",
  39.                 "role": "Professor",
  40.                 "description": "Project discussions with the customer (Quantum Center, NPO Refract,",
  41.                 "salary": 10000,
  42.                 "period": [1483232460, 1483232461],
  43.                 "comments": "comments",
  44.             }
  45.         ],
  46.         "awards": [
  47.             {
  48.                 "title": "Золотой NULL",
  49.                 "description": "Очень тяжелый NULL",
  50.                 "date": 1483232461,
  51.             }
  52.         ],
  53.         "userInfo": {
  54.             "id": "lxGN26fW2X",
  55.             "firstName": "Дмитрий",
  56.             "lastName": "Ерошенко",
  57.             "industry": "Information Technology and Services",
  58.             "pictureUrl": "https://media.licdn.com/mpr/mprx/0__B9",
  59.             "currentRole": "Director",
  60.             "birthDate": 1483232461,
  61.             "location": {
  62.                 "country": {
  63.                     "code": "ru"
  64.                 },
  65.                 "name": "Moscow, Russian Federation"
  66.             },
  67.         }
  68.     }
  69. }
  70.  
  71.  
  72. /*// /paths
  73. // request: getGraph()
  74. {
  75.     "accessToken": 0,
  76.     "action": "getGraph",
  77.     "industry": 0
  78. }
  79. // response:
  80. {
  81.     "status": 200,
  82.     "data": {
  83.         "professions": [
  84.             {"id": 0, "name": "MAR", "url": "mar", "fullName": "Marketing Somebody"},
  85.             {"id": 1, "name": "RDS", "url": "rds", "fullName": "Researcher data science"},
  86.         ],
  87.         "paths": {
  88.             "Fastest": {
  89.                 // описание ребер графа
  90.             },
  91.             "Easiest": {
  92.                 // описание ребер графа
  93.             },
  94.             "Popular": {
  95.                 // описание ребер графа
  96.             },
  97.         },
  98.         "industries": [
  99.             {"id": 0, "name": "IT"},
  100.             {"id": 1, "name": "GOV"},
  101.             {"id": 2, "name": "Show"},
  102.         ]
  103.     }
  104. }
  105.  
  106. // /profession/*id
  107. // request: getPosition()
  108. {
  109.     "accessToken": 0,
  110.     "action": "getPosition",
  111.     "id": 0,
  112. }
  113. // response:
  114.  
  115. {
  116.     "status": 200,
  117.     "requestedParams": {
  118.         "id": 0,
  119.     },
  120.     "data": {
  121.         "essentialSkills": [
  122.             {"id": 1, "name": "Machine learning", "selected": false},
  123.             {"id": 2, "name": "Quantitative trading", "selected": false},
  124.         ]
  125.     }
  126. }
  127. */
  128.  
  129. // /goals
  130. // request: getGoals()
  131. {
  132.     "accessToken": 0,
  133.     "action": "getGoals",
  134. }
  135. // response:
  136. {
  137.     "status": 200,
  138.     "data": {
  139.         "career": [
  140.             {"id":0, "place": "California", "rank": "CEO Apple", "industry": "IT", "term": 800, "completed": 94},
  141.             {"id":1, "place": "Home", "rank": "Guitarist", "industry": "SHOW", "term": 1200, "completed": 54},
  142.         ],
  143.         "education": [
  144.             {"id":0, "name": "Python for Everybody", "industry": "IT", "term": 400, "completed": 54},
  145.         ]
  146.     }
  147. }
  148.  
  149. // /goals/*id
  150. // request: getGoalPath()
  151. {
  152.     "accessToken": 0,
  153.     "action": "getGoalPath",
  154.     "id": 0
  155. }
  156. // response:
  157.  
  158. {
  159.     "status": 200,
  160.     "requestedParams": {
  161.         "id": 0,
  162.     },
  163.     "data": {
  164.         "path": [
  165.             {
  166.                 "id": 0, // пространство id единое для path и stages
  167.                 "name": "Portfolio manager",
  168.                 "completed": false,
  169.                 "stages": [
  170.                     {
  171.                         "id": 1,
  172.                         "completed": false,
  173.                         "text": "Min 5 years of relevant Hedge Fund industry experience. "
  174.                     }
  175.                 ]
  176.             },{
  177.                 "id": 2,
  178.                 "name": "Senior quant trader",
  179.                 "completed": false,
  180.                 "stages": [
  181.                     {
  182.                         "id": 3,
  183.                         "completed": false,
  184.                         "text": "2+ years experience in algorithms development, backtesting and implementation"
  185.                     }
  186.                 ]
  187.             },
  188.         ],
  189.         "currentPosition": {
  190.             "name": "Portfolio manager",
  191.         },
  192.         "courses": [
  193.             {"id": 0, "provider": "QuantStart.com", "type": 0, "text": "Check out deep learning application for time series analysis"},
  194.             {"id": 1, "provider": "EDU", "type": 1, "text": "Upgrade your skills 0"},
  195.         ]
  196.     }
  197. }
  198.  
  199. // /goals/*id
  200. // "request": getStageCourses()
  201. {
  202.     "accessToken": 0,
  203.     "action": "getStageCourses",
  204.     "goalId": 0,
  205.     "stageId": 0
  206. }
  207. // "response":
  208. {
  209.     "status": 200,
  210.     "requestedParams": {
  211.         "goalId": 0,
  212.         "stageId": 0
  213.     },
  214.     "data": {
  215.         "courses": [
  216.             {"id": 0, "provider": "QuantStart.com", "price": 700, "text": "Check out deep learning application for time series analysis"},
  217.             {"id": 1, "provider": "EDU", "price": 701, "text": "Upgrade your skills 0"},
  218.         ]
  219.     }
  220. }
  221.  
  222. // /preferences
  223. // "request": getTagsCloud()
  224. {
  225.     "accessToken": 0,
  226.     "action": "getTagsCloud",
  227. }
  228. // "response":
  229. {
  230.     "status": 200,
  231.     "data": {
  232.         "tags": [
  233.             {"id": 0, "name": "GOV", "fullName": "Governor"},
  234.             {"id": 1, "name": "MAR", "fullName": "Marketing Somebody"},
  235.         ]
  236.     }
  237. }
  238.  
  239. // /profile/edit (Profile)
  240. // "request": getSkills()
  241. {
  242.     "accessToken": 0,
  243.     "action": "getSkills",
  244.     "request": "d"
  245. }
  246. // "response":
  247. {
  248.     "status": 200,
  249.     "data": {
  250.         "skills": [
  251.             {"id": 0, "name": "Design"},
  252.             {"id": 1, "name": "Development"},
  253.         ]
  254.     }
  255. }
  256.  
  257.  
  258. /* ..- -. .. --.- ..- .. - . .-.-.- -.-. --- -- */
  259.  
  260. // запрсы на сохранение
  261.  
  262. // /profile/edit/
  263. // Save your Profile
  264. // "request": saveProfile()
  265. {
  266.     "accessToken": 0,
  267.     "action": "saveProfile",
  268.     "data": {
  269.         "name": "Igor",
  270.         "surname": "Igorev",
  271.         "date": 1483232461,
  272.         "skills": [27, 11, 3] // всегда все текущие навыки пользователя
  273.     }
  274. }
  275. // "response":
  276. {
  277.     "status": 200,
  278.     "data": {
  279.         "name": "Igor",
  280.         "surname": "Igorev",
  281.         "date": 1483232461,
  282.         "skills": [27, 11, 3]
  283.     }
  284. }
  285.  
  286. // /profile/edit/
  287. // Save your Education
  288. // "request": saveEducation()
  289. {
  290.     "accessToken": 0,
  291.     "action": "saveEducation",
  292.     "data": {
  293.     }
  294. }
  295. // "response":
  296. {
  297.     "status": 200,
  298.     "data": {
  299.     }
  300. }
  301.  
  302. // /profile/edit/
  303. // Save your Experience
  304. // "request": saveExperience()
  305. {
  306.     "accessToken": 0,
  307.     "action": "saveExperience",
  308.     "data": {
  309.         "file": "file",
  310.         "location": "Москва",
  311.         "company": "Тиньков банк",
  312.         "role": "Веб-дизайнер",
  313.         "description": "Опыт работы 5 лет",
  314.         "salary": 100500,
  315.         "period": [1483232460, 1483232461],
  316.         "comments": "Очень плохой кофе",
  317.     }
  318. }
  319. // "response":
  320. {
  321.     "status": 200,
  322.     "data": {
  323.         "file": "file",
  324.         "location": "Москва",
  325.         "company": "Тиньков банк",
  326.         "role": "Веб-дизайнер",
  327.         "description": "Опыт работы 5 лет",
  328.         "salary": 100500,
  329.         "period": [1483232460, 1483232461],
  330.         "comments": "Очень плохой кофе",
  331.     }
  332. }
  333.  
  334. // /profile/edit/
  335. // Save your Awards
  336. // "request": saveAwards()
  337. {
  338.     "accessToken": 0,
  339.     "action": "saveAwards",
  340.     "data": [
  341.         {
  342.             "title": "Золотой NULL",
  343.             "description": "Очень тяжелый NULL",
  344.             "date": 1483232461,
  345.         },{
  346.             "title": "Золотой TIMESTAMP",
  347.             "description": "Очень тяжелая награда",
  348.             "date": 1483232461,
  349.         }
  350.     ]
  351. }
  352. // "response":
  353. {
  354.     "status": 200,
  355.     "data": [
  356.         {
  357.             "title": "Золотой NULL",
  358.             "description": "Очень тяжелый NULL",
  359.             "date": 1483232461,
  360.         },{
  361.             "title": "Золотой TIMESTAMP",
  362.             "description": "Очень тяжелая награда",
  363.             "date": 1483232461,
  364.         }
  365.     ]
  366. }
  367.  
  368. // /profile/edit/
  369. // Save your Settings
  370. // "request": saveSettings()
  371. {
  372.     "accessToken": 0,
  373.     "action": "saveSettings",
  374.     "data": {
  375.         "oldPassword": "100400p*T8",
  376.         "newPassword": "100500",
  377.         "repeatPassword": "100500",
  378.     }
  379. }
  380. // "response":
  381. {
  382.     "status": 200,
  383. }
  384.  
  385. // profession/*id
  386. // Add to goals + (career)
  387. // "request": saveNewGoalCareer()
  388. {
  389.     "accessToken": 0,
  390.     "action": "saveNewGoalCareer",
  391.     "data": {
  392.         "id": 0
  393.     }
  394. }
  395. // "response":
  396. {
  397.     "status": 200,
  398.     "data": {
  399.         "id": 0
  400.     }
  401. }
  402.  
  403. // /courses/*id
  404. // Add to goals + (Education)
  405. // "request": saveNewGoalEducation()
  406. {
  407.     "accessToken": 0,
  408.     "action": "saveNewGoalEducation",
  409.     "data": {
  410.         "id": 0
  411.     }
  412. }
  413. // "response":
  414. {
  415.     "status": 200,
  416.     "data": {
  417.         "id": 0
  418.     }
  419. }
  420.  
  421. // /goals/*id
  422. // V
  423. // "request": setGoalStepComplete()
  424. {
  425.     "accessToken": 0,
  426.     "action": "setGoalStepComplete",
  427.     "data": {
  428.         "stages": [
  429.             {
  430.                 "id": 0,
  431.                 "completed": false,
  432.             },{
  433.                 "id": 1,
  434.                 "completed": true,
  435.             }
  436.         ]
  437.     }
  438. }
  439. // "response":
  440. {
  441.     "status": 200,
  442.     "data": {
  443.         "stages": [
  444.             {
  445.                 "id": 0,
  446.                 "completed": false,
  447.             },{
  448.                 "id": 1,
  449.                 "completed": true,
  450.             }
  451.         ]
  452.     }
  453. }
  454.  
  455. // /addissues/*name
  456. // Add to My Profile
  457. // "request": saveNewAchievement()
  458. // ('Position change', 'Course completed', 'Project experience', 'Article published', 'Public talk', 'Test passed', 'Job interview', 'Book read', 'Education enrollment', 'Event attended', 'Other')
  459. {
  460.     "accessToken": 0,
  461.     "action": "saveNewAchievement",
  462.     "data": {
  463.         "progresstype": 0,
  464.         "url": "ya.ru",
  465.         "title": "стажировка",
  466.         "date completed": 1483232461,
  467.         "comments": "яндекс - наше всё",
  468.     }
  469. }
  470. // "response":
  471. {
  472.     "status": 200,
  473.     "data": {
  474.         "progresstype": 0,
  475.         "url": "ya.ru",
  476.         "title": "стажировка",
  477.         "date completed": 1483232461,
  478.         "comments": "яндекс - наше всё",
  479.     }
  480. }
  481.  
  482. // /addissues/*name
  483. // click on tag in a cloud
  484. // "request": saveTags()
  485. {
  486.     "accessToken": 0,
  487.     "action": "saveTags",
  488.     "data": {
  489.         "tags": [
  490.             0, 8, 17
  491.         ]
  492.     }
  493. }
  494. // "response":
  495. {
  496.     "status": 200,
  497.     "data": {
  498.         "tags": [
  499.             0, 8, 17
  500.         ]
  501.     }
  502. }
  503.  
  504. // /login/registration
  505. // Create New Account
  506. // "request": createAccount()
  507. {
  508.     "accessToken": 0,
  509.     "action": "createAccount",
  510.     "data": {
  511.         "email": "m@gmail.com",
  512.         "password": "100500",
  513.         "repeatPassword": "100500",
  514.     }
  515. }
  516. // "response":
  517. {
  518.     "status": 200,
  519.     "accessToken": 0,
  520.     "data": {
  521.         "email": "m@gmail.com",
  522.         "password": "100500",
  523.     }
  524. }
  525.  
  526. // /login
  527. // Sign in
  528. // "request": login()
  529. {
  530.     "action": "login",
  531.     "data": {
  532.         "email": "m@gmail.com",
  533.         "password": "100500",
  534.     }
  535. }
  536. // "response":
  537. {
  538.     "status": 200,
  539.     "accessToken": 0,
  540.     "data": {
  541.         "email": "m@gmail.com",
  542.         "password": "100500",
  543.     }
  544. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement