Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
mythz committed Aug 9, 2018
1 parent a19e68b commit 4cf3543
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,15 @@ To make API calls we need to use the `JsonServiceClient`, installed by adding th

```yaml
dependencies:
servicestack: "^1.0.0"
servicestack: "^1.0.2"
```
Saving `pubspec.yaml` in VS Code with the [Dart Code Extension](https://dartcode.org) automatically calls `flutter packages get` to add any new dependencies to your project.
Saving `pubspec.yaml` in VS Code with the [Dart Code Extension](https://dartcode.org) automatically calls `pub get` or `flutter packages get` (in Flutter projects) to add any new dependencies to your project.

We now have everything we need to be able to make typed API requests to any of [TechStacks APIs](https://www.techstacks.io/metadata) with a shared `JsonServiceClient` instance populated with the base URL of the remote endpoint, e.g:

```dart
import 'package:servicestack/servicestack.dart';
import 'package:servicestack/client.dart';
import 'techstacks.dtos.dart';
Expand Down Expand Up @@ -206,12 +206,12 @@ Which updates all Dart references in the current directory, including any custom
Updated: test.dtos.dart
Updated: techstacks.dtos.dart

This gives us everything we need to call Web Services in our Flutter App, by importing `package:servicestack/servicestack.dart` containing `JsonServiceClient` as well as any generated DTOs.
This gives us everything we need to call Web Services in our Flutter App, by importing `package:servicestack/client.dart` containing `JsonServiceClient` as well as any generated DTOs.

Then create new `JsonServiceClient` instances initialized with the `BaseUrl` for each of the remote endpoints we want to call:

```dart
import 'package:servicestack/servicestack.dart';
import 'package:servicestack/client.dart';
import 'test.dtos.dart';
import 'techstacks.dtos.dart';
Expand Down Expand Up @@ -495,7 +495,7 @@ BaseUrl: https://www.techstacks.io
//AddDescriptionAsComments: True
//IncludeTypes:
//ExcludeTypes:
//DefaultImports: package:servicestack/servicestack.dart
//DefaultImports: package:servicestack/client.dart
*/
```

Expand Down

0 comments on commit 4cf3543

Please sign in to comment.