Skip to content

Commit

Permalink
Rename ShortcakeClient to ShortcakeApi (#23)
Browse files Browse the repository at this point in the history
  • Loading branch information
BryceBeagle authored Mar 31, 2021
1 parent 4dd230b commit 287bd41
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 5 deletions.
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog], and this project adheres to [Semantic Versioning].

## [0.0.3-nullsafety]

### Changed
- Renamed `ShortcakeClient` to `ShortcakeApi` to prevent naming confusion

## [0.0.2-nullsafety]

- Only repo/meta changes
Expand All @@ -12,7 +17,8 @@ The format is based on [Keep a Changelog], and this project adheres to [Semantic

- Initial release

[0.0.2-nullsafety]: https://github.com/shortcake-dev/shortcake-api-dart/compare/v0.0.1...v0.0.2
[0.0.3-nullsafety]: https://github.com/shortcake-dev/shortcake-api-dart/compare/v0.0.1...v0.0.2
[0.0.2-nullsafety]: https://github.com/shortcake-dev/shortcake-api-dart/compare/v0.0.2...v0.0.3
[0.0.1-nullsafety]: https://github.com/shortcake-dev/shortcake-api-dart/releases/tag/v0.0.1

[Keep a Changelog]: https://keepachangelog.com/en/1.0.0/
Expand Down
4 changes: 2 additions & 2 deletions lib/src/client.dart
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import 'package:graphql/client.dart';

class ShortcakeClient extends GraphQLClient {
class ShortcakeApi extends GraphQLClient {
final String uri;

ShortcakeClient(this.uri) : super(link: HttpLink(uri), cache: GraphQLCache());
ShortcakeApi(this.uri) : super(link: HttpLink(uri), cache: GraphQLCache());

Future<QueryResult> introspect() async {
const query = r'''
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: shortcake
description: 'Shortcake API for Dart'
version: 0.0.2-nullsafety
version: 0.0.3-nullsafety
homepage: https://github.com/shortcake-dev/shortcake-api-dart

environment:
Expand Down
2 changes: 1 addition & 1 deletion test/client_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import 'package:test/test.dart';

void main() {
group('ShortcakeClient.introspect()', () {
var client = ShortcakeClient('http://localhost:8000');
var client = ShortcakeApi('http://localhost:8000');

test('does not create an exception', () async {
var result = await client.introspect();
Expand Down

0 comments on commit 287bd41

Please sign in to comment.