Skip to content

Commit

Permalink
## [0.1.4+3] - Improve library health.
Browse files Browse the repository at this point in the history
- [Bug] Solved few health suggestion, to improve the health of the code.
  • Loading branch information
nhathiwala committed Mar 17, 2019
1 parent 9e89de3 commit 95f7531
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 16 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## [0.1.4+3] - Improve library health.
- [Bug] Solved few health suggestion, to improve the health of the code.

## [0.1.4+2] - Added few advance query references and solved bugs.
- [Bug] `.setFacetFilter(dynamic value)` can now accept String or List<String> value.
- [Added] AttributeForDistinct (Advance)
Expand Down
2 changes: 1 addition & 1 deletion lib/src/algolia.dart
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ class Algolia {
print(body);
return AlgoliaIndexesSnapshot._(this, body);
} catch (err) {
throw err;
return err;
}
}
}
4 changes: 2 additions & 2 deletions lib/src/index_reference.dart
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ class AlgoliaIndexReference extends AlgoliaQuery {
Map<String, dynamic> body = json.decode(response.body);
return AlgoliaTask._(algolia, index, body);
} catch (err) {
throw err;
return err;
}
}

Expand All @@ -119,7 +119,7 @@ class AlgoliaIndexReference extends AlgoliaQuery {
Map<String, dynamic> body = json.decode(response.body);
return AlgoliaTask._(algolia, index, body);
} catch (err) {
throw err;
return err;
}
}
}
4 changes: 2 additions & 2 deletions lib/src/query_snapshot.dart
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class AlgoliaQuerySnapshot {
.toList()
.cast<AlgoliaObjectSnapshot>();
this.hits = hitsReMap;
this.empty = this.hits.length == 0;
this.empty = this.hits.isEmpty;
this.nbHits = map['nbHits'];
this.page = map['page'];
this.nbPages = map['nbPages'];
Expand All @@ -48,6 +48,6 @@ class AlgoliaQuerySnapshot {
this.exhaustiveNbHits = map['exhaustiveNbHits'];
this.query = map['query'];
this.params = map['params'];
this.facets = map['facets'] != null ? map['facets'] : {};
this.facets = map['facets'] != null ? map['facets'] : {};
}
}
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: algolia
version: 0.1.4+2
version: 0.1.4+3
authors:
- Nayan Hathiwala (Knoxpo) <[email protected]>
description: >
Expand Down
12 changes: 2 additions & 10 deletions test/algolia_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -204,17 +204,9 @@ void main() async {
});
}

// class Application {
// static final Algolia algolia = Algolia.init(
// applicationId: 'YOUR_APPLICATION_ID',
// apiKey: 'YOUR_API_KEY',
// );
// }


class Application {
static final Algolia algolia = Algolia.init(
applicationId: '86BGVLXUEM',
apiKey: '07e1fdc2794cc6dabefd9219e83acd1d',
applicationId: 'YOUR_APPLICATION_ID',
apiKey: 'YOUR_API_KEY',
);
}

0 comments on commit 95f7531

Please sign in to comment.