Skip to content

Commit 95c83b5

Browse files
authored
improve readme (#468)
1 parent 6e01d28 commit 95c83b5

File tree

3 files changed

+44
-31
lines changed

3 files changed

+44
-31
lines changed

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1-
2-
![Parse Logo](https://parseplatform.org/img/logo.svg)
1+
<p align="center">
2+
<img alt="Parse Logo" src="https://parseplatform.org/img/logo.svg" width="500">
3+
</a>
4+
</p>
35

46
---
57

packages/dart/README.md

Lines changed: 32 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,16 @@
1-
![Parse Logo](https://parseplatform.org/img/logo.svg) ![Dart Logo](https://dart.dev/assets/shared/dart-logo-for-shares.png?2)
1+
<p align="center">
2+
<img src="https://parseplatform.org/img/logo.svg" alt="Parse Logo" width="250">
3+
<img src="https://upload.wikimedia.org/wikipedia/commons/f/fe/Dart_programming_language_logo.svg" alt="Dart Logo" width="250">
4+
</p>
25

6+
---
37

4-
**THIS README IS WORK IN PROGRESS**
8+
**This is now a dart package. The Flutter package was moved [here](https://pub.dev/packages/parse_server_sdk_flutter).**
59

6-
## Parse For Dart!
10+
**THIS README IS WORK IN PROGRESS!**
11+
Help out to improve this README on [GitHub](https://github.com/parse-community/Parse-SDK-Flutter/edit/master/packages/dart/README.md).
12+
13+
## Parse For Dart!
714
This is a Dart package that allows communication with a Parse Server, (https://parseplatform.org) either hosted on your own server or another, like (http://Back4App.com).
815

916
This is a work in progress and we are consistently updating it. Please let us know if you think anything needs changing/adding, and more than ever, please do join in on this project. (Even if it is just to improve our documentation)
@@ -36,7 +43,7 @@ await Parse().initialize(
3643
keyParseServerUrl,
3744
coreStore: await CoreStoreSembastImp.getInstance("/data"));
3845
```
39-
It's possible to add other parameters to work with your instance of Parse Server:-
46+
It's possible to add other parameters to work with your instance of Parse Server:-
4047

4148
```dart
4249
await Parse().initialize(
@@ -307,7 +314,7 @@ The features available are:-
307314
* Ascending
308315
* Descending
309316
* Plenty more!
310-
317+
311318
## Relational queries
312319
If you want to retrieve objects where a field contains an object that matches another query, you can use the
313320
__whereMatchesQuery__ condition.
@@ -429,7 +436,7 @@ QueryBuilder<ParseObject> query =
429436
..whereEqualTo('intNumber', 1);
430437
```
431438
__Create a subscription__
432-
You’ll get the LiveQuery events through this subscription.
439+
You’ll get the LiveQuery events through this subscription.
433440
The first time you call subscribe, we’ll try to open the WebSocket connection to the LiveQuery server for you.
434441

435442
```dart
@@ -440,7 +447,7 @@ __Event Handling__
440447
We define several types of events you’ll get through a subscription object:
441448

442449
__Create event__
443-
When a new ParseObject is created and it fulfills the QueryBuilder you subscribe, you’ll get this event.
450+
When a new ParseObject is created and it fulfills the QueryBuilder you subscribe, you’ll get this event.
444451
The object is the ParseObject which was created.
445452
```dart
446453
subscription.on(LiveQueryEvent.create, (value) {
@@ -455,8 +462,8 @@ subscription.on(LiveQueryEvent.create, (value) {
455462
```
456463

457464
__Update event__
458-
When an existing ParseObject which fulfills the QueryBuilder you subscribe is updated (The ParseObject fulfills the
459-
QueryBuilder before and after changes), you’ll get this event.
465+
When an existing ParseObject which fulfills the QueryBuilder you subscribe is updated (The ParseObject fulfills the
466+
QueryBuilder before and after changes), you’ll get this event.
460467
The object is the ParseObject which was updated. Its content is the latest value of the ParseObject.
461468
```dart
462469
subscription.on(LiveQueryEvent.update, (value) {
@@ -471,8 +478,8 @@ subscription.on(LiveQueryEvent.update, (value) {
471478
```
472479

473480
__Enter event__
474-
When an existing ParseObject’s old value does not fulfill the QueryBuilder but its new value fulfills the QueryBuilder,
475-
you’ll get this event. The object is the ParseObject which enters the QueryBuilder.
481+
When an existing ParseObject’s old value does not fulfill the QueryBuilder but its new value fulfills the QueryBuilder,
482+
you’ll get this event. The object is the ParseObject which enters the QueryBuilder.
476483
Its content is the latest value of the ParseObject.
477484
```dart
478485
subscription.on(LiveQueryEvent.enter, (value) {
@@ -487,8 +494,8 @@ subscription.on(LiveQueryEvent.enter, (value) {
487494
```
488495

489496
__Leave event__
490-
When an existing ParseObject’s old value fulfills the QueryBuilder but its new value doesn’t fulfill the QueryBuilder,
491-
you’ll get this event. The object is the ParseObject which leaves the QueryBuilder.
497+
When an existing ParseObject’s old value fulfills the QueryBuilder but its new value doesn’t fulfill the QueryBuilder,
498+
you’ll get this event. The object is the ParseObject which leaves the QueryBuilder.
492499
Its content is the latest value of the ParseObject.
493500
```dart
494501
subscription.on(LiveQueryEvent.leave, (value) {
@@ -503,7 +510,7 @@ subscription.on(LiveQueryEvent.leave, (value) {
503510
```
504511

505512
__Delete event__
506-
When an existing ParseObject which fulfills the QueryBuilder is deleted, you’ll get this event.
513+
When an existing ParseObject which fulfills the QueryBuilder is deleted, you’ll get this event.
507514
The object is the ParseObject which is deleted
508515
```dart
509516
subscription.on(LiveQueryEvent.delete, (value) {
@@ -518,8 +525,8 @@ subscription.on(LiveQueryEvent.delete, (value) {
518525
```
519526

520527
__Unsubscribe__
521-
If you would like to stop receiving events from a QueryBuilder, you can just unsubscribe the subscription.
522-
After that, you won’t get any events from the subscription object and will close the WebSocket connection to the
528+
If you would like to stop receiving events from a QueryBuilder, you can just unsubscribe the subscription.
529+
After that, you won’t get any events from the subscription object and will close the WebSocket connection to the
523530
LiveQuery server.
524531

525532
```dart
@@ -594,13 +601,13 @@ Other user features are:-
594601
* Get all users
595602
* Save
596603
* Destroy user
597-
* Queries
598-
604+
* Queries
605+
599606
## Facebook, OAuth and 3rd Party Login/User
600-
607+
601608
Usually, each provider will provide their own library for logins, but the loginWith method on ParseUser accepts a name of provider, then a Map<String, dynamic> with the authentication details required.
602609
For Facebook and the example below, we used the library provided at https://pub.dev/packages/flutter_facebook_login
603-
610+
604611
```
605612
Future<void> goToFacebookLogin() async {
606613
final FacebookLogin facebookLogin = FacebookLogin();
@@ -651,9 +658,9 @@ For any object, you can specify which users are allowed to read the object, and
651658
To support this type of security, each object has an access control list, implemented by the __ParseACL__ class.
652659

653660
If ParseACL is not specified (with the exception of the ParseUser class) all objects are set to Public for read and write.
654-
The simplest way to use a ParseACL is to specify that an object may only be read or written by a single user.
661+
The simplest way to use a ParseACL is to specify that an object may only be read or written by a single user.
655662
To create such an object, there must first be a logged in ParseUser. Then, new ParseACL(user) generates a ParseACL that
656-
limits access to that user. An object’s ACL is updated when the object is saved, like any other property.
663+
limits access to that user. An object’s ACL is updated when the object is saved, like any other property.
657664

658665
```dart
659666
ParseUser user = await ParseUser.currentUser() as ParseUser;
@@ -664,7 +671,7 @@ ParseObject parseObject = ParseObject("TestAPI");
664671
parseObject.setACL(parseACL);
665672
var apiResponse = await parseObject.save();
666673
```
667-
Permissions can also be granted on a per-user basis. You can add permissions individually to a ParseACL using
674+
Permissions can also be granted on a per-user basis. You can add permissions individually to a ParseACL using
668675
__setReadAccess__ and __setWriteAccess__
669676
```dart
670677
ParseUser user = await ParseUser.currentUser() as ParseUser;
@@ -693,8 +700,8 @@ parseObject.setACL(parseACL);
693700
var apiResponse = await parseObject.save();
694701
```
695702
Operations that are forbidden, such as deleting an object that you do not have write access to, result in a
696-
ParseError with code 101: 'ObjectNotFound'.
697-
For security purposes, this prevents clients from distinguishing which object ids exist but are secured, versus which
703+
ParseError with code 101: 'ObjectNotFound'.
704+
For security purposes, this prevents clients from distinguishing which object ids exist but are secured, versus which
698705
object ids do not exist at all.
699706

700707
You can retrieve the ACL list of an object using:

packages/flutter/README.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
1+
<p align="center">
2+
<img src="https://parseplatform.org/img/logo.svg" alt="Parse Logo" width="250" style="text-align:center; ">
3+
<img src="https://upload.wikimedia.org/wikipedia/commons/1/17/Google-flutter-logo.png" alt="Flutter Logo" width="250" style="text-align:center;">
4+
</p>
15

2-
![Parse Logo](https://parseplatform.org/img/logo.svg) ![Flutter Logo](https://upload.wikimedia.org/wikipedia/commons/1/17/Google-flutter-logo.png)
6+
---
37

48
## Parse For Flutter!
59
Hi, this is a Flutter plugin that allows communication with a Parse Server, (https://parseplatform.org) either hosted on your own server or another, like (http://Back4App.com).
@@ -49,12 +53,12 @@ It's possible to add other parameters to work with your instance of Parse Server
4953
```
5054

5155

52-
#### Early Web support
53-
Currently this requires adding `X-Parse-Installation-Id` as an allowed header to parse-server.
56+
#### Web support
57+
Due to Cross-origin resource sharing (CORS) restrictions, this requires adding `X-Parse-Installation-Id` as an allowed header to parse-server.
5458
When running directly via docker, set the env var `PARSE_SERVER_ALLOW_HEADERS=X-Parse-Installation-Id`.
5559
When running via express, set [ParseServerOptions](https://parseplatform.org/parse-server/api/master/ParseServerOptions.html) `allowHeaders: ['X-Parse-Installation-Id']`.
5660

57-
Be aware that for web ParseInstallation does include app name, version or package identifier.
61+
Be aware that for web ParseInstallation does include app name, version or package identifier automatically. You should manually provide this data as described [here](https://github.com/parse-community/Parse-SDK-Flutter/blob/master/docs/migrate-1-0-28.md#optional-provide-app-information-on-web);
5862

5963

6064
## Objects

0 commit comments

Comments
 (0)