Skip to content
This repository was archived by the owner on Sep 2, 2025. It is now read-only.

Commit f90085a

Browse files
committed
updtd vignette
1 parent 1d1c3a9 commit f90085a

File tree

3 files changed

+155
-141
lines changed

3 files changed

+155
-141
lines changed

inst/vign/gistr_vignette.Rmd

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ Add files
218218
First, path to file
219219

220220
```{r}
221-
file <- system.file("examples", "alm_othersources.md", package = "gistr")
221+
file <- system.file("examples", "alm.md", package = "gistr")
222222
```
223223

224224
```{r}
@@ -229,9 +229,9 @@ gists(what = "minepublic")[[1]] %>%
229229

230230
Delete files
231231

232-
```{r}
233-
gists(what = "minepublic")[[1]] %>%
234-
delete_files(file) %>%
232+
```{r eval=FALSE}
233+
gists(what = "minepublic")[[1]]
234+
delete_files("code.R") %>%
235235
update()
236236
```
237237

inst/vign/gistr_vignette.md

Lines changed: 76 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,8 @@ rate_limit()
8181

8282
```
8383
#> Rate limit: 5000
84-
#> Remaining: 4937
85-
#> Resets in: 50 minutes
84+
#> Remaining: 4782
85+
#> Resets in: 32 minutes
8686
```
8787

8888

@@ -97,20 +97,22 @@ gists(per_page = 2)
9797

9898
```
9999
#> [[1]]
100-
#> <gist>f6a41fd1356de2b8931d
101-
#> URL: https://gist.github.com/f6a41fd1356de2b8931d
102-
#> Description: Bootstrap Customizer Config
100+
#> <gist>0d0236018fd2e18f76eb
101+
#> URL: https://gist.github.com/0d0236018fd2e18f76eb
102+
#> Description:
103103
#> Public: TRUE
104-
#> Created/Edited: 2015-01-23T16:27:46Z / 2015-01-23T16:27:46Z
105-
#> Files: config.json
104+
#> Created/Edited: 2015-05-01T04:10:13Z / 2015-05-01T04:10:13Z
105+
#> Files: concurrency-in-go.md
106+
#> Truncated?: FALSE
106107
#>
107108
#> [[2]]
108-
#> <gist>2c0595baa786d8add54e
109-
#> URL: https://gist.github.com/2c0595baa786d8add54e
110-
#> Description: Solution to level 1 in Untrusted: http://alex.nisnevich.com/untrusted/
109+
#> <gist>cc1a45d62d544b2fbb68
110+
#> URL: https://gist.github.com/cc1a45d62d544b2fbb68
111+
#> Description:
111112
#> Public: TRUE
112-
#> Created/Edited: 2015-01-23T16:27:43Z / 2015-01-23T16:27:43Z
113-
#> Files: untrusted-lvl1-solution.js
113+
#> Created/Edited: 2015-05-01T04:10:13Z / 2015-05-01T04:10:15Z
114+
#> Files: alm.md, code.R
115+
#> Truncated?: FALSE, FALSE
114116
```
115117

116118
Since a certain date/time
@@ -122,20 +124,22 @@ gists(since='2014-05-26T00:00:00Z', per_page = 2)
122124

123125
```
124126
#> [[1]]
125-
#> <gist>f6a41fd1356de2b8931d
126-
#> URL: https://gist.github.com/f6a41fd1356de2b8931d
127-
#> Description: Bootstrap Customizer Config
127+
#> <gist>0d0236018fd2e18f76eb
128+
#> URL: https://gist.github.com/0d0236018fd2e18f76eb
129+
#> Description:
128130
#> Public: TRUE
129-
#> Created/Edited: 2015-01-23T16:27:46Z / 2015-01-23T16:27:46Z
130-
#> Files: config.json
131+
#> Created/Edited: 2015-05-01T04:10:13Z / 2015-05-01T04:10:13Z
132+
#> Files: concurrency-in-go.md
133+
#> Truncated?: FALSE
131134
#>
132135
#> [[2]]
133-
#> <gist>2c0595baa786d8add54e
134-
#> URL: https://gist.github.com/2c0595baa786d8add54e
135-
#> Description: Solution to level 1 in Untrusted: http://alex.nisnevich.com/untrusted/
136+
#> <gist>cc1a45d62d544b2fbb68
137+
#> URL: https://gist.github.com/cc1a45d62d544b2fbb68
138+
#> Description:
136139
#> Public: TRUE
137-
#> Created/Edited: 2015-01-23T16:27:43Z / 2015-01-23T16:27:43Z
138-
#> Files: untrusted-lvl1-solution.js
140+
#> Created/Edited: 2015-05-01T04:10:13Z / 2015-05-01T04:10:15Z
141+
#> Files: alm.md, code.R
142+
#> Truncated?: FALSE, FALSE
139143
```
140144

141145
Request different types of gists, one of public, minepublic, mineall, or starred.
@@ -147,20 +151,22 @@ gists('minepublic', per_page = 2)
147151

148152
```
149153
#> [[1]]
150-
#> <gist>485fc353504f902194a8
151-
#> URL: https://gist.github.com/485fc353504f902194a8
152-
#> Description: gist gist gist
154+
#> <gist>cc1a45d62d544b2fbb68
155+
#> URL: https://gist.github.com/cc1a45d62d544b2fbb68
156+
#> Description:
153157
#> Public: TRUE
154-
#> Created/Edited: 2015-01-23T16:24:50Z / 2015-01-23T16:24:50Z
155-
#> Files: stuff.md
158+
#> Created/Edited: 2015-05-01T04:10:13Z / 2015-05-01T04:10:15Z
159+
#> Files: alm.md, code.R
160+
#> Truncated?: FALSE, FALSE
156161
#>
157162
#> [[2]]
158-
#> <gist>d756e9c7ceebd154ec26
159-
#> URL: https://gist.github.com/d756e9c7ceebd154ec26
160-
#> Description: gist gist gist
163+
#> <gist>a72d9b3b59844f82e87b
164+
#> URL: https://gist.github.com/a72d9b3b59844f82e87b
165+
#> Description: a new cool gist
161166
#> Public: TRUE
162-
#> Created/Edited: 2015-01-23T13:48:18Z / 2015-01-23T13:48:19Z
163-
#> Files: stuff.md, zoo.json
167+
#> Created/Edited: 2015-05-01T04:10:12Z / 2015-05-01T04:10:12Z
168+
#> Files: stuff.md
169+
#> Truncated?: FALSE
164170
```
165171

166172

@@ -178,6 +184,7 @@ gist(id = 'f1403260eb92f5dfa7e1')
178184
#> Public: TRUE
179185
#> Created/Edited: 2014-10-15T20:40:12Z / 2014-10-15T21:54:29Z
180186
#> Files: bitly_r.md
187+
#> Truncated?: FALSE
181188
```
182189

183190
## Create gist
@@ -202,12 +209,13 @@ gist_create(files=stuffpath, description='a new cool gist', browse = FALSE)
202209
```
203210

204211
```
205-
#> <gist>23000a2ff523bdf6c438
206-
#> URL: https://gist.github.com/23000a2ff523bdf6c438
212+
#> <gist>ac19258b9bd255a09981
213+
#> URL: https://gist.github.com/ac19258b9bd255a09981
207214
#> Description: a new cool gist
208215
#> Public: TRUE
209-
#> Created/Edited: 2015-01-23T16:27:53Z / 2015-01-23T16:27:53Z
216+
#> Created/Edited: 2015-05-01T04:10:34Z / 2015-05-01T04:10:34Z
210217
#> Files: stuff.md
218+
#> Truncated?: FALSE
211219
```
212220

213221
Or, wrap `gist_create()` around some code in your R session/IDE, like so, with just the function name, and a `{'` at the start and a `'}` at the end.
@@ -224,12 +232,13 @@ numbers
224232
```
225233

226234
```
227-
#> <gist>04ee8c7a0491d3317617
228-
#> URL: https://gist.github.com/04ee8c7a0491d3317617
235+
#> <gist>d5f968cef4c80e7ea9c3
236+
#> URL: https://gist.github.com/d5f968cef4c80e7ea9c3
229237
#> Description:
230238
#> Public: TRUE
231-
#> Created/Edited: 2015-01-23T16:27:54Z / 2015-01-23T16:27:54Z
239+
#> Created/Edited: 2015-05-01T04:10:34Z / 2015-05-01T04:10:34Z
232240
#> Files: code.R
241+
#> Truncated?: FALSE
233242
```
234243

235244
You can also knit an input file before posting as a gist:
@@ -273,12 +282,13 @@ run(file, knitopts = list(quiet=TRUE)) %>% gist_create(browse = FALSE)
273282
```
274283

275284
```
276-
#> <gist>541490440515c66168bb
277-
#> URL: https://gist.github.com/541490440515c66168bb
285+
#> <gist>4febc43f823a3ecd6f7e
286+
#> URL: https://gist.github.com/4febc43f823a3ecd6f7e
278287
#> Description:
279288
#> Public: TRUE
280-
#> Created/Edited: 2015-01-23T16:27:54Z / 2015-01-23T16:27:54Z
289+
#> Created/Edited: 2015-05-01T04:10:34Z / 2015-05-01T04:10:34Z
281290
#> Files: stuff.md
291+
#> Truncated?: FALSE
282292
```
283293

284294

@@ -310,10 +320,10 @@ gists()[[1]] %>% commits()
310320
```
311321
#> [[1]]
312322
#> <commit>
313-
#> Version: 103641c54a3382b3a6f7089376bd420082c2d658
314-
#> User: invalid-email-address
315-
#> Commited: 2015-01-23T16:27:54Z
316-
#> Commits [total, additions, deletions]: [35,35,0]
323+
#> Version: 9eb068aef0f299cd011fc7b5db84237ce5b86e19
324+
#> User: sckott
325+
#> Commited: 2015-05-01T04:10:34Z
326+
#> Commits [total, additions, deletions]: [5,5,0]
317327
```
318328

319329
## Star a gist
@@ -332,6 +342,7 @@ gist('7ddb9810fc99c84c65ec') %>% star()
332342
#> Public: TRUE
333343
#> Created/Edited: 2014-06-27T17:50:37Z / 2014-06-27T17:50:37Z
334344
#> Files: code.R, manifest.yml, rrt_manifest.yml
345+
#> Truncated?: FALSE, FALSE, FALSE
335346
```
336347

337348
Unstar
@@ -348,6 +359,7 @@ gist('7ddb9810fc99c84c65ec') %>% unstar()
348359
#> Public: TRUE
349360
#> Created/Edited: 2014-06-27T17:50:37Z / 2014-06-27T17:50:37Z
350361
#> Files: code.R, manifest.yml, rrt_manifest.yml
362+
#> Truncated?: FALSE, FALSE, FALSE
351363
```
352364

353365
## Update a gist
@@ -358,7 +370,7 @@ First, path to file
358370

359371

360372
```r
361-
file <- system.file("examples", "alm_othersources.md", package = "gistr")
373+
file <- system.file("examples", "alm.md", package = "gistr")
362374
```
363375

364376

@@ -369,32 +381,24 @@ gists(what = "minepublic")[[1]] %>%
369381
```
370382

371383
```
372-
#> <gist>04ee8c7a0491d3317617
373-
#> URL: https://gist.github.com/04ee8c7a0491d3317617
384+
#> <gist>d5f968cef4c80e7ea9c3
385+
#> URL: https://gist.github.com/d5f968cef4c80e7ea9c3
374386
#> Description:
375387
#> Public: TRUE
376-
#> Created/Edited: 2015-01-23T16:27:54Z / 2015-01-23T16:27:56Z
377-
#> Files: alm_othersources.md, code.R
388+
#> Created/Edited: 2015-05-01T04:10:34Z / 2015-05-01T04:10:36Z
389+
#> Files: alm.md, code.R
390+
#> Truncated?: FALSE, FALSE
378391
```
379392

380393
Delete files
381394

382395

383396
```r
384-
gists(what = "minepublic")[[1]] %>%
385-
delete_files(file) %>%
397+
gists(what = "minepublic")[[1]]
398+
delete_files("code.R") %>%
386399
update()
387400
```
388401

389-
```
390-
#> <gist>04ee8c7a0491d3317617
391-
#> URL: https://gist.github.com/04ee8c7a0491d3317617
392-
#> Description:
393-
#> Public: TRUE
394-
#> Created/Edited: 2015-01-23T16:27:54Z / 2015-01-23T16:27:57Z
395-
#> Files: code.R
396-
```
397-
398402
## Open a gist in your default browser
399403

400404

@@ -412,7 +416,7 @@ gists()[[1]] %>% embed()
412416
```
413417

414418
```
415-
#> [1] "<script src=\"https://gist.github.com/SiestaMadokaist/6252116110eaddeced11.js\"></script>"
419+
#> [1] "<script src=\"https://gist.github.com/sckott/d5f968cef4c80e7ea9c3.js\"></script>"
416420
```
417421

418422
### List forks
@@ -430,16 +434,18 @@ gist(id='1642874') %>% forks(per_page=2)
430434
#> URL: https://gist.github.com/1642989
431435
#> Description: Spline Transition
432436
#> Public: TRUE
433-
#> Created/Edited: 2012-01-19T21:45:20Z / 2014-12-10T03:25:19Z
437+
#> Created/Edited: 2012-01-19T21:45:20Z / 2015-04-15T10:16:23Z
434438
#> Files:
439+
#> Truncated?:
435440
#>
436441
#> [[2]]
437442
#> <gist>1643051
438443
#> URL: https://gist.github.com/1643051
439444
#> Description: Line Transition (Broken)
440445
#> Public: TRUE
441-
#> Created/Edited: 2012-01-19T21:51:30Z / 2015-01-15T16:50:51Z
442-
#> Files:
446+
#> Created/Edited: 2012-01-19T21:51:30Z / 2015-04-15T10:16:33Z
447+
#> Files:
448+
#> Truncated?:
443449
```
444450

445451
## Fork a gist
@@ -453,12 +459,13 @@ g <- gists()
453459
```
454460

455461
```
456-
#> <gist>f1f863e026f65328bbf7
457-
#> URL: https://gist.github.com/f1f863e026f65328bbf7
462+
#> <gist>198a3d98aefe5432cedd
463+
#> URL: https://gist.github.com/198a3d98aefe5432cedd
458464
#> Description:
459465
#> Public: TRUE
460-
#> Created/Edited: 2015-01-23T16:27:58Z / 2015-01-23T16:27:58Z
461-
#> Files: log
466+
#> Created/Edited: 2015-05-01T04:10:37Z / 2015-05-01T04:10:37Z
467+
#> Files: Servidor.js
468+
#> Truncated?: FALSE
462469
```
463470

464471

0 commit comments

Comments
 (0)