Skip to content

Commit 08e70cf

Browse files
committed
Generated docs
1 parent 3c0df38 commit 08e70cf

File tree

1 file changed

+63
-3
lines changed

1 file changed

+63
-3
lines changed

README.md

Lines changed: 63 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -125,19 +125,79 @@ Records a new commit.
125125

126126
#### Params
127127
- **Object** `data`: The commit data containing:
128-
- `date` (String|Date): The date object or a string in this format: `DDD MMM dd HH:mm:ss YYYY`
128+
- `date` (String|Date): The date object or a string in a format that can be parsed.
129129
- `url` (String): The repository remote url.
130130
- `hash` (String): The commit hash.
131131

132132
- **Function** `callback`: The callback function.
133133

134-
### `get(data, callback)`
134+
#### Return
135+
- **GitStats** The `GitStats` object.
136+
137+
### `get(callback)`
135138
Gets the git stats.
136139

137140
#### Params
138-
- **Object** `data`: The stats filter. **Not yet implemented**.
139141
- **Function** `callback`: The callback function.
140142

143+
#### Return
144+
- **GitStats** The `GitStats` object.
145+
146+
### `save(stats, callback)`
147+
Saves the provided stats.
148+
149+
#### Params
150+
- **Object** `stats`: The stats to be saved.
151+
- **Function** `callback`: The callback function.
152+
153+
#### Return
154+
- **GitStats** The `GitStats` object.
155+
156+
### `iterateDays(data, callback)`
157+
Iterate the days, calling the callback function for each day.
158+
159+
#### Params
160+
- **Object** `data`: An object containing the following fields:
161+
- `start` (Moment): A `Moment` date object representing the start date (default: *an year ago*).
162+
- `end` (Moment): A `Moment` date object representing the end date (default: *now*).
163+
- `format` (String): The format of the date (default: `"MMM D, YYYY"`).
164+
165+
- **Function** `callback`: The callback function called with the current day formatted (type: string) and the `Moment` date object.
166+
167+
#### Return
168+
- **GitStats** The `GitStats` object.
169+
170+
### `graph(data, callback)`
171+
Creates an object with the stats on the provided period (default: *last year*).
172+
173+
#### Params
174+
- **Object** `data`: The object passed to the `iterateDays` method.
175+
- **Function** `callback`: The callback function.
176+
177+
#### Return
178+
- **GitStats** The `GitStats` object.
179+
180+
### `calendar(data, callback)`
181+
Creates the calendar data for the provided period (default: *last year*).
182+
183+
#### Params
184+
- **Object** `data`: The object passed to the `graph` method.
185+
- **Function** `callback`: The callback function.
186+
187+
#### Return
188+
- **GitStats** The `GitStats` object.
189+
190+
### `ansiCalendar(data, callback)`
191+
Creates the ANSI contributions calendar.
192+
193+
#### Params
194+
- **Object** `data`: The object passed to the `calendar` method.
195+
- **Function** `callback`: The callback function.
196+
197+
#### Return
198+
- **GitStats** The `GitStats` object.
199+
200+
141201
## How to contribute
142202

143203
1. File an issue in the repository, using the bug tracker, describing the

0 commit comments

Comments
 (0)