Skip to content

Commit 2531011

Browse files
committed
fix(resource): now with flattened activities
That way, we don't have recursive method builders, but instead flatten the hierarchy. In our case, this is easier and means less to type. E.g. `hub.user().message().import(...)` now is `hub.user().message_import(...)` In go it would look like this though `hub.user.messages.import(...) which is neater. We will never have that though, as it will initialize a massive amount of data right on the stack, even though only some of it is ever used ... .
1 parent 35bd1c3 commit 2531011

5 files changed

Lines changed: 424 additions & 411 deletions

File tree

gen/youtube3/README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -54,13 +54,13 @@ let r = hub.resource().activity(...).doit()
5454
Or specifically ...
5555

5656
```ignore
57-
let r = hub.live_broadcasts().control(...).doit()
58-
let r = hub.live_broadcasts().insert(...).doit()
59-
let r = hub.live_broadcasts().list(...).doit()
60-
let r = hub.live_broadcasts().transition(...).doit()
61-
let r = hub.live_broadcasts().update(...).doit()
62-
let r = hub.live_broadcasts().delete(...).doit()
63-
let r = hub.live_broadcasts().bind(...).doit()
57+
let r = hub.live_broadcast().control(...).doit()
58+
let r = hub.live_broadcast().insert(...).doit()
59+
let r = hub.live_broadcast().list(...).doit()
60+
let r = hub.live_broadcast().transition(...).doit()
61+
let r = hub.live_broadcast().update(...).doit()
62+
let r = hub.live_broadcast().delete(...).doit()
63+
let r = hub.live_broadcast().bind(...).doit()
6464
```
6565

6666
The `resource()` and `activity(...)` calls create [builders][builder-pattern]. The second one dealing with `Activities`

0 commit comments

Comments
 (0)