| OLD | NEW |
| 1 // Copyright (c) 2015, the Fletch project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, the Dartino project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 import 'dart:fletch'; | 5 import 'dart:fletch'; |
| 6 import 'dart:convert' show JSON, UTF8; | 6 import 'dart:convert' show JSON, UTF8; |
| 7 | 7 |
| 8 import 'package:http/http.dart'; | 8 import 'package:http/http.dart'; |
| 9 import 'package:socket/socket.dart'; | 9 import 'package:socket/socket.dart'; |
| 10 | 10 |
| 11 abstract class Connection { | 11 abstract class Connection { |
| (...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 190 try { | 190 try { |
| 191 entries = server.get('$api?page=${page + 1}'); | 191 entries = server.get('$api?page=${page + 1}'); |
| 192 } catch (_) { | 192 } catch (_) { |
| 193 // Throws once when we hit past the last page. | 193 // Throws once when we hit past the last page. |
| 194 } | 194 } |
| 195 _pages[page] = entries; | 195 _pages[page] = entries; |
| 196 channel.send(entries); | 196 channel.send(entries); |
| 197 return entries; | 197 return entries; |
| 198 } | 198 } |
| 199 } | 199 } |
| OLD | NEW |