* Create a new gist. * @see https://developer.github.com/v3/gists/#create-a-gist * @param {Object} gist - the data for the new gist * @param {Requestable.callback} [cb] - will receive the new gist upon creation * @return {Promise} - the Promise for the http request
(gist, cb)
| 40 | * @return {Promise} - the Promise for the http request |
| 41 | */ |
| 42 | create(gist, cb) { |
| 43 | return this._request('POST', '/gists', gist, cb) |
| 44 | .then((response) => { |
| 45 | this.__id = response.data.id; |
| 46 | return response; |
| 47 | }); |
| 48 | } |
| 49 | |
| 50 | /** |
| 51 | * Delete a gist. |