API Docs for: 1.0.1
Show:

File: lib/routers/freelancers/profile.js

  1. /**
  2. * Upwork auth library for using with public API by OAuth
  3. *
  4. * @package UpworkAPI
  5. * @since 09/24/2014
  6. * @copyright Copyright 2014(c) Upwork.com
  7. * @author Maksym Novozhylov <mnovozhilov@upwork.com>
  8. * @license Upwork's API Terms of Use {@link https://developers.upwork.com/api-tos.html}
  9. */
  10.  
  11. /**
  12. * @module routes.freelancers.profile
  13. */
  14.  
  15. /**
  16. * @property entryPoint
  17. * @type String
  18. * @default api
  19. * @static
  20. * @final
  21. */
  22. var entryPoint = 'api';
  23.  
  24. /**
  25. * @class Profile
  26. * @constructor
  27. */
  28. exports.Profile = function(api) {
  29. this.api = api;
  30. this.api.epoint = entryPoint;
  31. }
  32.  
  33. /**
  34. * Get specific Freelancer Profile
  35. *
  36. * @method getSpecific
  37. * @param key {String} Profile key
  38. * @param callback {String} Callback function
  39. * @async
  40. */
  41. exports.Profile.prototype.getSpecific = function(key, callback) {
  42. debug('running request');
  43. this.api.client.get('profiles/v1/providers/' + key, {}, callback);
  44. }
  45.  
  46. /**
  47. * Get specific Freelancer Profile in brief
  48. *
  49. * @method getSpecificBrief
  50. * @param key {String} Profile key
  51. * @param callback {String} Callback function
  52. * @async
  53. */
  54. exports.Profile.prototype.getSpecificBrief = function(key, callback) {
  55. debug('running request');
  56. this.api.client.get('profiles/v1/providers/' + key + '/brief', {}, callback);
  57. }
  58.