Skip to content

Update README.md #133

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 20, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
101 changes: 96 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,8 @@ You can create complex queries to really put your database to the test:
..startsWith(DietPlan.keyName, "Keto")
..greaterThan(DietPlan.keyFat, 64)
..lessThan(DietPlan.keyFat, 66)
..equals(DietPlan.keyCarbs, 5);
..equals(DietPlan.keyCarbs, 5)
..whereEqualTo("owner", user.toPointer()); //Query using Pointer to user

var response = await queryBuilder.query();

Expand Down Expand Up @@ -115,6 +116,19 @@ var dietPlan = ParseObject('DietPlan')
..set('Name', 'Ketogenic')
..set('Fat', 65);
```

Types supported:
* String
* Double
* Int
* Boolean
* DateTime
* File
* Geopoint
* ParseObject/ParseUser (Pointer)
* Map
* List (all types supported)

You then have the ability to do the following with that object:
The features available are:-
* Get
Expand Down Expand Up @@ -180,6 +194,13 @@ Retrieve it, call

```dart
var response = await dietPlan.increment("count", 1);
```
or using with save function

```dart
dietPlan.setIncrement('count', 1);
dietPlan.setDecrement('count', 1);
var response = dietPlan.save()

```

Expand All @@ -188,15 +209,22 @@ var response = await dietPlan.increment("count", 1);
Retrieve it, call

```dart
var response = await dietPlan.add("listKeywords", ["a", "a","d"]);
var response = await dietPlan.add('listKeywords', ['a','a','d']);
var response = await dietPlan.addUnique('listKeywords', ['a', 'a','d']);
var response = await dietPlan.remove('listKeywords', ['a']);

```

var response = await dietPlan.addUnique("listKeywords", ["a", "a","d"]);
or using with save function

var response = await dietPlan.remove("listKeywords", ["a"]);
```dart
dietPlan.setAdd('listKeywords', ['a','a','d']);
dietPlan.setAddUnique('listKeywords', ['a','a','d']);
dietPlan.setRemove('listKeywords', ['a']);
var response = dietPlan.save()

```


## Users

You can create and control users just as normal using this SDK.
Expand Down Expand Up @@ -240,6 +268,69 @@ and to add a config:
ParseConfig().addConfig('TestConfig', 'testing');
```

## Installation

The SDK supports Parse Installation and Channels:

```dart
var instalattion = await ParseInstallation.currentInstallation();
instalattion.deviceToken = 'xyz';
instalattion.set<ParseUser>('user', user); //Create Pointer to user
instalattion.subscribeToChannel('C');
var response = await instalattion.save();
```

For unsubscribe Channels:

```dart
var instalattion = await ParseInstallation.currentInstallation();
instalattion.unsubscribeFromChannel('D');
var response = await instalattion.save();
```

For gest List Channels:

```dart
List<dynamic> channels = await instalattion.getSubscribedChannels();
```

## Files

The SDK supports Parse File for Upload e Download.

```dart
File imgFile = await ImagePicker.pickImage(source: ImageSource.gallery);
ParseFile parseFile = ParseFile(imgFile, name: 'image.jpeg');
var response = await parseFile.save();
if (fileResponse.success) {
print('Upload with success');
} else {
print('Upload with error');
}
```

For retrieve ParseFile from Parse Object:

```dart
var image = dietPlan.get('image') as ParseFile;
print('Image url: ' + image.url);
print('Image name: ' + image.name);

````

For download ParseFile in local storage:

```dart
ParseFile file = await parseFile.download();
```

For retrieve ParseFile from local storage:

```dart
ParseFile file = await parseFile.loadStorage();
```


## Other Features of this library

Main:
Expand Down