michaelliao/githubpy — pull request #12 by sternk (2014-06-04 00:01:03+00:00)
Title: Keep links to next page

I am suggesting a small improvement to the situation described in #7 to make the commits api usable:
```python
>>> gh = github.GitHub()
>>> map(lambda x: x['sha'],gh.repos("michaelliao/githubpy").commits.get())
[u'3a47e422e7071a2a7ad3458abe64a108efe06c00', u'99ea1346bfd3b34ce3375a014ce76d7d67428e08', u'46ea905dbd20dd7fbd2934f472f71f97857e1976', u'3d77b17ff79fb4197e65bb36f7de41980a6fa931', u'8b05b226bebc87e14113862de4970a7a47e5646f', u'fd2a9a5a25885e7df1651b770826ad2b89fe2994', u'aa4bc865f921317a980f1d676eac77001e4402a3', u'4909596b5167786c01fd8400e33307201babe8ef', u'977941e1867e623f80e52c59bd9ddcc070136f45', u'56588b649863b6e8747f308dde28223bbbeac0a9', u'3d9e974ba729415b8aea142046024fc2d46d3d55', u'776fbcf27145612b1aeacd1494ef8b7d85fccb7d', u'9437b40c3bfdf098807381c555420ba6aca74f17', u'94c47f691358878fd98c36ab202d0ee45344c897', u'a18dcddbcdf6549112d6db42496a3a31e9d10077', u'85f62cdec517df593de02baec14e83f6f4528a88', u'efa25fedc13d350e94638d3be81a706c98d734e9', u'771cf13a3e303f8e4c6d0eddd476ff51ec0f2a69', u'127d4c97c3b024f0775390fd9e05e688aad99d77', u'48f9c4349f8d7637bf21ceecdf85047050c08677', u'9639d065e7ece2db2c37916be56ef10b8513cef6', u'5518bb0e860bd7641ffd60073dee94191ca74c5e', u'4a350eb2a4fd727c13247d75afc9309c4cbd3462', u'029599790ea2dcfa5f46ee27419d942b991611c2', u'85656059c805181f8c154003f638ef63a35bac5d', u'0b9c9b941aa302613ced42efb87225dbbdda9ca9', u'fea31dbd613f61553c8a36abebcbc8aa647a1067', u'e03ba453faca54aa67087b6368927acb3dff26a4', u'9fc87e08801ed8681164e604c6cd7ca96e55fdc6', u'bd517f93d054547d57086dbe32da8ed28aa8a31b']
>>> map(lambda x: x['sha'],gh.repos("michaelliao/githubpy").commits.get().all())
[u'3a47e422e7071a2a7ad3458abe64a108efe06c00', u'99ea1346bfd3b34ce3375a014ce76d7d67428e08', u'46ea905dbd20dd7fbd2934f472f71f97857e1976', u'3d77b17ff79fb4197e65bb36f7de41980a6fa931', u'8b05b226bebc87e14113862de4970a7a47e5646f', u'fd2a9a5a25885e7df1651b770826ad2b89fe2994', u'aa4bc865f921317a980f1d676eac77001e4402a3', u'4909596b5167786c01fd8400e33307201babe8ef', u'977941e1867e623f80e52c59bd9ddcc070136f45', u'56588b649863b6e8747f308dde28223bbbeac0a9', u'3d9e974ba729415b8aea142046024fc2d46d3d55', u'776fbcf27145612b1aeacd1494ef8b7d85fccb7d', u'9437b40c3bfdf098807381c555420ba6aca74f17', u'94c47f691358878fd98c36ab202d0ee45344c897', u'a18dcddbcdf6549112d6db42496a3a31e9d10077', u'85f62cdec517df593de02baec14e83f6f4528a88', u'efa25fedc13d350e94638d3be81a706c98d734e9', u'771cf13a3e303f8e4c6d0eddd476ff51ec0f2a69', u'127d4c97c3b024f0775390fd9e05e688aad99d77', u'48f9c4349f8d7637bf21ceecdf85047050c08677', u'9639d065e7ece2db2c37916be56ef10b8513cef6', u'5518bb0e860bd7641ffd60073dee94191ca74c5e', u'4a350eb2a4fd727c13247d75afc9309c4cbd3462', u'029599790ea2dcfa5f46ee27419d942b991611c2', u'85656059c805181f8c154003f638ef63a35bac5d', u'0b9c9b941aa302613ced42efb87225dbbdda9ca9', u'fea31dbd613f61553c8a36abebcbc8aa647a1067', u'e03ba453faca54aa67087b6368927acb3dff26a4', u'9fc87e08801ed8681164e604c6cd7ca96e55fdc6', u'bd517f93d054547d57086dbe32da8ed28aa8a31b', u'cf4eb1e5341bbad0303596bdf273379776f9f2ef', u'8d8c7c0fba57dc45548582ee48e11c2c405ff7f8', u'b3d63c5ac48613d77406996febeceac73aeb92db', u'fe4ed60f61bcf8bd509a6b9d5c9771bc68cd9be8', u'3f11ee2697b1ad4927083b7b7a3efacd90628ab6', u'293658c96d250a8c2913cf29af1e82f53c573444', u'01430f534b71ea7d34c00c2b07577f7e206ad82c']
```

Basically, instead of a list, a list-like object with an all() method is returned. The all() method is a method yielding (i.e. it is a generator) all items of the current and following pages. Note that this method is not applicable to the search api as it returns a dictionary that contains the item list (https://developer.github.com/v3/search/)