Skip to content

Latest commit

 

History

History
82 lines (73 loc) · 1.98 KB

File metadata and controls

82 lines (73 loc) · 1.98 KB

Contributions

Contributions Object

{
  prList: [{
    'title': <title of pull request>,
    'url': <url of pull request>,
    'state': <open or closed>,
    'createdAt': <unix_timestamp>,
    'updatedAt': <unix_timestamp>,
    'raisedBy': <username of the assignee>
  }],
  task: {
    'title': <task tile>,
    'purpose': <why this task is needed>,
    'endsOn': <unix_timestamp>,
    'startedOn': <unix_timestamp>,
    'deployedOn': <unix_timestamp>,
    'status': <status of the task>,
    'participants': [
      {
        'firstName': <first name of user>,
        'lastName': <last name of user>,
        'img': <image url of user>,
        'username': <username of the user>
      },
      {
        'firstName': <first name of user>,
        'lastName': <last name of user>,
        'img': <image url of user>,
        'username': <username of the user>
      }
    ],
    'featureUrl': <url of the feature task>,
    'isNoteworthy': true
  }
}

Requests

Route Description
GET /contributions/:username Returns user contributions

GET /contributions/:username

Returns the contributions of the user.

  • Params
    Required: username=[string]
  • Body
    None
  • Headers
    Content-Type: application/json
  • Success Response:
    • Code: 200
      • Content:
{
  message: 'Contributions returned successfully!',
  contributions: {
    noteWorthy: [
      <contribution_object>,
      <contribution_object>
    ],
    all: [
      <contribution_object>,
      <contribution_object>
    ]
  }
}
  • Error Response:
    • Code: 404
      • Content: { "error": "Not Found", "message": "User doesn't exist" }
    • Code: 500
      • Content: { "statusCode": 500, "error": "Internal Server Error", "message": "An internal server error occurred" }