You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
1.4 KiB

4 years ago
  1. ## Documentation
  2. You can see below the API reference of this module.
  3. ### `GitHubCalendar(container, username, options)`
  4. Brings the contributions calendar from GitHub (provided username) into your page.
  5. #### Params
  6. - **String|HTMLElement** `container`: The calendar container (query selector or the element itself).
  7. - **String** `username`: The GitHub username.
  8. - **Object** `options`: An object containing the following fields:
  9. - `summary_text` (String): The text that appears under the calendar (defaults to: `"Summary of
  10. pull requests, issues opened, and commits made by <username>"`).
  11. - `proxy` (Function): A function that receives as argument the username (string) and should return a promise resolving the HTML content of the contributions page.
  12. The default is using @Bloggify's APIs.
  13. - `global_stats` (Boolean): If `false`, the global stats (total, longest and current streaks) will not be calculated and displayed. By default this is enabled.
  14. - `responsive` (Boolean): If `true`, the graph is changed to scale with the container. Custom CSS should be applied to the element to scale it appropriately. By default this is disabled.
  15. - `tooltips` (Boolean): If `true`, tooltips will be shown when hovered over calendar days. By default this is disabled.
  16. - `cache` (Number) The cache time in seconds.
  17. #### Return
  18. - **Promise** A promise returned by the `fetch()` call.