diff --git a/README.md b/README.md index 6243120..a2829b1 100644 --- a/README.md +++ b/README.md @@ -14,6 +14,14 @@ This document outlines the setup and usage of ZenHub's public API: a RESTful API ## Authentication All requests to the API need an API token. Generate a token in the [Settings](https://dashboard.zenhub.io/#/settings) section of your ZenHub Dashboard. +```json +getSuper = (property, args...) -> + result = @constructor.__super__[property] + + if _.isFunction(result) then result.apply(@, args) else result +``` + + Note: Each user may only have one token, so generating a new token will make any previous tokens invalid. The token is sent in the `X-Authentication-Token` header. For example, using `curl` it'd be `curl -H 'X-Authentication-Token: TOKEN' URL`. Alternatively, you can send the token in the URL using the `access_token` query string attribute. To do so, add ```?access_token=TOKEN``` to any url.