Skip to content

Commit

Permalink
fix(resource): now with flattened activities
Browse files Browse the repository at this point in the history
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
... .
  • Loading branch information
Byron committed Mar 10, 2015
1 parent 35bd1c3 commit 2531011
Show file tree
Hide file tree
Showing 5 changed files with 424 additions and 411 deletions.
14 changes: 7 additions & 7 deletions gen/youtube3/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,13 @@ let r = hub.resource().activity(...).doit()
Or specifically ...

```ignore
let r = hub.live_broadcasts().control(...).doit()
let r = hub.live_broadcasts().insert(...).doit()
let r = hub.live_broadcasts().list(...).doit()
let r = hub.live_broadcasts().transition(...).doit()
let r = hub.live_broadcasts().update(...).doit()
let r = hub.live_broadcasts().delete(...).doit()
let r = hub.live_broadcasts().bind(...).doit()
let r = hub.live_broadcast().control(...).doit()
let r = hub.live_broadcast().insert(...).doit()
let r = hub.live_broadcast().list(...).doit()
let r = hub.live_broadcast().transition(...).doit()
let r = hub.live_broadcast().update(...).doit()
let r = hub.live_broadcast().delete(...).doit()
let r = hub.live_broadcast().bind(...).doit()
```

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

0 comments on commit 2531011

Please sign in to comment.