Skip to content

Commit

Permalink
0.1.3+2: Bug Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
nhathiwala committed Jan 18, 2019
1 parent eb688f5 commit 9c9a1e8
Show file tree
Hide file tree
Showing 8 changed files with 77 additions and 33 deletions.
56 changes: 42 additions & 14 deletions .idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## [0.1.3+2] - Added support to manage index settings.
- Implementation & bug solved
- highlightResult [Bug] (commit ref: 0d76d24fe8aa347a0933920afe5ded43bdcbd68b)
- snippetResult [Implementation] (commit ref: 0d76d24fe8aa347a0933920afe5ded43bdcbd68b)

## [0.1.3+1] - Added support to manage index settings.
- Updated `example.dart`: Added index settings example.
- Updated index `.setSettings()` response to `AlgoliaTask`.
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Algolia
**[UNOFFICIAL]** Algolia pure dart SDK, wrapped around Algolia REST API for easy implementation for your Flutter or Dart projects.
# Algolia Search (Dart Client)
**[UNOFFICIAL]** Algolia is a pure dart SDK, wrapped around Algolia REST API for easy implementation for your Flutter or Dart projects.

[![pub package](https://img.shields.io/pub/v/algolia.svg)](https://pub.dartlang.org/packages/algolia)

Expand Down
1 change: 1 addition & 0 deletions example/example.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import 'dart:async';
import 'package:algolia/algolia.dart';

void main() async {
Expand Down
18 changes: 11 additions & 7 deletions lib/src/object_snapshot.dart
Original file line number Diff line number Diff line change
@@ -1,27 +1,31 @@
part of algolia;

// Implementation & bug solved by https://github.com/franvera
// - highlightResult [Bug] (commit ref: 0d76d24fe8aa347a0933920afe5ded43bdcbd68b)
// - snippetResult [Implementation] (commit ref: 0d76d24fe8aa347a0933920afe5ded43bdcbd68b)

class AlgoliaObjectSnapshot {
Algolia algolia;
String objectID;
String index;
Map<String, Map<String, dynamic>> highlightResult;
Map<String, dynamic> highlightResult;
Map<String, dynamic> snippetResult;
Map<String, dynamic> data;

AlgoliaObjectReference get ref =>
AlgoliaObjectReference._(algolia, index, objectID);

// AlgoliaObjectSnapshot.fromMap(Map<String, dynamic> map) {
AlgoliaObjectSnapshot.fromMap(algolia, index, Map<String, dynamic> map) {
algolia = algolia;
index = index;
objectID = map['objectID'];
Map<String, dynamic> newMapHighlightResult = map['_highlightResult'] != null
? Map<String, Map<String, dynamic>>.from(map['_highlightResult'])
: null;
highlightResult = newMapHighlightResult;
// Map<String, dynamic> m = map;

highlightResult = map['_highlightResult'];
snippetResult = map['_snippetResult'];

map.remove('objectID');
map.remove('_highlightResult');
map.remove('_snippetResult');
data = map;
}
}
8 changes: 4 additions & 4 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ packages:
name: analyzer
url: "https://pub.dartlang.org"
source: hosted
version: "0.34.0"
version: "0.33.3+1"
args:
dependency: transitive
description:
Expand Down Expand Up @@ -70,7 +70,7 @@ packages:
name: front_end
url: "https://pub.dartlang.org"
source: hosted
version: "0.1.7"
version: "0.1.6+4"
glob:
dependency: transitive
description:
Expand Down Expand Up @@ -133,7 +133,7 @@ packages:
name: kernel
url: "https://pub.dartlang.org"
source: hosted
version: "0.3.7"
version: "0.3.6+4"
logging:
dependency: transitive
description:
Expand Down Expand Up @@ -359,4 +359,4 @@ packages:
source: hosted
version: "2.1.15"
sdks:
dart: ">=2.1.0-dev.5.0 <3.0.0"
dart: ">=2.0.0 <3.0.0"
4 changes: 2 additions & 2 deletions pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: algolia
version: 0.1.3+1
version: 0.1.3+2
authors:
- Nayan Hathiwala (Knoxpo) <nhathiwala@knoxpo.com>
description: >
Algolia pure dart SDK, wrapped around Algolia REST API for easy implementation for your Flutter or Dart projects.
Algolia is a pure dart SDK, wrapped around Algolia REST API for easy implementation for your Flutter or Dart projects.
homepage: https://github.com/knoxpo/dart_algolia

environment:
Expand Down
14 changes: 10 additions & 4 deletions test/algolia_test.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import 'dart:async';
import 'package:test/test.dart';

import 'package:algolia/algolia.dart';

void main() async {
Expand Down Expand Up @@ -204,10 +204,16 @@ void main() async {
});
}


class Application {
static final Algolia algolia = Algolia.init(
applicationId: 'YOUR_APPLICATION_ID',
apiKey: 'YOUR_API_KEY',
applicationId: '86BGVLXUEM',
apiKey: '79ae086fe5a29c6c08e788e279b6b99d',

This comment has been minimized.

Copy link
@franvera

franvera Jan 18, 2019

Is this intended?

This comment has been minimized.

Copy link
@nhathiwala

nhathiwala Jan 18, 2019

Author Member

It wasn't, I guess I forget to remove it after testing. However, I have regenerated the key.

);
}

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

0 comments on commit 9c9a1e8

Please sign in to comment.