Skip to content

Backend API Author & Admin

Nhan Nguyen edited this page Feb 22, 2021 · 15 revisions

Author and Admin

/service/author/{AUTHOR_ID}/ to retrieve currently logged-in user profile (required authorization)

  • Request method: GET, POST
  • example response:
{
    # ID of the Author
    "id":"41f7b891-e535-44ef-a795-b15f1dbab035",
    # the display name of the author
    "displayName":"Lara Croft",
    # HATEOS url for Github API
    "github": "http://github.com/laracroft"
}
  • response status code:
    • 200: OK
    • 403: Method not Allowed
    • 404: No author matches the given query.

/service/author/{AUTHOR_ID}/github to retrieve currently logged-in user github activities

  • Request method: GET
  • example response:
{
    # event type: push, fork, etc
    'type':event['type'],
    # github username
    'name':name,
    # event action:
    'action':action,
    # ONLY available for event type "ForkEvent"
    'forked_repo':forked_repo,
    # the repo where the event happened
    'repo':repo,
    # time the event happened
    'time':time,
}
  • response status code:
    • 200: OK
    • 403: Method Forbidden # needs authorization
    • 404: User not found

Clone this wiki locally